changeset 705:dc8f88270f6a draft

SpliceX update: pyinstall added
author d3v11 <d3v11@d3v11.ano>
date Sat, 29 Oct 2011 10:17:30 -0400
parents db9ea3bb0e3a
children de6fd9fc14e5
files contrib/splicex.tgz contrib/splicex/README contrib/splicex/configure contrib/splicex/src/deshadow.pyx contrib/splicex/src/make.in contrib/splicex/src/pymake.in contrib/splicex/src/splicex-deshadow.py contrib/splicex/src/splicex.py contrib/splicex/src/splicex.pyx
diffstat 9 files changed, 560 insertions(+), 421 deletions(-) [+]
line wrap: on
line diff
Binary file contrib/splicex.tgz has changed
--- a/contrib/splicex/README	Fri Oct 28 22:04:07 2011 -0400
+++ b/contrib/splicex/README	Sat Oct 29 10:17:30 2011 -0400
@@ -21,33 +21,71 @@
 
 	d3v11 <d3v11@d3v11.ano>
 
-DEPENDS ON:
 
-	python (>=2.6), python-dev(>=2.6), cython (>=0.12.1), 
-	gcc (>=4.4.3), bash (>=4.1.5), man (>=2.5.7)
 
 (UN)INSTALL:
 
-	SOURCE:
+	You may optionally install splicex with cython. Doing so takes
+	longer to install because of compile times but splicex will
+	also be 20% to 35% faster, depending on your system. I recommend
+	this option if you intend on putting splicex to long-term use.
+	If your goal is simply to test, try, and/or debug splicex then
+	using the pythonic install will be more practical.
+
+	DEPENDS ON:
+
+		python (>=2.6), python-dev(>=2.6), cython (>=0.12.1), 
+		gcc (>=4.4.3), bash (>=4.1.5), man (>=2.5.7)
+
+		SOURCE:
 
-		./configure <python[version]>
-		make compile
-		make install
+			./configure <python[version]>
+			make compile
+			make install
+
+		DEBIAN/UBUNTU:
 
-	DEBIAN/UBUNTU:
+			./configure <python[version]>
+			make compile
+			make install-deb
+
+		UNINSTALL:
+	
+			SOURCE:
+		 		make uninstall
 
-		./configure <python[version]>
-		make compile
-		make install-deb
+			DEBIAN/UBUNTU:
+		 		apt-get remove splicex
+
+PYTHONIC (UN)INSTALL:
+
+	You make optionally install splicex as pure python.
+	Install times are quick but splicex will be 20% to 35%
+	slower than compiling an executable binary with the
+	cython + gcc option above. I recommend using this option
+	if you simply want to test, try, and/or debug splicex.
+
+	DEPENDS ON:
 
-	UNINSTALL:
+		python (>=2.6), bash (>=4.1.5), man (>=2.5.7)
+
+		SOURCE:
+
+			./configure <python[version]> --no-compile
+			make pyinstall
+
+		DEBIAN/UBUNTU:
+
+			./configure <python[version]> --no-compile
+			make pyinstall-deb
+
+		UNINSTALL:
 	
-		source:
-		 make uninstall
+			SOURCE:
+		 		make uninstall
 
-		debian/ubuntu:
-		 apt-get remove splicex
-
+			DEBIAN/UBUNTU:
+		 		apt-get remove splicex
 
 TOOLS:
 
--- a/contrib/splicex/configure	Fri Oct 28 22:04:07 2011 -0400
+++ b/contrib/splicex/configure	Sat Oct 29 10:17:30 2011 -0400
@@ -1,11 +1,16 @@
 #!/bin/bash
 if [ -z "$1" ]; then
- echo 'usage: ./configure <python[version]>'
+ echo 'usage: ./configure <python[version]> {optional: <--no-compile>}'
+ exit 1
+fi
+
+if [ -n "$2" ] && [[ "$2" != *--no-compile* ]]; then
+ echo 'usage: ./configure <python[version]> {optional: <--no-compile>}'
  exit 1
 fi
 
 echo -e 'checking dependencies: '
