SHARE
TWEET

Untitled

a guest Jun 16th, 2019 117 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for i in fileList:
  2.         fileName = "/work/asheville/vulnerable/"+i
  3.         fileName = fileName[:-1]
  4.         temp = open(fileName, "r")
  5.         link = temp.readline()
  6.         link = link[:10]
  7.         old_file = os.path.join("/work/asheville/vulnerable", i)
  8.         new_file = os.path.join("/work/asheville/output", fileName, "-wpscan.txt")
  9.         print old_file
  10.         print new_file
  11.         os.rename(old_file, new_file)
  12.         infoBatch.append(InfoPack(null,link,new_file,null,null))
  13.  
  14. ----- RESULTS IN -----
  15.  
  16. omi@sec2:/work/asheville$ ./GetInfo.py
  17. /work/asheville/vulnerable/wpscan.2019.06.11-21.13.10.txt
  18.  
  19. /work/asheville/vulnerable/wpscan.2019.06.11-21.13.10.txt/-wpscan.txt
  20. Traceback (most recent call last):
  21.   File "./GetInfo.py", line 53, in <module>
  22.     os.rename(old_file, new_file)
  23. OSError: [Errno 20] Not a directory
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top