Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

Add files via upload

Abdul Wahab Junaid87e39258c857
diff --git a/Python Tools/Hashlib/hash_file.py b/Python Tools/Hashlib/hash_file.py
new file mode 100644
index 0000000..7cb3606
--- /dev/null
+++ b/Python Tools/Hashlib/hash_file.py
@@ -0,0 +1,19 @@
+import hashlib
+
+file_name = input("Enter file name:")
+
+file = open(file_name, 'r')
+data = file.read().encode('utf-8')
+
+print("-- %s --" % file_name)
+print(hashlib.algorithms_available)
+
+for algorithm in hashlib.algorithms_available:
+ hash = hashlib.new(algorithm)
+ hash.update(data)
+ try:
+ hexdigest = hash.hexdigest()
+ except TypeError:
+ hexdigest = hash.hexdigest(128)
+
+ print("%s: %s" % (algorithm, hexdigest))
diff --git a/Python Tools/Hashlib/hash_password.py b/Python Tools/Hashlib/hash_password.py
new file mode 100644
index 0000000..aa82ec6
--- /dev/null
+++ b/Python Tools/Hashlib/hash_password.py
@@ -0,0 +1,6 @@
+import hashlib
+
+password = input("Password:")
+hash_password = hashlib.sha512(password.encode())
+print("The hash password is:")
+print(hash_password.hexdigest())
diff --git a/Python Tools/Hashlib/testing_algorithms.py b/Python Tools/Hashlib/testing_algorithms.py
new file mode 100644
index 0000000..40c8baf
--- /dev/null
+++ b/Python Tools/Hashlib/testing_algorithms.py
@@ -0,0 +1,11 @@
+import hashlib
+
+for algorithm in hashlib.algorithms_guaranteed:
+ print(algorithm)
+ h = hashlib.new(algorithm)
+ h.update("password".encode())
+ try:
+ print(h.hexdigest())
+ except TypeError:
+ print(h.hexdigest(128))
+