-echo -ne "      checking for python as <$1>..."
+echo -ne "	checking for python as <$1>..."
 if which `which "$1"` >/dev/null; then
  PYPATH=`which "$1"`
  echo -ne ' OK'
@@ -24,32 +29,52 @@
  exit 1
 fi
 
-echo -ne '	checking for cython...'
-if which cython >/dev/null; then
- echo -ne ' OK'
- echo
-else
- echo -ne ' FAILED'
- exit 1
+if [ -z "$2" ]; then
+ echo -ne '	checking for cython...'
+ if which cython >/dev/null; then
+  echo -ne ' OK'
+  echo
+ else
+  echo -ne ' FAILED'
+  exit 1
+ fi
 fi
 
-echo -ne '	checking for gcc...'
-if which gcc >/dev/null; then
- echo -ne ' OK'
- echo
-else
- echo -ne ' FAILED'
- exit 1
+if [ -z "$2" ]; then
+ echo -ne '	checking for gcc...'
+ if which gcc >/dev/null; then
+  echo -ne ' OK'
+  echo
+ else
+  echo -ne ' FAILED'
+  exit 1
+ fi
 fi
 
 echo
 echo  -ne "configuring splicex: "
 echo
-echo -e "       python version == $1"
-echo -e "       interpreter path == $PYPATH"
-echo -e "       compiler flags == gcc -I/usr/include/$1"
-sed -e s^PYTHON^"$1"^g src/make.in >Makefile
-sed -e s^PYTHON^"$PYPATH"^g src/splicex.py >build/splicex
-sed -e s^PYTHON^"$PYPATH"^g src/splicex-deshadow.py >build/splicex-deshadow
+echo -e "	python version == $1"
+echo -e "	interpreter path == $PYPATH"
+if [ -z "$2" ]; then
+ echo -e "	compiler flags == gcc -I/usr/include/$1"
+fi
+echo
+if [ -z "$2" ]; then
+ sed -e s^PYTHON^"$PYPATH"^g src/splicex.py >build/splicex || exit 1
+ sed -e s^PYTHON^"$PYPATH"^g src/splicex-deshadow.py >build/splicex-deshadow || exit 1
+fi
+sed -e s^PYTHON^"$PYPATH"^g src/splicex.pyx >build/splicex.pyx || exit 1
+sed -e s^PYTHON^"$PYPATH"^g src/deshadow.pyx >build/deshadow.pyx || exit 1
+echo -ne "	generating Makefile..."
+if [ -z "$2" ]; then
+ sed -e s^PYTHON^"$1"^g src/make.in >Makefile || exit 1
+ echo -ne ' DONE'
+ echo
+else
+ sed -e s^PYTHON^"$1"^g src/pymake.in >Makefile || exit 1
+ echo -ne ' DONE'
+ echo
+fi
 echo
 echo -e 'splicex configured'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/splicex/src/deshadow.pyx	Sat Oct 29 10:17:30 2011 -0400
@@ -0,0 +1,7 @@
+#!PYTHON
+import sys; sys.tracebacklimit = 0
+from crypt import crypt
+TestHash = crypt(sys.argv[1], sys.argv[2])
+HashValue = sys.argv[3]
+if TestHash.__contains__(HashValue):
+ print("SHADOW CRACKED")
--- a/contrib/splicex/src/make.in	Fri Oct 28 22:04:07 2011 -0400
+++ b/contrib/splicex/src/make.in	Sat Oct 29 10:17:30 2011 -0400
@@ -1,10 +1,13 @@
 compile:
