Merge pull request #456 from L1ghtn1ng/dev

Update Pentesttools module to make it faster
This commit is contained in:
J.Townsend 2020-06-28 19:37:28 +01:00 committed by GitHub
commit 0270abeaaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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),