Skip to content

Commit

Permalink
migrated to click
Browse files Browse the repository at this point in the history
  • Loading branch information
fportantier committed Apr 9, 2019
1 parent 8a58f64 commit 9e33700
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 151,672 deletions.
25 changes: 17 additions & 8 deletions utils/crack-cvv.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
#!/usr/bin/env python3

import sys
import hashlib

algorithm = sys.argv[1]
h = sys.argv[2]
import click

@click.command()
@click.argument('algorithm', type=click.Choice(sorted(hashlib.algorithms_available)))
@click.argument('digest')
def crack_cvv(algorithm, digest):

for number in range(0, 1000):
cvv = "{:03}".format(number).encode()
result = hashlib.new(algorithm, cvv).hexdigest()
if digest == result:
print('Cracked! CVV:', cvv.decode())
break

for number in range(0, 1000):
cvv = "{:03}".format(number).encode()
result = hashlib.new(algorithm, cvv).hexdigest()
if h == result:
print('Cracked! CVV:', cvv.decode())
break

if __name__ == '__main__':
crack_cvv()
Loading

0 comments on commit 9e33700

Please sign in to comment.