Skip to content

Commit

Permalink
use script-relative path to find index.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jgor committed Feb 14, 2019
1 parent 3bb35a1 commit 9e6fcaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cc.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def crawlIndex(domain, index):
print('[!] Error reading index')
pass

def readIndexFile(index_filename="index.txt"):
def readIndexFile(index_filename=os.path.join(os.path.dirname(os.path.abspath(__file__)), "index.txt")):
global indexes
#check when the index file was last updated
path = pathlib.Path(index_filename)
Expand Down Expand Up @@ -120,4 +120,4 @@ def updateIndexFile():
print('[-] Writing to file ...')
result.write(out)

print('[!] Done, file written: ./' + output)
print('[!] Done, file written: ./' + output)

0 comments on commit 9e6fcaa

Please sign in to comment.