Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in fileList:
- fileName = "/work/asheville/vulnerable/"+i
- fileName = fileName[:-1]
- temp = open(fileName, "r")
- link = temp.readline()
- link = link[:10]
- old_file = os.path.join("/work/asheville/vulnerable", i)
- new_file = os.path.join("/work/asheville/output", fileName, "-wpscan.txt")
- print old_file
- print new_file
- os.rename(old_file, new_file)
- infoBatch.append(InfoPack(null,link,new_file,null,null))
- ----- RESULTS IN -----
- omi@sec2:/work/asheville$ ./GetInfo.py
- /work/asheville/vulnerable/wpscan.2019.06.11-21.13.10.txt
- /work/asheville/vulnerable/wpscan.2019.06.11-21.13.10.txt/-wpscan.txt
- Traceback (most recent call last):
- File "./GetInfo.py", line 53, in <module>
- os.rename(old_file, new_file)
- OSError: [Errno 20] Not a directory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement