You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
439 B

4 years ago
  1. ## generate One Time Pad from dev/random
  2. import os, sys
  3. n = 0
  4. done = False
  5. while done == False:
  6. n += 1
  7. with open("/dev/random", 'rb') as f:
  8. #print(type(repr(f.read(20))))
  9. #print(repr(f.read(1000)))
  10. fiver = repr(f.read(5))
  11. with open("/home/alpcentaur/ProjektA/Brieftaube/Pad.txt", 'a') as g:
  12. g.write(fiver + '\n')
  13. print(n)
  14. if n == 100:
  15. done = True