Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
gwen001 committed Sep 28, 2022
1 parent e099609 commit 1acffad
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
16 changes: 13 additions & 3 deletions lfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ def testPayload( url, payload ):

def testURL( url ):
time.sleep( 0.01 )
# print(url)
t_multiproc['n_current'] = t_multiproc['n_current'] + 1

if _verbose <= 1:
sys.stdout.write( 'progress: %d/%d\r' % (t_multiproc['n_current'],t_multiproc['n_total']) )
t_multiproc['n_current'] = t_multiproc['n_current'] + 1
# t_multiproc['n_current'] = t_multiproc['n_current'] + 1

pool = Pool( 10 )
pool.map( partial(testPayload,url), t_payloads )
Expand All @@ -159,7 +160,7 @@ def realDoTest( t_params ):

if _verbose <= 1:
sys.stdout.write( 'progress: %d/%d\r' % (t_multiproc['n_current'],t_multiproc['n_total']) )
t_multiproc['n_current'] = t_multiproc['n_current'] + 1
# t_multiproc['n_current'] = t_multiproc['n_current'] + 1

t_urlparse = urllib.parse.urlparse(url)
u = t_urlparse.scheme + '_' + t_urlparse.netloc
Expand Down Expand Up @@ -272,6 +273,15 @@ def realDoTest( t_params ):
fp.close()
else:
t_urls.append( args.urls )
else:
while True:
try:
url = input()
except EOFError:
break
else:
t_urls.append( url )

n_urls = len(t_urls)
if _verbose < 4:
sys.stdout.write( '%s[+] %d urls found: %s%s\n' % (fg('green'),n_urls,args.urls,attr(0)) )
Expand Down
14 changes: 12 additions & 2 deletions rce.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ def testPayload( url, payload ):

def testURL( url ):
time.sleep( 0.01 )
t_multiproc['n_current'] = t_multiproc['n_current'] + 1

if _verbose <= 1:
sys.stdout.write( 'progress: %d/%d\r' % (t_multiproc['n_current'],t_multiproc['n_total']) )
t_multiproc['n_current'] = t_multiproc['n_current'] + 1
# t_multiproc['n_current'] = t_multiproc['n_current'] + 1

pool = Pool( 10 )
pool.map( partial(testPayload,url), t_payloads )
Expand All @@ -153,7 +154,7 @@ def realDoTest( t_params ):

if _verbose <= 1:
sys.stdout.write( 'progress: %d/%d\r' % (t_multiproc['n_current'],t_multiproc['n_total']) )
t_multiproc['n_current'] = t_multiproc['n_current'] + 1
# t_multiproc['n_current'] = t_multiproc['n_current'] + 1

t_urlparse = urllib.parse.urlparse(url)
u = t_urlparse.scheme + '_' + t_urlparse.netloc
Expand Down Expand Up @@ -266,6 +267,15 @@ def realDoTest( t_params ):
fp.close()
else:
t_urls.append( args.urls )
else:
while True:
try:
url = input()
except EOFError:
break
else:
t_urls.append( url )

n_urls = len(t_urls)
if _verbose < 4:
sys.stdout.write( '%s[+] %d urls found: %s%s\n' % (fg('green'),n_urls,args.urls,attr(0)) )
Expand Down
19 changes: 15 additions & 4 deletions xss.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def testParams( t_urlparse, payload ):
url = urllib.parse.urlunparse(t_urlparse)
doTest( url )
# convert get params to post
t_urlparse = t_urlparse._replace(query='')
url = urllib.parse.urlunparse(t_urlparse)
# t_urlparse = t_urlparse._replace(query='')
# url = urllib.parse.urlunparse(t_urlparse)
# doTest( url, 'POST', new_query )


Expand Down Expand Up @@ -115,10 +115,11 @@ def testPayload( url, payload ):

def testURL( url ):
time.sleep( 0.01 )
t_multiproc['n_current'] = t_multiproc['n_current'] + 1

if _verbose <= 1:
sys.stdout.write( 'progress: %d/%d\r' % (t_multiproc['n_current'],t_multiproc['n_total']) )
t_multiproc['n_current'] = t_multiproc['n_current'] + 1
# t_multiproc['n_current'] = t_multiproc['n_current'] + 1

pool = Pool( 10 )
pool.map( partial(testPayload,url), t_payloads )
Expand All @@ -129,6 +130,7 @@ def testURL( url ):
def doTest( url, method='GET', post_params='' ):

realDoTest( [url,method,post_params] )

# t_realdotest.append( [url,method,post_params] )
return

Expand All @@ -142,7 +144,7 @@ def realDoTest( t_params ):

if _verbose <= 1:
sys.stdout.write( 'progress: %d/%d\r' % (t_multiproc['n_current'],t_multiproc['n_total']) )
t_multiproc['n_current'] = t_multiproc['n_current'] + 1
# t_multiproc['n_current'] = t_multiproc['n_current'] + 1

t_urlparse = urllib.parse.urlparse( url )
t_params = [ method, url, post_params, _cookies, t_urlparse.netloc ]
Expand Down Expand Up @@ -244,6 +246,15 @@ def realDoTest( t_params ):
fp.close()
else:
t_urls.append( args.urls )
else:
while True:
try:
url = input()
except EOFError:
break
else:
t_urls.append( url )

n_urls = len(t_urls)
if _verbose < 4:
sys.stdout.write( '%s[+] %d urls found: %s%s\n' % (fg('green'),n_urls,args.urls,attr(0)) )
Expand Down

0 comments on commit 1acffad

Please sign in to comment.