Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
zR00t1 authored Aug 6, 2022
1 parent c3bccb8 commit a68c45c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions crack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from unrar import rarfile
import sys

def crack_pwd():
fp = rarfile.RarFile(rarFile)
with open(passDic,'r',encoding='utf-8') as f:
for str in f:
str = str.strip()
try:
fp.extractall('result', pwd=str.encode('gbk').decode('cp437'))
print('Success, password is:', str)
break
except Exception as e:
print(e)

if __name__ == "__main__":
try:
rarFile = sys.argv[1]
passDic = sys.argv[2]
crack_pwd()
except:
print('Author: zR00t1')
print('Usage: python crack.py encrypted.rar pass.txt')
print('Tips: The code of pass.txt file must be UTF-8')

0 comments on commit a68c45c

Please sign in to comment.