def nopass(url, string, value):
    #setpass = bytes(string, 'utf-8')
    #hash_object = sha1.sha1(setpass)
    nff = 0
    sha1hash = string
    LIST_OF_COMMON_PASSWORDS = str(
        urlopen(
            'https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-password-list-top-10000.txt'
        ).read(), 'utf-8')
    for guess in LIST_OF_COMMON_PASSWORDS.split('\n'):
        #msg = bytearray("123456", 'UTF-8')

        # custom_sha1_digest = sha1.sha1(bytes(msg))

        hashedGuess = sha1.sha1(bytes(guess, 'utf-8'))
        ns2 = nmd5.new(guess)
        require = "789"
        if guess == "street":
            print(ns2.hexdigest)
            print(sha1hash)
        if value == 1:
            require = hashedGuess
        if value == 2:
            require = ns2.hexdigest()
        if require == sha1hash:
            br = mechanize.Browser()
            br.set_handle_robots(False)
            br.open(url)
            br.select_form(name="x")
            br["id"] = "12"
            br["password"] = str(guess)
            res = br.submit()
            content = res.read()
            with open("mechanize_results.html", "wb") as f:
                f.write(content)
                T.insert(END, content)
            T1.insert(END, str(guess))
            nff = 1

        elif require != sha1hash:
            #T.insert(END, "Password guess "+str(guess)+" does not match, trying next...\n")
            if (nff == 0):
                print("Password guess ", str(guess),
                      " does not match, trying next...")
    if nff == 0:
        T1.insert(END, "NOT FOUND")
        print("Password not in database, we'll get them next time.")
Beispiel #2
0
 def setUp(self):
   self.m = nmd5.new()
   self.t1 = self.m._NMD5__pad(self.m._NMD5__toBinaryString("test1"))
   self.t2 = self.m._NMD5__pad(self.m._NMD5__toBinaryString("a"*66))
Beispiel #3
0
 def setUp(self):
   self.TH = TestHelper()
   self.m = nmd5.new()
Beispiel #4
0
 def setUp(self):
   import nmd5
   import hashlib
   import random
   self.m = hashlib.md5()
   self.n = nmd5.new()
Beispiel #5
0
 def setUp(self):
   self.m = nmd5.new("asd")
   self.n = self.m.copy()
    print(guess_pw)
print("\nBCRYPT:\n")
for i in range(3):
    hashed = bcrypt.hashpw(setpass, bcrypt.gensalt(10))

d3a9fb075d49be97f6eaec99399d8cfdd38c7361
1f4a9685e37e4f940d07a9f6b43dc83c
1f4a9685e37e4f940d07a9f6b43dc83c

import nmd5
import unittest
import random
from linkedlist import *
from random import randint

ns2=nmd5.new("street")
print(ns2.hexdigest())


topFrame=Frame(root)
topFrame.pack()
bottomFrame=Frame(root)
bottomFrame.pack(side=BOTTOM)
button1= Button(topFrame,text="Button 1",fg="red")
button2= Button(topFrame,text="Button 2",fg="blue")
button3= Button(topFrame,text="Button 3",fg="green")
button4= Button(bottomFrame,text="Button 4",fg="red")
button1.pack(side=LEFT)
button2.pack(side=LEFT)
button3.pack(side=LEFT)
button4.pack()
Beispiel #7
0
Datei: test.py Projekt: narck/md5
	def setUp(self):
		self.m = nmd5.new()
		self.t1 = self.m._NMD5__pad(self.m._NMD5__toBinaryString("test1"))
		self.t2 = self.m._NMD5__pad(self.m._NMD5__toBinaryString("a"*66))
Beispiel #8
0
Datei: test.py Projekt: narck/md5
	def setUp(self):
		self.TH = TestHelper()
		self.m = nmd5.new()
Beispiel #9
0
Datei: test.py Projekt: narck/md5
	def setUp(self):
		import nmd5
		import hashlib
		import random
		self.m = hashlib.md5()
		self.n = nmd5.new()
Beispiel #10
0
Datei: test.py Projekt: narck/md5
	def setUp(self):
		self.m = nmd5.new("asd")
		self.n = self.m.copy()