-	cython src/splicex.pyx -o build/splicex.c
+	cython build/deshadow.pyx -o build/deshadow.c
+	gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/PYTHON -c build/deshadow.c -o build/deshadow.o
+	gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/deshadow.o -o build/deshadow.so
+
+	cython build/splicex.pyx -o build/splicex.c
 	gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/PYTHON -c build/splicex.c -o build/splicex.o
 	gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/splicex.o -o build/splicex.so
 
 install-deb:
-	make preinstall
 	mkdir DEBIAN/splicex
 	mkdir DEBIAN/splicex/DEBIAN
 	mkdir DEBIAN/splicex/usr
@@ -13,7 +16,8 @@
 	mkdir DEBIAN/splicex/etc/splicex
 	cp DEBIAN/control DEBIAN/splicex/DEBIAN/control
 	cp build/splicex DEBIAN/splicex/usr/bin/splicex
-	cp build/splicex.so /etc/splicex/splicex.so
+	cp build/splicex.so DEBIAN/etc/splicex/splicex.so
+	cp build/deshadow.so DEBIAN/etc/splicex/deshadow.so
 	cp build/splicex-deshadow DEBIAN/splicex/usr/bin/splicex-deshadow
 	chmod +x DEBIAN/splicex/usr/bin/splicex
 	chmod +x DEBIAN/splicex/usr/bin/splicex-deshadow
@@ -36,6 +40,7 @@
 	mkdir /etc/splicex
 	cp build/splicex /usr/bin/splicex
 	cp build/splicex.so /etc/splicex/splicex.so
