We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b83be21 + 178078d commit 0c7b532Copy full SHA for 0c7b532
password_cracker.py
@@ -8,7 +8,22 @@
8
9
# Description : Old school password cracker using python
10
11
-import crypt # Import the module
+from sys import platform as _platform
12
+
13
+# Check the current operating system to import the correct version of crypt
14
+if _platform == "linux" or _platform == "linux2":
15
+ import crypt # Import the module
16
+elif _platform == "darwin":
17
+ # Mac OS X
18
+ import crypt
19
+elif _platform == "win32":
20
+ # Windows
21
+ try:
22
+ import fcrypt # Try importing the fcrypt module
23
+ except ImportError:
24
+ print 'Please install fcrypt if you are on Windows'
25
26
27
28
def testPass(cryptPass): # Start the function
29
salt = cryptPass[0:2]
0 commit comments