Skip to content

Commit

Permalink
Save keys to txt file
Browse files Browse the repository at this point in the history
  • Loading branch information
ritiek authored Apr 14, 2017
1 parent 04d1c54 commit 0d9506e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion find_key.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/bin/python
#!/usr/bin/env python

from bs4 import BeautifulSoup
import requests
import re
import sys
import os, os.path

if len(sys.argv) <= 2:
print("Example: sudo python find_key.py 'windows 7' '?????-?????-?????-?????-?????'")
exit()

if not os.path.exists('keys'):
os.makedirs('keys')

def reCompiler(template):
regex_add = ''
for letter in template:
Expand Down Expand Up @@ -43,3 +47,7 @@ def reCompiler(template):
#print chance_html
print(pattern.findall(chance_text))
print('')
file = query.replace(' ', '_') + '.txt'
with open(('keys/' + file), 'a') as key_file:
for y in pattern.findall(chance_text):
key_file.write(y + '\n')

0 comments on commit 0d9506e

Please sign in to comment.