mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-19 21:03:33 -07:00
made compatible py2/py3
This commit is contained in:
parent
5c56c6e0ca
commit
6658c2b98f
1 changed files with 4 additions and 4 deletions
|
@ -16,12 +16,12 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
from socket import *
|
from socket import *
|
||||||
|
|
||||||
print('MSSQL Server Finder 0.2')
|
print('MSSQL Server Finder 0.3')
|
||||||
|
|
||||||
s = socket(AF_INET,SOCK_DGRAM)
|
s = socket(AF_INET,SOCK_DGRAM)
|
||||||
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
|
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
|
||||||
s.settimeout(2)
|
s.settimeout(5)
|
||||||
s.sendto('\x02',('255.255.255.255',1434))
|
s.sendto(b'\x02',('255.255.255.255',1434))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
while 1:
|
while 1:
|
||||||
|
@ -31,7 +31,7 @@ try:
|
||||||
else:
|
else:
|
||||||
print("===============================================================")
|
print("===============================================================")
|
||||||
print(("Host details: %s"%(address[0])))
|
print(("Host details: %s"%(address[0])))
|
||||||
print((data[2:]))
|
print((data[2:]).decode('latin-1'))
|
||||||
print("===============================================================")
|
print("===============================================================")
|
||||||
print("")
|
print("")
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue