Skip to content

Instantly share code, notes, and snippets.

@heyalexej
Created September 9, 2015 04:55
Show Gist options
  • Save heyalexej/1a3a37fbb3e65dc63f11 to your computer and use it in GitHub Desktop.
Save heyalexej/1a3a37fbb3e65dc63f11 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import requests
from itertools import permutations
ep = 'http://profilebishop.com/run.php'
p = list(permutations(range(1,6), 4))
def permutate():
for i in p:
params = {
'craft' : i[0],
'creative' : i[1],
'spiritual' : i[2],
'tech' : i[3]
}
yield params
all = []
for idx, i in enumerate(permutate(), 1):
print '\npermutation # {:d}: {}'.format(idx, i)
for j in range(3):
r = requests.get(ep, params=i).text
print r
for k in r.strip('"').split(','):
all.append(k.strip())
print "Individual Combos:", len(set(all))
for a in sorted(set(all)):
print a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment