mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-19 21:03:33 -07:00
Fixed a bug and increased speed.
This commit is contained in:
parent
7bdfe7bbdd
commit
1b2a22facf
1 changed files with 8 additions and 13 deletions
|
@ -22,7 +22,7 @@ from odict import OrderedDict
|
||||||
import errno
|
import errno
|
||||||
import optparse
|
import optparse
|
||||||
from RunFingerPackets import *
|
from RunFingerPackets import *
|
||||||
__version__ = "1.3"
|
__version__ = "1.5"
|
||||||
|
|
||||||
parser = optparse.OptionParser(usage='python %prog -i 10.10.10.224\nor:\npython %prog -i 10.10.10.0/24', version=__version__, prog=sys.argv[0])
|
parser = optparse.OptionParser(usage='python %prog -i 10.10.10.224\nor:\npython %prog -i 10.10.10.0/24', version=__version__, prog=sys.argv[0])
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ if options.TARGET is None:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
exit(-1)
|
exit(-1)
|
||||||
|
|
||||||
Timeout = 2
|
Timeout = 1
|
||||||
Host = options.TARGET
|
Host = options.TARGET
|
||||||
SMB1 = "Enabled"
|
SMB1 = "Enabled"
|
||||||
SMB2signing = "False"
|
SMB2signing = "False"
|
||||||
|
@ -295,7 +295,7 @@ def check_smb_null_session(host):
|
||||||
def ConnectAndChoseSMB(host):
|
def ConnectAndChoseSMB(host):
|
||||||
try:
|
try:
|
||||||
s = socket(AF_INET, SOCK_STREAM)
|
s = socket(AF_INET, SOCK_STREAM)
|
||||||
s.settimeout(0.7)
|
s.settimeout(Timeout)
|
||||||
s.connect(host)
|
s.connect(host)
|
||||||
except:
|
except:
|
||||||
return None
|
return None
|
||||||
|
@ -392,19 +392,14 @@ def RunFinger(Host):
|
||||||
mask = int(mask)
|
mask = int(mask)
|
||||||
net = atod(net)
|
net = atod(net)
|
||||||
threads = []
|
threads = []
|
||||||
"""
|
Pool = multiprocessing.Pool(processes=250)
|
||||||
if options.grep_output:
|
|
||||||
func = ShowSmallResults
|
|
||||||
else:
|
|
||||||
func = ShowResults
|
|
||||||
"""
|
|
||||||
func = ShowSmallResults
|
func = ShowSmallResults
|
||||||
for host in (dtoa(net+n) for n in range(0, 1<<32-mask)):
|
for host in (dtoa(net+n) for n in range(0, 1<<32-mask)):
|
||||||
p = multiprocessing.Process(target=func, args=((host),))
|
proc = Pool.apply_async(func, ((host),))
|
||||||
threads.append(p)
|
threads.append(proc)
|
||||||
p.start()
|
for proc in threads:
|
||||||
|
proc.get()
|
||||||
else:
|
else:
|
||||||
ShowSmallResults(Host)
|
ShowSmallResults(Host)
|
||||||
|
|
||||||
|
|
||||||
RunFinger(Host)
|
RunFinger(Host)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue