Last active
March 25, 2019 21:48
-
-
Save m0n4/80e830044bdae68f4dba0b157220301a to your computer and use it in GitHub Desktop.
retency.com Exclusion des statistiques
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import requests | |
import random | |
import multiprocessing | |
from fake_useragent import UserAgent | |
# https://www.frandroid.com/culture-tech/577876_dans-le-metro-ces-ecrans-de-publicites-traquent-vos-smartphones | |
def worker(): | |
ua = UserAgent() | |
url = 'https://retency.com/stats/optout.php' | |
rf = 'https://retency.com/stats/manual_optout.html' | |
header = { | |
'User-Agent': ua.random, | |
'Referer': rf | |
} | |
try: | |
while True: | |
mac1 = ':'.join("%02x"%random.randint(0, 255) for i in range(6)) | |
mac2 = ':'.join("%02x"%random.randint(0, 255) for i in range(6)) | |
param = {'wm': mac1, 'bm': mac2} | |
r = requests.post(url, data=param, headers=header) | |
if 'Vous avez bien' in r.text: | |
print('[OK]',mac1,mac2) | |
else: | |
break | |
except KeyboardInterrupt: | |
pass | |
if __name__ == '__main__': | |
jobs = [] | |
for i in range(15): | |
p = multiprocessing.Process(target=worker) | |
jobs.append(p) | |
p.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment