PK!Gmullvad_python/__init__.py"""TODO: Initialization package.""" from .api import Mullpy from .banner import banner __all__ = ['Mullpy', 'banner'] __version__ = '0.1.5' PK!:OOmullvad_python/api.py"""TODO: api documentation.""" from requests import get as rget class Mullpy(): """Todo: API.""" def __init__(self): """TODO: initialization.""" self.api_data = rget('https://am.i.mullvad.net/json').json() self.ip = self.api_data['ip'] self.country = self.api_data['country'] self.city = self.api_data['city'] self.longitude = self.api_data['longitude'] self.latitude = self.api_data['latitude'] self.exit_ip = self.api_data['mullvad_exit_ip'] if self.exit_ip: self.exit_hostname = self.api_data['mullvad_exit_ip_hostname'] self.organization = self.api_data['organization'] self.server_type = self.api_data['mullvad_server_type'] self.blacklisted = self.api_data['blacklisted'] def is_blacklisted(self): """Return True or False if user is blacklisted.""" is_blacklisted = self.blacklisted['blacklisted'] return is_blacklisted def blacklist_information(self): """Return blacklisted information.""" blacklist_info = self.blacklisted['results'] return blacklist_info def check_port(self, port): """Ony check if port is open.""" req_port = rget(f'https://am.i.mullvad.net/port/{port}').json() is_open = req_port['reachable'] return is_open PK!5mullvad_python/banner.pybanner = r''' \ | | | |\/ | | | | | __ \ | | | | | | | | | | | | _| _| \__,_| _| _| .__/ \__, | _| ____/ ''' PK!hmullvad_python/cli.py"""TODO: CLI.""" import click import argparse from .api import Mullpy from .banner import banner def main(): """TODO: CLI main.""" mullpy = Mullpy() if mullpy.exit_ip: text_color = 'green' else: text_color = 'red' click.secho(banner, fg=text_color, bold=True) # Using Mullvad's exit IP? print('Using Mullvad:', end='\t') if mullpy.exit_ip: click.secho('True', fg=text_color, bold=True) print('Server Type:', end='\t') click.secho(mullpy.server_type, fg=text_color, bold=True) else: click.secho("FALSE. INSECURE CONNECTION!", fg=text_color, bold=True) # IP Address print('IP Address:', end='\t') click.secho(mullpy.ip, fg=text_color, bold=True) # Country / City print('Country:', end='\t') click.secho(f'{mullpy.city}, {mullpy.country}', fg=text_color, bold=True) # Longitude / Latitude print(f'Location:', end='\t') longitude, latitude = mullpy.longitude, mullpy.latitude click.secho(f'{longitude}, {latitude}', fg=text_color, bold=True) # Organization if mullpy.exit_ip: print('Organization:', end='\t') click.secho(mullpy.organization, fg=text_color, bold=True) # Blacklisted? print('Blacklisted: ', end='\t') if mullpy.is_blacklisted(): click.secho('True', fg='red', bold=True) else: click.secho('False', fg='green', bold=True) print() exit(0) if __name__ == '__main__': main() PK!H~ 12/mullvad_python-0.1.6.dist-info/entry_points.txtN+I/N.,()-)Qe)%yz9Vy\\PK!~fHH)mullvad_python-0.1.6.dist-info/LICENSE.mdMIT License Copyright (c) [2018] [Robertho Franchesko Orozco Parrales] 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!HlŃTT$mullvad_python-0.1.6.dist-info/WHEEL A н#J@Z|Jmqvh&#hڭw!Ѭ"J˫( } %PK!H5M 'mullvad_python-0.1.6.dist-info/METADATAVRFfvcMp)0eJ C2Z:6ʎ2C{'S= E^wHaٱHp I F*e}7Y$Bc؋0ëJ.N!Pi%a0VpJfF*ZA&Ps;t(h9PN!1ܘ!PLg2e:U5KwZ5!nm>ۋ1r*nx+ +2+PVo#5NFNj:efR'dCL`/rpVGY-I }=J,f'n5N=@vqPnıRy3e꙾g'"PB\`oB,R1@PQNPy[#T޸hptjv:%hTYPl#)` K5ƅ%DV-#aU FZ)Zo_y}?BԽ5pyNjp"MjgV)MRAYJc@褀y*؅D;ALT0 !TiB$8̔ ޹£nPNfe7 %-VT[>AAbn\D*IS/'.NFDXGkd>Kgk9)oL $u:543&C4(;JT_ 8D}̨֥uriA.7S|3xpuuH\5;z޼bԮw鯺Ze˯BR7h]ʹΑ^CI[+oD:dĀf1 |0=̕c/Jϻ&Zа#UFDǃ.lhNLsj1V#"<&p +"6شd{;:Ή)fX ͌E:0ʑi6CSmuFh͍pi^o J7sgS4 aIWDes,ɧe jK `N#)L½ Ԕ6"qGMtA"4Rq=_*.`Q - N["VLgDn`mdF,)gn -0:nՀtd ȶa[؁{]Q *;M-Bϐ|XNt&HH U˄leDcI/*0TW4 %cCDNYH mr vHD8W,ú]v 6=uhmS\FPK!Hg9&%mullvad_python-0.1.6.dist-info/RECORD˖0y= P@ Ƞ )X=B"ryO_.CB0wE]}bL+a,; _tmkH wdk_2B¯`LJ&s`4>ń'>52kj lyܢ֝h7VZ'j'0kNy0jE}mg)'iW/<_ggtW>f$H,0 =# k̐OovMIPBێUVzǬU =:K'朇&v5'IA]e嚶BIEN[Y2H~q1(.N7>{$jʻBjچdY(= yEVّܸn['!M5q=}j :0Y踜<;?u`qPK!Gmullvad_python/__init__.pyPK!:OOmullvad_python/api.pyPK!5Gmullvad_python/banner.pyPK!hCmullvad_python/cli.pyPK!H~ 12/C mullvad_python-0.1.6.dist-info/entry_points.txtPK!~fHH) mullvad_python-0.1.6.dist-info/LICENSE.mdPK!HlŃTT$Pmullvad_python-0.1.6.dist-info/WHEELPK!H5M 'mullvad_python-0.1.6.dist-info/METADATAPK!Hg9&%mullvad_python-0.1.6.dist-info/RECORDPK