diff --git a/portscan/README.md b/portscan/README.md new file mode 100644 index 0000000..c552621 --- /dev/null +++ b/portscan/README.md @@ -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 \ No newline at end of file diff --git a/portscan/ports.py b/portscan/ports.py new file mode 100644 index 0000000..304748e --- /dev/null +++ b/portscan/ports.py @@ -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) \ No newline at end of file diff --git a/sha1-bruteforce/README.md b/sha1-bruteforce/README.md new file mode 100644 index 0000000..8c8862f --- /dev/null +++ b/sha1-bruteforce/README.md @@ -0,0 +1,27 @@ +# bruteforcetool-sha1hash + +A command line python script which can guess or bruteforce the sha1-Hash + + + +#### Pre-requisites +*python3 +*urlib +*https://raw.githubusercontent.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 +``` diff --git a/sha1-bruteforce/sha1brute.py b/sha1-bruteforce/sha1brute.py new file mode 100644 index 0000000..1294313 --- /dev/null +++ b/sha1-bruteforce/sha1brute.py @@ -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://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'): + 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.") \ No newline at end of file