mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-22 16:26:34 +08:00
Merge pull request #456 from L1ghtn1ng/dev
Update Pentesttools module to make it faster
This commit is contained in:
commit
0270abeaaa
|
@ -2,7 +2,6 @@
|
|||
from theHarvester.lib.core import *
|
||||
import json
|
||||
import time
|
||||
from timeit import default_timer as timer
|
||||
|
||||
|
||||
class SearchPentestTools:
|
||||
|
@ -18,17 +17,7 @@ def __init__(self, word):
|
|||
self.proxy = False
|
||||
|
||||
async def poll(self, scan_id):
|
||||
start = timer()
|
||||
clock = 300
|
||||
while True:
|
||||
current_time = timer()
|
||||
if current_time - start >= clock:
|
||||
status = input(f'Pentesttools scan has reached {clock // 60 } minute mark would you like to stop scan: '
|
||||
f'y/n')
|
||||
clock *= 2
|
||||
if status == 'y':
|
||||
return self.total_results
|
||||
|
||||
time.sleep(3)
|
||||
# Get the status of our scan
|
||||
scan_status_data = {
|
||||
|
@ -74,8 +63,10 @@ async def do_search(self):
|
|||
'op': 'start_scan',
|
||||
'tool_id': 20,
|
||||
'tool_params': {
|
||||
'target': f'{self.word}'},
|
||||
"scan_type": "quick"
|
||||
'target': f'{self.word}',
|
||||
'web_details': 'off',
|
||||
'do_smart_search': 'off'
|
||||
}
|
||||
}
|
||||
responses = await AsyncFetcher.post_fetch(url=self.api,
|
||||
data=json.dumps(subdomain_payload),
|
||||
|
|
Loading…
Reference in a new issue