brutemod.py 634 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env python3
  2. import argparse
  3. parser = argparse.ArgumentParser(description='bruteforce some moduluses')
  4. parser.add_argument('-s', dest='s', help="start at this number", type=int, default=0)
  5. parser.add_argument('-m', dest='m', help="the modulus", type=int, default=1)
  6. parser.add_argument('-e', dest='e', help="what it will equal", type=int, default=1)
  7. parser.add_argument('-f', dest='f', help="combinations to find", type=int, default=5)
  8. args = parser.parse_args()
  9. i = args.s
  10. m = args.m
  11. e = args.e
  12. toFind = args.f
  13. found = []
  14. while len(found) < toFind:
  15. if i % m == e:
  16. found.append(i)
  17. i=i+1
  18. print(found)