concatenate 2 readed files python
Question: I was trying to generate all the hex numbers from `0000000000` to `FFFFFFFFFF`
with all combinations on 10 length string but the file size it was very large,
so i think to divide in two lists from `00000` to `fffff` and then join that
lists through `stdout` and pipe it to aircrack

The code:

    
    
    #!/usr/bin/python
    # -*- encode: utf-8
    import sys
    
    def main():
    
        fd = open("hexdic.txt", "r")
        ffdd = open("dichex.txt","r")
        for line in fd.readlines():
    
                for otra in ffdd.readlines():
                        print line.replace("\n","") + otra.replace("\n","")
    
        fd.close()
    
    if __name__ == '__main__':
        main()
    

the issue is when the file take the first line on the first file "00000" and
run all the other lines on the second file from "00000" to "FFFFF" the program
finish instead to continue with "00001" from the first list and run all the
second list.

why?

well i think to use regex to generate random combinations.

Can you help me with my code showing me what am i doing wrong?


Answer: Do you have to read the hex values from files? How about

`for i in xrange(0xFFFFFFFFFF): print '%010x' % i `

