diff contrib/splicex/src/splicex.pyx @ 712:59babc5385d5 draft

SpliceX fixed, old coding trim down with patch for --time option
author d3v11 <d3v11@d3v11.ano>
date Sun, 30 Oct 2011 08:01:22 -0400
parents c02c7e024e05
children eb42729766ed
line wrap: on
line diff
--- a/contrib/splicex/src/splicex.pyx	Sun Oct 30 07:48:04 2011 -0400
+++ b/contrib/splicex/src/splicex.pyx	Sun Oct 30 08:01:22 2011 -0400
@@ -1822,7 +1822,7 @@
       if timeup == sleep_now:
        time.sleep(sleep_for)
        timeup = 0
-      print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+      print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
       output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
       if test == None:
        print(output)
@@ -1878,7 +1878,7 @@
        if timeup == sleep_now:
         time.sleep(sleep_for)
         timeup = 0
-       print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+       print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
        output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
        if test == None:
         print(output)
@@ -1897,7 +1897,7 @@
         if timeup == sleep_now:
          time.sleep(sleep_for)
          timeup = 0
-        print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+        print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
         output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
         if test == None:
          print(output)
@@ -1955,7 +1955,7 @@
         if timeup == sleep_now:
          time.sleep(sleep_for)
          timeup = 0
-        print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+        print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
         output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
         if test == None:
          print(output)
@@ -1974,7 +1974,7 @@
          if timeup == sleep_now:
           time.sleep(sleep_for)
           timeup = 0
-         print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+         print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
          output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
          if test == None:
           print(output)
@@ -1992,7 +1992,7 @@
          if timeup == sleep_now:
           time.sleep(sleep_for)
           timeup = 0
-         print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+         print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
          output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
          if test == None:
           print(output)
@@ -2052,7 +2052,7 @@
          if timeup == sleep_now:
           time.sleep(sleep_for)
           timeup = 0
-         print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+         print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
          output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
          if test == None:
           print(output)
@@ -2071,7 +2071,7 @@
           if timeup == sleep_now:
            time.sleep(sleep_for)
            timeup = 0
-          print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+          print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
           output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
           if test == None:
            print(output)
@@ -2089,7 +2089,7 @@
           if timeup == sleep_now:
            time.sleep(sleep_for)
            timeup = 0
-          print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+          print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
           output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
           if test == None:
            print(output)
@@ -2107,7 +2107,7 @@
           if timeup == sleep_now:
            time.sleep(sleep_for)
            timeup = 0
-          print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+          print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
           output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
           if test == None:
            print(output)
@@ -2169,7 +2169,7 @@
           if timeup == sleep_now:
            time.sleep(sleep_for)
            timeup = 0
-          print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+          print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
           output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
           if test == None:
            print(output)
@@ -2188,7 +2188,7 @@
            if timeup == sleep_now:
             time.sleep(sleep_for)
             timeup = 0
-           print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+           print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
            output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
            if test == None:
             print(output)
@@ -2206,7 +2206,7 @@
            if timeup == sleep_now:
             time.sleep(sleep_for)
             timeup = 0
-           print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+           print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
            output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
            if test == None:
             print(output)
@@ -2270,7 +2270,7 @@
            if timeup == sleep_now:
             time.sleep(sleep_for)
             timeup = 0
-           print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+           print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
            output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
            if test == None:
             print(output)
@@ -2289,7 +2289,7 @@
             if timeup == sleep_now:
              time.sleep(sleep_for)
              timeup = 0
-            print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+            print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
             output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
             if test == None:
              print(output)
@@ -2307,7 +2307,7 @@
             if timeup == sleep_now:
              time.sleep(sleep_for)
              timeup = 0
-            print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+            print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
             output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
             if test == None:
              print(output)
@@ -2325,7 +2325,7 @@
             if timeup == sleep_now:
              time.sleep(sleep_for)
              timeup = 0
-            print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+            print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
             output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
             if test == None:
              print(output)
@@ -2391,7 +2391,7 @@
             if timeup == sleep_now:
              time.sleep(sleep_for)
              timeup = 0
-            print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+            print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
             output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
             if test == None:
              print(output)
@@ -2410,7 +2410,7 @@
              if timeup == sleep_now:
               time.sleep(sleep_for)
               timeup = 0
-             print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+             print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
              output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
              if test == None:
               print(output)
@@ -2428,7 +2428,7 @@
              if timeup == sleep_now:
               time.sleep(sleep_for)
               timeup = 0
-             print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+             print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
              output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
              if test == None:
               print(output)
@@ -2496,7 +2496,7 @@
              if timeup == sleep_now:
               time.sleep(sleep_for)
               timeup = 0
-             print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+             print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
              output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
              if test == None:
               print(output)
@@ -2515,7 +2515,7 @@
               if timeup == sleep_now:
                time.sleep(sleep_for)
                timeup = 0
-              print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+              print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
               output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
               if test == None:
                print(output)
@@ -2533,7 +2533,7 @@
               if timeup == sleep_now:
                time.sleep(sleep_for)
                timeup = 0
-              print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+              print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
               output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
               if test == None:
                print(output)
@@ -2551,7 +2551,7 @@
               if timeup == sleep_now:
                time.sleep(sleep_for)
                timeup = 0
-              print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+              print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
               output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
               if test == None:
                print(output)
@@ -2621,7 +2621,7 @@
               if timeup == sleep_now:
                time.sleep(sleep_for)
                timeup = 0
-              print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+              print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
               output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
               if test == None:
                print(output)
@@ -2640,7 +2640,7 @@
                if timeup == sleep_now:
                 time.sleep(sleep_for)
                 timeup = 0
-               print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+               print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
                output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
                if test == None:
                 print(output)
@@ -2658,7 +2658,7 @@
                if timeup == sleep_now:
                 time.sleep(sleep_for)
                 timeup = 0
-               print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+               print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
                output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
                if test == None:
                 print(output)
@@ -2730,7 +2730,7 @@
                if timeup == sleep_now:
                 time.sleep(sleep_for)
                 timeup = 0
-               print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+               print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
                output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
                if test == None:
                 print(output)
@@ -2749,7 +2749,7 @@
                 if timeup == sleep_now:
                  time.sleep(sleep_for)
                  timeup = 0
-                print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+                print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
                 output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
                 if test == None:
                  print(output)
@@ -2767,7 +2767,7 @@
                 if timeup == sleep_now:
                  time.sleep(sleep_for)
                  timeup = 0
-                print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+                print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
                 output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
                 if test == None:
                  print(output)
@@ -2785,7 +2785,7 @@
                 if timeup == sleep_now:
                  time.sleep(sleep_for)
                  timeup = 0
-                print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+                print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
                 output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
                 if test == None:
                  print(output)
@@ -2859,7 +2859,7 @@
                 if timeup == sleep_now:
                  time.sleep(sleep_for)
                  timeup = 0
-                print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+                print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
                 cmd = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace('USERNAME', User[u].replace(" ", "")))
                 if test == None:
                  print(output)
@@ -2878,7 +2878,7 @@
                  if timeup == sleep_now:
                   time.sleep(sleep_for)
                   timeup = 0
-                 print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+                 print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
                  output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
                  if test == None:
                   print(output)
@@ -2896,7 +2896,7 @@
                  if timeup == sleep_now:
                   time.sleep(sleep_for)
                   timeup = 0
-                 print(SpliceX + str(Speed) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
+                 print(SpliceX + str(int(round(float(Speed)))) + "/s " + User[u].replace(" ", "") + " " + NewShowWord.replace(" ", ""))
                  output = os.popen(cmd.replace("PASSWORD", NewPassWd.replace(" ", "")).replace("USERNAME", User[u].replace(" ", ""))).read()
                  if test == None:
                   print(output)