Guest User

Untitled

a guest
Jan 16th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. with open ("iplist.txt", "r") as file:
  2. filecontents = file.read()
  3. for line in filecontents.split('n'):
  4. filename = (line) + ".txt "
  5. command = "nmap -O -oG " + ".\ips\" + (filename) + (line)
  6. print(command)
  7. print(filename)
  8. strlen = int (len(filename))
  9. print(strlen)
  10. compareline = line[:4]
  11. print(compareline)
  12. if compareline == beginline: #beginline is declared as 10.9 earlier in the file
  13. print("Testing 1..2...")
  14. os.system(command)
  15. filenameforos = (line + ".txt")
  16. #detailedosdetection = open(filenameforos)
  17. #next(filecontents)
  18. else:
  19. print("Testing...")
  20. del line
  21. #next(StopIteration)
  22.  
  23. 10.9.10.38
  24. 10.9.10.45
  25. 10.9.11.10
  26. #extra line
Add Comment
Please, Sign In to add comment