-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
import sys, os, time | ||
from urllib.request import urlopen, hashlib | ||
from modules.stylesheet.Styling import bc, sd | ||
banner, sBan, eBan, iBan = sd.banner.logo, sd.sBan, sd.eBan, sd.iBan | ||
|
||
class sha1_hash: | ||
def __init__(self, sha1_hash): | ||
self.sha1 = sha1_hash | ||
|
||
def crack(self, option): | ||
self.wopt = option | ||
if(self.wopt == 1): | ||
wordlist = str(input(bc.BC + ' Online Wordlist: ' + bc.GC)) | ||
if(wordlist != '' or wordlist != ' '): | ||
try: | ||
passwords = str(urlopen(wordlist).read(), 'utf-8') | ||
except Exception: | ||
os.system('clear') | ||
print(banner) | ||
print(eBan + bc.RC + ' ERROR: ' + bc.BC + 'Failed to open ' + bc.RC + wordlist) | ||
from brutoNova import brutoNova | ||
brutoNova() | ||
else: | ||
os.system('clear') | ||
print(banner) | ||
print(eBan + bc.RC + ' ERROR: ' + bc.BC + 'Wordlist value cannot be empty\n') | ||
from brutoNova import brutoNova | ||
brutoNova() | ||
else: | ||
wordlist = str(input(bc.BC + ' Local Wordlist: ' + bc.GC)) | ||
if(wordlist != '' or wordlist != ' '): | ||
try: | ||
passwords = open(wordlist).read() | ||
except Exception: | ||
os.system('clear') | ||
print(banner) | ||
print(eBan + bc.RC + ' ERROR: ' + bc.BC + 'Failed to open ' + bc.RC + wordlist) | ||
from brutoNova import brutoNova | ||
brutoNova() | ||
else: | ||
os.system('clear') | ||
print(banner) | ||
print(eBan + bc.RC + ' ERROR: ' + bc.BC + 'Wordlist value cannot be empty\n') | ||
from brutoNova import brutoNova | ||
brutoNova() | ||
|
||
os.system('clear') | ||
print(banner) | ||
print(bc.BC + ' SHA1: ' + bc.GC + self.sha1) | ||
print(bc.BC + ' Wordlist: ' + bc.GC + wordlist + '\n') | ||
match = '' | ||
for passwd in passwords.split('\n'): | ||
if(passwd != ''): | ||
pw = hashlib.sha1(bytes(passwd, 'utf-8')).hexdigest() | ||
if(self.sha1 == pw): | ||
print(sBan + ' Found a Match: ' + bc.GC + passwd) | ||
input(bc.BC + '\n Press Enter to Continue...') | ||
os.system('clear') | ||
print(banner) | ||
from brutoNova import brutoNova | ||
brutoNova() | ||
elif(self.sha1 != pw): | ||
print(eBan + ' No Match: ' + bc.RC + passwd) | ||
else: | ||
continue | ||
|
||
input(bc.BC + '\n Press Enter to Continue...') | ||
os.system('clear') | ||
print(banner) | ||
from brutoNova import brutoNova | ||
brutoNova() |