Skip to content

Commit 54a9d6c

Browse files
committed
update formatting
1 parent b60fe26 commit 54a9d6c

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

github-dork.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import github3 as github
66
import os
77
import argparse
8-
from time import sleep
98

109

1110
gh_user = os.getenv('GH_USER', None)
@@ -45,14 +44,15 @@ def search(repo_to_search=None, user_to_search=None, gh_dorks_file=None):
4544
'score': search_result.score,
4645
'url': search_result.html_url
4746
}
48-
print('''
49-
Found result for {dork}
50-
Text matches: {text_matches}
51-
File path: {path}
52-
Score/Relevance: {score}
53-
URL of File: {url}
54-
'''.format(**fmt_args)
55-
)
47+
result = '\n'.join([
48+
'Found result for {dork}',
49+
'Text matches: {text_matches}',
50+
'File path: {path}',
51+
'Score/Relevance: {score}',
52+
'URL of File: {url}',
53+
''
54+
]).format(**fmt_args)
55+
print(result)
5656
except github.exceptions.ForbiddenError as e:
5757
print(e)
5858
return
@@ -74,14 +74,14 @@ def main():
7474
description='Search github for github dorks',
7575
epilog='Use responsibly, Enjoy pentesting'
7676
)
77-
77+
7878
parser.add_argument(
7979
'-v',
8080
'--version',
8181
action='version',
8282
version='%(prog)s 0.1.0'
8383
)
84-
84+
8585
group = parser.add_mutually_exclusive_group(required=True)
8686
group.add_argument(
8787
'-u',
@@ -90,7 +90,7 @@ def main():
9090
action='store',
9191
help='Github user/org to search within. Eg: techgaun'
9292
)
93-
93+
9494
group.add_argument(
9595
'-r',
9696
'--repo',

0 commit comments

Comments
 (0)