We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7e4c68 commit 27f5385Copy full SHA for 27f5385
github-dork.py
@@ -7,7 +7,7 @@
7
import time
8
import feedparser
9
from copy import copy
10
-from sys import stderr
+from sys import stderr, prefix
11
12
gh_user = os.getenv('GH_USER', None)
13
gh_pass = os.getenv('GH_PWD', None)
@@ -87,7 +87,12 @@ def search(repo_to_search=None,
87
output_filename=None):
88
89
if gh_dorks_file is None:
90
- gh_dorks_file = 'github-dorks.txt'
+ for path_prefix in ['.', os.path.join(prefix, 'github-dorks/')]:
91
+ filename = os.path.join(path_prefix, 'github-dorks.txt')
92
+ if os.path.isfile(filename):
93
+ gh_dorks_file = filename
94
+ break
95
+
96
if not os.path.isfile(gh_dorks_file):
97
raise Exception('Error, the dorks file path is not valid')
98
if user_to_search:
0 commit comments