Skip to content

Commit

Permalink
spiderfoot: move dicts to spiderfoot/dicts/ (smicallef#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoles committed Jun 27, 2021
1 parent 550733f commit 41e0545
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions modules/sfp_dnsbrute.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,18 @@ def setup(self, sfc, userOpts=dict()):
for opt in list(userOpts.keys()):
self.opts[opt] = userOpts[opt]

dicts_dir = f"{self.sf.myPath()}/spiderfoot/dicts/"
cslines = list()
if self.opts['commons']:
cs = open(self.sf.myPath() + "/dicts/subdomains.txt", 'r')
cs = open(f"{dicts_dir}/subdomains.txt", 'r')
cslines = cs.readlines()
for s in cslines:
s = s.strip()
self.sublist[s] = True

ttlines = list()
if self.opts['top10000']:
tt = open(self.sf.myPath() + "/dicts/subdomains-10000.txt", 'r')
tt = open(f"{dicts_dir}/subdomains-10000.txt", 'r')
ttlines = tt.readlines()
for s in ttlines:
s = s.strip()
Expand Down
4 changes: 2 additions & 2 deletions sflib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ def dictwords(self):

for d in dicts:
try:
with io.open(self.myPath() + "/dicts/ispell/" + d + ".dict", 'r', encoding='utf8', errors='ignore') as wdct:
with io.open(f"{self.myPath()}/spiderfoot/dicts/ispell/{d}.dict", 'r', encoding='utf8', errors='ignore') as wdct:
dlines = wdct.readlines()
except BaseException as e:
self.debug(f"Could not read dictionary: {e}")
Expand All @@ -1185,7 +1185,7 @@ def dictnames(self):

for d in dicts:
try:
wdct = open(self.myPath() + "/dicts/ispell/" + d + ".dict", 'r')
wdct = open(f"{self.myPath()}/spiderfoot/dicts/ispell/{d}.dict", 'r')
dlines = wdct.readlines()
wdct.close()
except BaseException as e:
Expand Down
Empty file added spiderfoot/dicts/__init__.py
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 41e0545

Please sign in to comment.