试图写“饼干” - OFC它不起作用,但我认为它可以xD

时间:2017-02-16 21:38:32

标签: python cracking linecache

我是python的新手,我试着写“cracker”(不是真的,只是一个编写所有可能组合的程序)。

我使用了linecache,然后只是while循环(太多了)。

我的想法是创建一个带有-Z和0-9个字符的字典,然后使用linecache获取字符并将它们放在一起

(只用了2个字符就可以了,但是当我尝试了8个字符时......)

由于我是python的新手,我不是真正有意图的朋友,但不知怎的,我让它工作但是......

问题永远不会发生:

print("ITS HERE")

............................................... .................................

import easygui
import time
import linecache



x1=1
x2=1
x3=1
x4=1
x5=1
x6=1
x7=1
x8=0
p=0

while p!=36:
p=p+1
while x1!=36:
    while x2!=36:
        while x3!=36:
            while x4!=36:
                while x5!=36:
                    while x6!=36:
                        while x7!=36:

                            while x8!=36:
                                x8=x8+1

                                Char1=linecache.getline("Dictionary.txt",x1).rstrip("\n")
                                Char2=linecache.getline("Dictionary.txt",x2).rstrip("\n")
                                Char3=linecache.getline("Dictionary.txt",x3).rstrip("\n")
                                Char4=linecache.getline("Dictionary.txt",x4).rstrip("\n")
                                Char5=linecache.getline("Dictionary.txt",x5).rstrip("\n")
                                Char6=linecache.getline("Dictionary.txt",x6).rstrip("\n")
                                Char7=linecache.getline("Dictionary.txt",x7).rstrip("\n")
                                Char8=linecache.getline("Dictionary.txt",x8).rstrip("\n")
                                print(Char1+Char2+Char3+Char4+Char5+Char6+Char7+Char8)
                                time.sleep(0.25)


                                if x2==36:
                                    x1=x1+1
                                    x2=0
                                if x3==36:
                                    x2=x2+1
                                    x3=0
                                if x4==36:
                                    x3=x3+1
                                    x4=0


                                if x5==36:
                                    x4=x4+1
                                    x5=0
                                if x6==36:
                                    x5=x5+1
                                    x6=0
                                if x7==36:
                                    x6=x6+1
                                    x7=0
                                if x8==36:
                                    x7=x7+1
                                    x8=0






time.sleep (60000)

1 个答案:

答案 0 :(得分:0)

所以这是工作代码,如果你有千禧一代的时间定义试试xD

import easygui
import time
import linecache



x1=1
x2=1
x3=1
x4=1
x5=1
x6=1
x7=1
x8=1


while x8!=36:


    Char1=linecache.getline("AlgoDictionary.txt",x1).rstrip("\n")
    Char2=linecache.getline("AlgoDictionary.txt",x2).rstrip("\n")
    Char3=linecache.getline("AlgoDictionary.txt",x3).rstrip("\n")
    Char4=linecache.getline("AlgoDictionary.txt",x4).rstrip("\n")
    Char5=linecache.getline("AlgoDictionary.txt",x5).rstrip("\n")
    Char6=linecache.getline("AlgoDictionary.txt",x6).rstrip("\n")
    Char7=linecache.getline("AlgoDictionary.txt",x7).rstrip("\n")
    Char8=linecache.getline("AlgoDictionary.txt",x8).rstrip("\n")
    print(Char1+Char2+Char3+Char4+Char5+Char6+Char7+Char8)
    time.sleep (0.1)
    x8=x8+1                            

    if x2==36:
        x1=x1+1
        x2=1
    if x3==36:
        x2=x2+1
        x3=1
    if x4==36:
        x3=x3+1
        x4=1
    if x5==36:
        x4=x4+1
        x5=1
    if x6==36:
        x5=x5+1
        x6=1
    if x7==36:
        x6=x6+1
        x7=1
    if x8==36:
       x7=x7+1
       x8=1