diff --git a/tests/discovery/test_githubcode.py b/tests/discovery/test_githubcode.py index d4b00e5a..f4c00c5d 100644 --- a/tests/discovery/test_githubcode.py +++ b/tests/discovery/test_githubcode.py @@ -112,4 +112,4 @@ class TestSearchGithubCode: assert(None is test_class_instance.next_page_or_end(test_result)) if __name__ == '__main__': - pytest.main() \ No newline at end of file + pytest.main() diff --git a/tests/test_myparser.py b/tests/test_myparser.py index 72cd6243..0810f37c 100755 --- a/tests/test_myparser.py +++ b/tests/test_myparser.py @@ -16,4 +16,4 @@ class TestMyParser(object): if __name__ == '__main__': - pytest.main() \ No newline at end of file + pytest.main() diff --git a/theHarvester/discovery/__init__.py b/theHarvester/discovery/__init__.py index 279dab8c..8257fb5b 100644 --- a/theHarvester/discovery/__init__.py +++ b/theHarvester/discovery/__init__.py @@ -8,6 +8,7 @@ __all__ = ['baidusearch', 'dogpilesearch', 'duckduckgosearch', 'exaleadsearch', + 'githubcode', 'googlesearch', 'huntersearch', 'intelxsearch', diff --git a/theHarvester/lib/graphs.py b/theHarvester/lib/graphs.py index 42005d8d..480555be 100644 --- a/theHarvester/lib/graphs.py +++ b/theHarvester/lib/graphs.py @@ -142,7 +142,7 @@ class BarGraph: # debug mode: 0 = off, 1 = on; just views some extra information self.debug = 0 - #------------------------------------------------------------------------- + # ------------------------------------------------------------------------- # Default bar colors; only used if barColors isn't set. __colors = ( @@ -658,8 +658,7 @@ class BarGraph: m = False if m or not i: - label = ( - lcnt < len(r)) and r[lcnt].strip() or str(i + 1) + label = (lcnt < len(r)) and r[lcnt].strip() or str(i + 1) graph += '' if len(r): diff --git a/theHarvester/lib/hostchecker.py b/theHarvester/lib/hostchecker.py index cb0bca88..0c3997b1 100644 --- a/theHarvester/lib/hostchecker.py +++ b/theHarvester/lib/hostchecker.py @@ -20,6 +20,6 @@ class Checker: res = socket.gethostbyname(x) res = str(res) self.realhosts.append(x + ':' + res) - except Exception as e: + except Exception: self.realhosts.append(x + ':' + 'empty') return self.realhosts diff --git a/theHarvester/lib/reportgraph.py b/theHarvester/lib/reportgraph.py index 7a5aa121..7c73cbb1 100644 --- a/theHarvester/lib/reportgraph.py +++ b/theHarvester/lib/reportgraph.py @@ -83,12 +83,12 @@ except Exception: name='email') data = [trace0, trace1, trace2, trace3, trace4] - layout = dict(title='Scanning history for ' + domain, xaxis=dict(title='Date'), yaxis=dict(title='Results')) + layout = dict(title=f'Scanning history for {domain}', xaxis=dict(title='Date'), + yaxis=dict(title='Results')) scatterchartcode = plotly.offline.plot({ 'data': data, - 'layout': layout}, auto_open=False, include_plotlyjs=False, filename='report.html', output_type='div') + 'layout': layout}, auto_open=False, include_plotlyjs=False, filename='report.html', + output_type='div') return scatterchartcode except Exception as e: print(f'Error generating HTML for the historical graph for domain: {e}') - -