PK!p leech/__init__.pyfrom .leech import leech PK!K)3##leech/leech.pyimport subprocess from random import Random import click import os file_name = '.leech' def get_mac(): return subprocess.getstatusoutput(['ifconfig en0 | grep ether'])[1] \ .replace("ether ", "") \ .replace("\t", "") \ .replace(" ", "") def set_mac(address): return subprocess.getstatusoutput(['ifconfig en0 ether ' + address]) def save(address): try: with open(file_name, 'x') as f: f.write(address) except FileExistsError: print("Cannot overwrite the MAC save file!") def load(): with open(file_name, 'r') as f: return f.readline() def enable_wifi(is_enabled): status = 'on' if is_enabled else 'off' return subprocess.getstatusoutput(['networksetup -setairportpower en0 ' + status]) def save_file_exists(): return os.path.isfile(file_name) def randomize_mac(): mac = [Random().randint(0, 255) for x in range(0, 6)] mac[0] = (mac[0] & 0xfc) | 0x02 return ':'.join(['{0:02x}'.format(x) for x in mac]) @click.command() @click.option('--reset', is_flag=True, help='Reset your MAC address back before the first run of Leech.') def leech(reset): if not reset: mac = get_mac() if not save_file_exists(): save(mac) print("Saved your current MAC address to disk. Use the --reset option to revert to it.") print(f'Your current MAC address: {mac}') new_mac = randomize_mac() print(f'Setting new MAC address: {new_mac}') set_mac(new_mac) verified_mac = get_mac() if verified_mac == new_mac: print('Successfully randomized your MAC address.') print('Turning your WIFI on and off to reconnect to the network.') enable_wifi(False) enable_wifi(True) else: print('Something went wrong, make sure you use are sudo and have WIFI turned on.') print(f'Current mac address: {verified_mac}') else: mac = load() set_mac(mac) print(f'Resetting to your original MAC address: {mac}') PK!H^ %&leech-0.1.1.dist-info/entry_points.txtN+I/N.,()IMMΰV` PK!;ں77 leech-0.1.1.dist-info/LICENSE.md The MIT License (MIT) Copyright (Philipp Hager) 2018 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK!HڽTUleech-0.1.1.dist-info/WHEEL A н#Z;/"d&F[xzw@Zpy3Fv]\fi4WZ^EgM_-]#0(q7PK!H*N,#leech-0.1.1.dist-info/METADATAKo0{l%bRAejDB@*&~NZЪG.3ojWAZ#Y(fBʇQڷZdv`z*Ph*ζ6,= ig=zކ`<곇Ք8"%̷o9[˂LemS[/`WK%e4!R pG F^ya5{VFbb2F|<- ?$Ẻ BĚ+Ȝ9";o+ZKS:DѽHoK||qbWAF@dqlPK!H7Z leech-0.1.1.dist-info/RECORDur0}%Ej6$"!xvzƙq γgJs+J')ҍWO_l@O\hV.Cr!zc$~ltKH.:smR%Q5@Кc48Vi