I want test to open a winrar password protected file, testing with dictionay of words. This is my code, but it don't work can any help me ? thanks
import subprocess
def extractFile(rFile, password):
try:
subprocess.call(['c:\\mio\\unrar\\unrar.exe -p'+password+'x C:\\mio\\unrar\\'+rFile,'shell=True'])
return password
except:
return
def main():
rFile = "c:\\mio\\unrar\msploit.rar"
passFile = open("C:\\mio\\unrar\\dic.txt")
for line in passFile.readlines():
password = line.strip('\n')
guess = extractFile(rFile, password)
print(password)
if guess:
print '[+] Password = ' + password + '\n'
break
if __name__ == '__main__':
main()