Skip to content

Sha1-brutefore #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions portscan/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 🗝 crypt

A command line python script which can Scan The open ports



#### Pre-requisites
* socket
* termcolor
* Python3

* install dependencies
```sh
$ sudo apt install python3
```

#### Usage
* Run The python file
```sh
$ python3 filename.py
```
* Enter the ip
```sh
$ 192.168.0.1
```
**note**
- `Green` means the port is open
16 changes: 16 additions & 0 deletions portscan/ports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import socket
from termcolor import colored

hold = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
socket.setdefaulttimeout(1)

host = input("Enter host IP address to scan: ")

def portscanner(port):
if(hold.connect_ex((host,port))):
print(colored("Port %d is closed!" % (port),'red'))
else:
print(colored("Port %d is open!" % (port),'green'))

for port in range(1,1001):
portscanner(port)
27 changes: 27 additions & 0 deletions sha1-bruteforce/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# bruteforcetool-sha1hash

A command line python script which can guess or bruteforce the sha1-Hash



#### Pre-requisites
*python3
*urlib
*https://github.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-password-list-top-10000.txt
```sh
$ sudo apt install python3
```

#### Usage
* Decrypt the hash using
```sh
$ python3 filename.py
```
* Enter the sha1 hash in input
```sh
$ d033e22ae348aeb5660fc2140aec35850c4da997
```
* This gives
```sh
$ admin
```
13 changes: 13 additions & 0 deletions sha1-bruteforce/sha1brute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from urllib.request import urlopen, hashlib

sha1hash = input("Please input the hash to crack.\n>") #Input given here must be a hash of type SHA1
LIST_OF_COMMON_PASSWORDS = str(urlopen('https://github.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'):
hashedGuess = hashlib.sha1(bytes(guess, 'utf-8')).hexdigest()
if hashedGuess == sha1hash:
print("The password is ", str(guess))
quit()
elif hashedGuess != sha1hash:
print("Password guess ",str(guess)," does not match, trying next...")
print("Password not in database, we'll get them next time.")