which is firewalled from my mobile isp.
I want to use socket to try every possible port to send a string to specific server.
I want to test from localhost:1024~... to send b'\xff\xff\xff
xff' + 'getstatus'.encode('ascii') to the server ('66.70.215.105', 27960).
Like I said i unable to access any resource on the web only telegram or whatsapp service.
Can you pls help me on this issue?
I got error on the following script: Error 22 invalid argument
def udp():
12 serverurt = (host, port)
13 maxsize = 4096
14 laddr = 1024 #puertos mas bajos estan prohibidos por root
15 while 1:
16 lport = ('127.0.0.1', laddr)
17
18 try:
19 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
20 s.settimeout(2)
21 s.bind(lport)
22 s.sendto(b'\xff\xff\xff\xff' + 'getstatus'.encode('ascii'), serverurt)
23 data = s.recv(maxsize)
24
25 print(data)
26 print('%d success' %(laddr))
27 s.close
28 break
29
30 except Exception as e:
31 s.close
32 print('%d %s' %(laddr, e))
33 laddr += 1
use nmap
Обсуждают сегодня