Sep-24-2018, 01:56 AM
I decided for my first Python project I would make a program that broke up a text file into individual passwords that would be attempted on a rar file until the solution was found. This is what I came up with:
#!/usr/bin/env python3
import os
with open("home/me/pwds","r") as a:
for lines in a:
for words in lines.split():
os.system("unrar x -y -p{} /home/me/documents/target.rar".format(words)
The prog.py was given execute permissions, and it throws this error when run as "sudo python prog.py":
File "program.py", line 12
^
Syntax error: invalid syntax
Any help appreciated.
#!/usr/bin/env python3
import os
with open("home/me/pwds","r") as a:
for lines in a:
for words in lines.split():
os.system("unrar x -y -p{} /home/me/documents/target.rar".format(words)
The prog.py was given execute permissions, and it throws this error when run as "sudo python prog.py":
File "program.py", line 12
^
Syntax error: invalid syntax
Any help appreciated.