-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsnowcracker.py
64 lines (62 loc) · 2.49 KB
/
snowcracker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python3
import subprocess
import sys
import getopt
import time
import pyfiglet
from concurrent.futures import ThreadPoolExecutor
def main(argv):
print ( '''
____ ____ _
/ ___| _ __ _____ __/ ___|_ __ __ _ ___| | _____ _ __
\___ \| '_ \ / _ \ \ /\ / | | | '__/ _` |/ __| |/ / _ | '__|
___) | | | | (_) \ V V /| |___| | | (_| | (__| | __| |
|____/|_| |_|\___/ \_/\_/ \____|_| \__,_|\___|_|\_\___|_|
By:0xMohammed
''' )
wordlist = ''
textfile = ''
Message = ''
opt = ''
stripped_password = ''
compress = ''
try:
opts, args = getopt.getopt(argv,"hw:f:c:",["wordlist=","file=", 'compress='])
except getopt.GetoptError:
print('snowcracker by 0xmohammed \n -w,--wordlist <wordlist> \n -f,--file <textfile>\n -c,--uncompress <Y/N> To uncompress data from file N is default')
sys.exit()
for opt, arg in opts:
if opt == '-h':
print('snowcracker by 0xmohammed \n -w,--wordlist <wordlist> \n -f,--file <textfile>\n -c,--uncompress <Y/N> To uncompress data from file N is default')
sys.exit()
elif opt in ("-w", "--wordlist"):
wordlist = open(arg, "r")
elif opt in ("-f", "--file"):
textfile = arg
elif opt in ("-c", "--uncompress"):
compress = arg
if opt == '':
print('snowcracker by 0xmohammed \n -w,--wordlist <wordlist> \n -f,--file <textfile>\n -c,--uncompress <Y/N> To uncompress data from file N is default')
sys.exit()
print("Bruteforcing...Plz wait")
for password in wordlist:
stripped_password = ''.join(password.split())
if compress == 'Y' or compress == 'y' :
result = out = subprocess.Popen(['stegsnow', '-C', '-Q', '-p', stripped_password, textfile],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
else :
result = out = subprocess.Popen(['stegsnow', '-Q', '-p', stripped_password, textfile],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
stdout,stderr = out.communicate()
try:
Message = stdout.decode('ascii')
if Message.isprintable() == True :
print("Password : "+stripped_password+"\nMessage : "+ Message)
continue
except:
continue
if __name__ == "__main__":
executor = ThreadPoolExecutor(max_workers=10)
a = executor.submit(main(sys.argv[1:]))