mirror of
https://github.com/laramies/theHarvester.git
synced 2025-02-24 14:32:57 +08:00
flake8 changes/ lgtm fixes
This commit is contained in:
parent
357311474f
commit
4db2d1425e
7 changed files with 13 additions and 18 deletions
|
@ -1,3 +1,3 @@
|
|||
[flake8]
|
||||
ignore = E501, F405, F403, E402
|
||||
exclude = theHarvester/discovery/DNS/*,theHarvester/discovery/IPy.py,theHarvester/discovery/s3_scanner.py,theHarvester/discovery/dnssearch.py
|
||||
exclude = theHarvester/discovery/IPy.py,theHarvester/discovery/s3_scanner.py
|
|
@ -692,9 +692,8 @@ def entry_point():
|
|||
start()
|
||||
except KeyboardInterrupt:
|
||||
print('\n\n\033[93m[!] ctrl+c detected from user, quitting.\n\n \033[0m')
|
||||
except Exception:
|
||||
import traceback
|
||||
print(traceback.print_exc())
|
||||
except Exception as error_entry_point:
|
||||
print(error_entry_point)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import os
|
||||
import sys
|
||||
import dns.resolver
|
||||
|
||||
# TODO: need big focus on performance and results parsing, now does the basic.
|
||||
|
||||
|
||||
|
||||
class DnsForce:
|
||||
|
||||
def __init__(self, domain, dnsserver, verbose=False):
|
||||
|
@ -13,7 +13,7 @@ def __init__(self, domain, dnsserver, verbose=False):
|
|||
self.verbose = verbose
|
||||
try:
|
||||
f = open(self.file, 'r')
|
||||
except BaseException:
|
||||
except Exception:
|
||||
print('Error opening DNS dictionary file.')
|
||||
sys.exit()
|
||||
self.list = f.readlines()
|
||||
|
@ -28,17 +28,16 @@ def run(self, host):
|
|||
try:
|
||||
answer = dns.resolver.query(hostname, 'A')
|
||||
print(answer.canonical_name)
|
||||
return answer.canonical_name # TODO: need rework all this results
|
||||
|
||||
return answer.canonical_name # TODO: need rework all this results
|
||||
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def process(self):
|
||||
results = []
|
||||
for x in self.list:
|
||||
host = self.run(x)
|
||||
if host is not None:
|
||||
#print(' : ' + host.split(':')[1])
|
||||
# print(' : ' + host.split(':')[1])
|
||||
results.append(host)
|
||||
return results
|
||||
|
|
@ -77,8 +77,6 @@ def crawl(self, text):
|
|||
return tmp
|
||||
except Exception as e:
|
||||
print(f'Exception occurred: {e}')
|
||||
import traceback as t
|
||||
print(t.print_exc())
|
||||
return []
|
||||
|
||||
def get_emails(self):
|
||||
|
|
|
@ -23,7 +23,6 @@ def port_scanner(self, host, ports):
|
|||
connect.close()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pass
|
||||
self.lock.release()
|
||||
return openports
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
__all__ = ['markup', 'graphs', 'hostchecker']
|
||||
__all__ = ['hostchecker']
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
try:
|
||||
db = stash.stash_manager()
|
||||
db.do_init()
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as error:
|
||||
print(f'{error}')
|
||||
|
||||
class GraphGenerator:
|
||||
|
||||
|
|
Loading…
Reference in a new issue