+	cp build/deshadow.so /etc/splicex/deshadow.so
 	cp build/splicex-deshadow /usr/bin/splicex-deshadow
 	chmod +x /usr/bin/splicex
 	chmod +x /usr/bin/splicex-deshadow
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/splicex/src/pymake.in	Sat Oct 29 10:17:30 2011 -0400
@@ -0,0 +1,62 @@
+pyinstall-deb:
+	mkdir DEBIAN/splicex
+	mkdir DEBIAN/splicex/DEBIAN
+	mkdir DEBIAN/splicex/usr
+	mkdir DEBIAN/splicex/usr/bin
+	mkdir DEBIAN/splicex/etc
+	mkdir DEBIAN/splicex/etc/splicex
+	cp DEBIAN/control DEBIAN/splicex/DEBIAN/control
+	cp build/splicex.pyx DEBIAN/splicex/usr/bin/splicex
+	cp build/deshadow.pyx DEBIAN/splicex/usr/bin/splicex-deshadow
+	chmod +x DEBIAN/splicex/usr/bin/splicex
+	chmod +x DEBIAN/splicex/usr/bin/splicex-deshadow
+	cp src/splicex.list DEBIAN/splicex/etc/splicex/splicex.list
+	cp src/manual DEBIAN/splicex/etc/splicex/splicex.1
+	gzip DEBIAN/splicex/etc/splicex/splicex.1
+	cp src/splicex.L DEBIAN/splicex/etc/splicex/splicex.L
+	cp src/splicex.N DEBIAN/splicex/etc/splicex/splicex.N
+	cp src/splicex.S DEBIAN/splicex/etc/splicex/splicex.S
+	cp src/splicex.LN DEBIAN/splicex/etc/splicex/splicex.LN
+	cp src/splicex.LS DEBIAN/splicex/etc/splicex/splicex.LS
+	cp src/splicex.NS DEBIAN/splicex/etc/splicex/splicex.NS
+	cp src/splicex.ALL DEBIAN/splicex/etc/splicex/splicex.ALL
+	dpkg-deb --build DEBIAN/splicex
+	dpkg -i DEBIAN/splicex.deb
+	rm -rf DEBIAN/splicex DEBIAN/splicex.deb
+
+pyinstall:
+	make preinstall
+	mkdir /etc/splicex
+	cp build/splicex.pyx /usr/bin/splicex
+	cp build/deshadow.pyx /usr/bin/splicex-deshadow
+	chmod +x /usr/bin/splicex
+	chmod +x /usr/bin/splicex-deshadow
+	cp src/splicex.list /etc/splicex/splicex.list
+	cp src/manual /etc/splicex/splicex.1
+	gzip /etc/splicex/splicex.1
+	cp src/splicex.L /etc/splicex/splicex.L
+	cp src/splicex.N /etc/splicex/splicex.N
+	cp src/splicex.S /etc/splicex/splicex.S
+	cp src/splicex.LN /etc/splicex/splicex.LN
+	cp src/splicex.LS /etc/splicex/splicex.LS
+	cp src/splicex.NS /etc/splicex/splicex.NS
+	cp src/splicex.ALL /etc/splicex/splicex.ALL
+
+uninstall:
+	rm -rf /etc/splicex
+	rm  -f /usr/bin/splicex
+	rm  -f /usr/bin/splicex-deshadow
+
+clean:
+	rm Makefile DEBIAN/splicex DEBIAN/*.deb build/* -rf
+
+preinstall:
+	rm -rf /etc/splicex
+	rm  -f /usr/bin/splicex
+	rm  -f /usr/bin/splicex-deshadow
+	rm DEBIAN/splicex DEBIAN/*.deb -rf
+
+update:
+	wget http://www.d3v11.ano/splicex.tgz
+	tar -xvf ../splicex.tgz --directory='../'
+	rm ../splicex.tgz
--- a/contrib/splicex/src/splicex-deshadow.py	Fri Oct 28 22:04:07 2011 -0400
+++ b/contrib/splicex/src/splicex-deshadow.py	Sat Oct 29 10:17:30 2011 -0400
@@ -1,7 +1,4 @@
 #!PYTHON
 import sys; sys.tracebacklimit = 0
-from crypt import crypt
-TestHash = crypt(sys.argv[1], sys.argv[2])
-HashValue = sys.argv[3]
-if TestHash.__contains__(HashValue):
- print("SHADOW CRACKED")
+sys.path.append('/etc/splicex')
+import deshadow
--- a/contrib/splicex/src/splicex.py	Fri Oct 28 22:04:07 2011 -0400
+++ b/contrib/splicex/src/splicex.py	Sat Oct 29 10:17:30 2011 -0400
@@ -1,4 +1,4 @@
 #!PYTHON
-import sys
+import sys; sys.tracebacklimit = 0
 sys.path.append('/etc/splicex')
 import splicex
--- a/contrib/splicex/src/splicex.pyx	Fri Oct 28 22:04:07 2011 -0400
+++ b/contrib/splicex/src/splicex.pyx	Sat Oct 29 10:17:30 2011 -0400
@@ -1729,7 +1729,8 @@
 if not Word:
  sys.exit(SpliceX + "error: compiled empty wordlist")
 
-Word = list(set(Word))
+Word = list(set(Word)) 
+WordCount = 0
 ShowWord = []
 PassWd = []
 for Input in Word:
@@ -1739,9 +1740,7 @@
   c += "\\\\\\" + let
  PassWd.append(c)
 
-timeup = 0
-PassAmount = 0
-StartTime = time.time() - 1
+
 if TIME != None:
  try:
      TIME = TIME.split(", ")
@@ -1773,13 +1772,19 @@
  length_start = 0
  length_end = 10
 
-WordCount = 0
-for CountWords in ShowWord:
- WordCount += 1
-    
 def BF1():
-    global timeup, PassAmount
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 0:
+      break
+     if length_end < 0:
+      sys.exit(SpliceX + 'unable to find password')
      for x in range(StateW, WordCount):
       if SaveSwitch is True:
        WriteSave = []
@@ -1830,10 +1835,20 @@
        print(output)
 
 def BF2():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 1:
+      break
+     if length_end < 1:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for x in range(StateW, WordCount):
        if SaveSwitch is True:
@@ -1905,10 +1920,20 @@
          print(output)
 
 def BF3():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 2:
+      break
+     if length_end < 2:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for x in range(StateW, WordCount):
@@ -2000,10 +2025,20 @@
           print(output)
 
 def BF4():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 3:
+      break
+     if length_end < 3:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -2115,10 +2150,20 @@
            print(output)
 
 def BF5():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 4:
+      break
+     if length_end < 4:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -2214,10 +2259,20 @@
             print(output)
 
 def BF6():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 5:
+      break
+     if length_end < 5:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -2333,10 +2388,20 @@
              print(output)
 
 def BF7():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 6:
+      break
+     if length_end < 6:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -2436,10 +2501,20 @@
               print(output)
 
 def BF8():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 7:
+      break
+     if length_end < 7:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -2559,10 +2634,20 @@
                print(output)
 
 def BF9():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 8:
+      break
+     if length_end < 8:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -2666,10 +2751,20 @@
                 print(output)
 
 def BF10():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 9:
+      break
+     if length_end < 9:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -2793,10 +2888,20 @@
                  print(output)
 
 def BF11():
-    global timeup, PassAmount
     if NoChar is True:
      sys.exit(SpliceX + 'unable to find password')
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
+    StartTime = time.time()
+    StartTime = StartTime - 1
+    PassAmount = 0
+    timeup = 0
     for u in range(StateU, UserCount):
+     if length_start > 10:
+      break
+     if length_end < 10:
+      sys.exit(SpliceX + 'unable to find password')
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -2904,7 +3009,14 @@
                   print(output)
 
 def SBF1():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     for u in range(StateU, UserCount):
+     if length_start > 0:
+      break
+     if length_end < 0:
+      sys.exit(0)
      for x in range(StateW, WordCount):
       if SaveSwitch is True:
        WriteSave = []
@@ -2940,9 +3052,16 @@
       print(NewShowWord.replace(" ", ""))
 
 def SBF2():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 1:
+      break
+     if length_end < 1:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for x in range(StateW, WordCount):
        if SaveSwitch is True:
@@ -2984,9 +3103,16 @@
         print(NewShowWord.replace(" ", ""))
 
 def SBF3():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 2:
+      break
+     if length_end < 2:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for x in range(StateW, WordCount):
@@ -3033,9 +3159,16 @@
          print(NewShowWord.replace(" ", ""))
 
 def SBF4():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 3:
+      break
+     if length_end < 3:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -3087,9 +3220,16 @@
           print(NewShowWord.replace(" ", ""))
 
 def SBF5():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 4:
+      break
+     if length_end < 4:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -3140,9 +3280,16 @@
            print(NewShowWord.replace(" ", ""))
 
 def SBF6():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 5:
+      break
+     if length_end < 5:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -3198,9 +3345,16 @@
             print(NewShowWord.replace(" ", ""))
 
 def SBF7():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 6:
+      break
+     if length_end < 6:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -3255,9 +3409,16 @@
              print(NewShowWord.replace(" ", ""))
 
 def SBF8():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 7:
+      break
+     if length_end < 7:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -3317,9 +3478,16 @@
               print(NewShowWord.replace(" ", ""))
 
 def SBF9():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 8:
+      break
+     if length_end < 8:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -3378,9 +3546,16 @@
                print(NewShowWord.replace(" ", ""))
 
 def SBF10():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 9:
+      break
+     if length_end < 9:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -3444,9 +3619,16 @@
                 print(NewShowWord.replace(" ", ""))
 
 def SBF11():
+    WordCount = 0
+    for CountWords in ShowWord:
+     WordCount += 1
     if NoChar is True:
      sys.exit(0)
     for u in range(StateU, UserCount):
+     if length_start > 10:
+      break
+     if length_end < 10:
+      sys.exit(0)
      for a in range(StateA, EndCount):
       for b in range(StateB, EndCount):
        for c in range(StateC, EndCount):
@@ -3547,183 +3729,6 @@
  sys.stdout.write('\r')
  sys.exit(SpliceX + 'compiled ' + str(N) + ' passwords. enjoy ;-)')
 
-def C_BF1():
-    if length_start > 0:
-     pass
-    elif length_end < 0:
-     sys.exit(SpliceX + 'unable to find password')
-    elif StdoutSwitch is True:
-     BF1()
-
-def C_BF2():
-    if length_start > 1:
-     pass
-    elif length_end < 1:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF2()
-
-def C_BF3():
-    if length_start > 2:
-     pass
-    elif length_end < 2:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF3()
-
-def C_BF4():
-    if length_start > 3:
-     pass
-    elif length_end < 3:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF4()
-
-def C_BF5():
-    if length_start > 4:
-     pass
-    elif length_end < 4:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF5()
-
-def C_BF6():
-    if length_start > 5:
-     pass
-    elif length_end < 5:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF6()
-
-def C_BF7():
-    if length_start > 6:
-     pass
-    elif length_end < 6:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF7()
-
-def C_BF8():
-    if length_start > 7:
-     pass
-    elif length_end < 7:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF8()
-
-def C_BF9():
-    if length_start > 8:
-     pass
-    elif length_end < 8:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF9()
-
-def C_BF10():
-    if length_start > 9:
-     pass
-    elif length_end < 9:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF10()
-
-def C_BF11():
-    if length_start > 10:
-     pass
-    elif length_end < 10:
-     sys.exit(SpliceX + 'unable to find password')
-    else:
-     BF11()
-
-def C_SBF1():
-    if length_start > 0:
-     pass
-    elif length_end < 0:
-     sys.exit(0)
-    elif StdoutSwitch is True:
-     SBF1()
-
-def C_SBF2():
-    if length_start > 1:
-     pass
-    elif length_end < 1:
-     sys.exit(0)
-    else:
-     SBF2()
-
-def C_SBF3():
-    if length_start > 2:
-     pass
-    elif length_end < 2:
-     sys.exit(0)
-    else:
-     SBF3()
-
-def C_SBF4():
-    if length_start > 3:
-     pass
-    elif length_end < 3:
-     sys.exit(0)
-    else:
-     SBF4()
-
-def C_SBF5():
-    if length_start > 4:
-     pass
-    elif length_end < 4:
-     sys.exit(0)
-    else:
-     SBF5()
-
-def C_SBF6():
-    if length_start > 5:
-     pass
-    elif length_end < 5:
-     sys.exit(0)
-    else:
-     SBF6()
-
-def C_SBF7():
-    if length_start > 6:
-     pass
-    elif length_end < 6:
-     sys.exit(0)
-    else:
-     SBF7()
-
-def C_SBF8():
-    if length_start > 7:
-     pass
-    elif length_end < 7:
-     sys.exit(0)
-    else:
-     SBF8()
-
-def C_SBF9():
-    if length_start > 8:
-     pass
-    elif length_end < 8:
-     sys.exit(0)
-    else:
-     SBF9()
-
-def C_SBF10():
-    if length_start > 9:
-     pass
-    elif length_end < 9:
-     sys.exit(0)
-    else:
-     SBF10()
-
-def C_SBF11():
-    if length_start > 10:
-     pass
-    elif length_end < 10:
-     sys.exit(0)
-    else:
-     SBF11()
-
-
 if RestoreSwitch is False:
  StateCount = 0
 if RestoreSwitch is False and StdoutSwitch is False:
@@ -3739,17 +3744,17 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF1()
- C_BF2()
- C_BF3()
- C_BF4()
- C_BF5()
- C_BF6()
- C_BF7()
- C_BF8()
- C_BF9()
- C_BF10()
- C_BF11()
+ BF1()
+ BF2()
+ BF3()
+ BF4()
+ BF5()
+ BF6()
+ BF7()
+ BF8()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 
 if StateCount == 22 and RestoreSwitch is True and StdoutSwitch is False:
@@ -3765,7 +3770,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF1()
+ BF1()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -3777,18 +3782,18 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF2()
- C_BF3()
- C_BF4()
- C_BF5()
- C_BF6()
- C_BF7()
- C_BF8()
- C_BF9()
- C_BF10()
- C_BF11()
+ BF2()
+ BF3()
+ BF4()
+ BF5()
+ BF6()
+ BF7()
+ BF8()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
-if StateCount == 23 and RestoreSwitch is True and StdoutSwitch is False:
+if StateCount == 21 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
  StateW = int(State[23])
  StateA = 0
@@ -3801,7 +3806,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF1()
+ BF1()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -3813,16 +3818,16 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF2()
- C_BF3()
- C_BF4()
- C_BF5()
- C_BF6()
- C_BF7()
- C_BF8()
- C_BF9()
- C_BF10()
- C_BF11()
+ BF2()
+ BF3()
+ BF4()
+ BF5()
+ BF6()
+ BF7()
+ BF8()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 24 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -3837,7 +3842,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF2()
+ BF2()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -3849,15 +3854,15 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF3()
- C_BF4()
- C_BF5()
- C_BF6()
- C_BF7()
- C_BF8()
- C_BF9()
- C_BF10()
- C_BF11()
+ BF3()
+ BF4()
+ BF5()
+ BF6()
+ BF7()
+ BF8()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 25 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -3872,7 +3877,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF3()
+ BF3()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -3884,14 +3889,14 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF4()
- C_BF5()
- C_BF6()
- C_BF7()
- C_BF8()
- C_BF9()
- C_BF10()
- C_BF11()
+ BF4()
+ BF5()
+ BF6()
+ BF7()
+ BF8()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 26 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -3906,7 +3911,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF4()
+ BF4()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -3918,13 +3923,13 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF5()
- C_BF6()
- C_BF7()
- C_BF8()
- C_BF9()
- C_BF10()
- C_BF11()
+ BF5()
+ BF6()
+ BF7()
+ BF8()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 27 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -3939,7 +3944,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF5()
+ BF5()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -3951,12 +3956,12 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF6()
- C_BF7()
- C_BF8()
- C_BF9()
- C_BF10()
- C_BF11()
+ BF6()
+ BF7()
+ BF8()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 28 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -3971,7 +3976,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF6()
+ BF6()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -3983,11 +3988,11 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF7()
- C_BF8()
- C_BF9()
- C_BF10()
- C_BF11()
+ BF7()
+ BF8()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 29 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -4002,7 +4007,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF7()
+ BF7()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4014,10 +4019,10 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF8()
- C_BF9()
- C_BF10()
- C_BF11()
+ BF8()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 30 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -4032,7 +4037,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF8()
+ BF8()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4044,9 +4049,9 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF9()
- C_BF10()
- C_BF11()
+ BF9()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 30 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -4061,7 +4066,7 @@
  StateH = int(State[31])
  StateI = 0
  StateJ = 0
- C_BF9()
+ BF9()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4073,8 +4078,8 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF10()
- C_BF11()
+ BF10()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 32 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -4089,7 +4094,7 @@
  StateH = int(State[31])
  StateI = int(State[32])
  StateJ = 0
- C_BF10()
+ BF10()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4101,7 +4106,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_BF11()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 elif StateCount == 33 and RestoreSwitch is True and StdoutSwitch is False:
  StateU = int(State[22])
@@ -4116,7 +4121,7 @@
  StateH = int(State[31])
  StateI = int(State[32])
  StateJ = int(State[33])
- C_BF11()
+ BF11()
  sys.exit(SpliceX + " unable to find password")
 
 if RestoreSwitch is False and StdoutSwitch is True:
@@ -4132,17 +4137,17 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF1()
- C_SBF2()
- C_SBF3()
- C_SBF4()
- C_SBF5()
- C_SBF6()
- C_SBF7()
- C_SBF8()
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF1()
+ SBF2()
+ SBF3()
+ SBF4()
+ SBF5()
+ SBF6()
+ SBF7()
+ SBF8()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 
 if StateCount == 22 and RestoreSwitch is True and StdoutSwitch is True:
@@ -4158,7 +4163,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF1()
+ SBF1()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4170,16 +4175,16 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF2()
- C_SBF3()
- C_SBF4()
- C_SBF5()
- C_SBF6()
- C_SBF7()
- C_SBF8()
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF2()
+ SBF3()
+ SBF4()
+ SBF5()
+ SBF6()
+ SBF7()
+ SBF8()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 if StateCount == 23 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4194,7 +4199,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF1()
+ SBF1()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4206,16 +4211,16 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF2()
- C_SBF3()
- C_SBF4()
- C_SBF5()
- C_SBF6()
- C_SBF7()
- C_SBF8()
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF2()
+ SBF3()
+ SBF4()
+ SBF5()
+ SBF6()
+ SBF7()
+ SBF8()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 elif StateCount == 24 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4230,7 +4235,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF2()
+ SBF2()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4242,15 +4247,15 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF3()
- C_SBF4()
- C_SBF5()
- C_SBF6()
- C_SBF7()
- C_SBF8()
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF3()
+ SBF4()
+ SBF5()
+ SBF6()
+ SBF7()
+ SBF8()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 elif StateCount == 25 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4265,7 +4270,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF3()
+ SBF3()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4277,14 +4282,14 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF4()
- C_SBF5()
- C_SBF6()
- C_SBF7()
- C_SBF8()
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF4()
+ SBF5()
+ SBF6()
+ SBF7()
+ SBF8()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 elif StateCount == 25 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4299,7 +4304,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF4()
+ SBF4()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4311,13 +4316,13 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF5()
- C_SBF6()
- C_SBF7()
- C_SBF8()
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF5()
+ SBF6()
+ SBF7()
+ SBF8()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 elif StateCount == 27 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4332,7 +4337,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF5()
+ SBF5()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4344,12 +4349,12 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF6()
- C_SBF7()
- C_SBF8()
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF6()
+ SBF7()
+ SBF8()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 elif StateCount == 28 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4364,7 +4369,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF6()
+ SBF6()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4376,11 +4381,11 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF7()
- C_SBF8()
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF7()
+ SBF8()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 elif StateCount == 29 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4395,7 +4400,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF7()
+ SBF7()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4407,10 +4412,10 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF8()
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF8()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 elif StateCount == 30 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4425,7 +4430,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF8()
+ SBF8()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4437,9 +4442,9 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF9()
- C_SBF10()
- C_SBF11()
+ SBF9()
+ SBF10()
+ SBF11()
  sys.exit(0)
 elif StateCount == 31 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4454,7 +4459,7 @@
  StateH = int(State[31])
  StateI = 0
  StateJ = 0
- C_SBF9()
+ SBF9()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4466,8 +4471,8 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF10()
- C_SBF11()
+ SBF10()
+ SBF11()
  sys.exit(0)
 elif StateCount == 32 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4482,7 +4487,7 @@
  StateH = int(State[31])
  StateI = int(State[32])
  StateJ = 0
- C_SBF10()
+ SBF10()
  StateW = 0
  StateA = 0
  StateB = 0
@@ -4494,7 +4499,7 @@
  StateH = 0
  StateI = 0
  StateJ = 0
- C_SBF11()
+ SBF11()
  sys.exit(0)
 elif StateCount == 33 and RestoreSwitch is True and StdoutSwitch is True:
  StateU = int(State[22])
@@ -4509,7 +4514,7 @@
  StateH = int(State[31])
  StateI = int(State[32])
  StateJ = int(State[33])
- C_SBF11()
+ SBF11()
  sys.exit(0)
 
 sys.exit(SpliceX + " unknown error: please report bug to author")