Giter Site home page Giter Site logo

mullpy's Introduction

Mullpy

Build Status Coverage Status

This tool is now deprecated, please use the official Mullvad CLI

A little tool to check if you're currently connected to Mullvad VPN or not and also checks for an open port and a DNS leak test. If you want to read more about Mullvad VPN you can goa head and read the very flattering Mullvad review here by That One Privacy Site

The tool does not intend to be a swiss army knife, just a two day mini-project so I don't have to go to am.i.mullvad.net everytime to check on my connection. For WebRTC you should go to their website!

Mullvad ON

Installation

Requirements:

  • Python 3.6 and up.

Instalation vรญa Pip:

$ pip install --user mullvad-python

Usage

$ mullpy
   \  |         |  |
  |\/ |  |   |  |  |  __ \   |   |
  |   |  |   |  |  |  |   |  |   |
 _|  _| \__,_| _| _|  .__/  \__, |
                     _|     ____/

Using Mullvad:	True
Server Type:	Wireguard
IP Address:	185.232.22.59
Country:	New York, United States
Location:	-74.0052, 40.7214
Organization:	M247 Europe SRL
Blacklisted: 	False

$ mullpy --help
Usage: mullpy [OPTIONS]

  CLI for Mullvad API.

Options:
  -d, --dns           Check for DNS leak.
  -p, --port INTEGER  Checks for open port
  --help              Show this message and exit.

Contribution

If you want to contribute to the project then:

  1. Fork the project.
  2. Make changes.
  3. Make a pull request to the develop branch.

TODO

  • CLI
  • Testing
  • Continuous Integration
  • Code Coverage
  • Port Checking
  • DNS Leak Test

Support this project

If you like the project and would like to support me you can buy me a cup of coffee, that would be much appreciated ๐Ÿ™. If you can't, don't worry, enjoy it!

Buy Me A Coffee Buy Me a Coffee at ko-fi.com

mullpy's People

Contributors

franccesco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mullpy's Issues

Change in Mullvad's JSON output breaks api.py

A recent change to Am I Mullvad's JSON output has flummoxed the module, specifically the decision to remove the blacklisted value. Not unpredictably, the mullpy invocation now produces:

$ mullpy                                                                                             
    Traceback (most recent call last):
    File "~/.local/bin/mullpy", line 10, in <module>
    sys.exit(main())
    File "~/.local/lib/python3.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
    File "~/.local/lib/python3.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
    File "~/.local/lib/python3.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "~/.local/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
    File "~/.local/lib/python3.7/site-packages/mullvad_python/cli.py", line 12, in main
    mullpy = Mullpy()
    File "~/.local/lib/python3.7/site-packages/mullvad_python/api.py", line 32, in 
    __init__
    self.blacklisted = self.api_data['blacklisted']
    KeyError: 'blacklisted'

Executed using Python 3.7 system installation within Kubuntu 19.04 "Disco Dingo" atop Linux Kernel 5.0.13, running on a Lenovo ThinkPad T420s (Intel Core i7 2nd Gen., 8GB RAM). As advised in module README, installed version 0.3.1 of module using pip v19 with the --user flag. Both system and user default shell is configured as Zsh v5.5.1.

I almost submitted a stupidly simple PR removing that definition from api.py, but after a moment's reflection it seemed that the more forward-thinking approach would be to define an error handler that was able to react to future such changes by Mullvad by alerting the user via output to stderr to the missing value(s), then disregarding that value and rendering the stdout output with what still was available to the parser. If I had any Python chops I'd have written that PR instead, but alas I'm a PyNoob, so all you get is this bug report. ๐Ÿ˜œ

To Reproduce
Issued following command in terminal emulator Yakuake configured to provide a shell from the command zsh -i

mullpy

Expected behavior
Normal output of command without any additional arguments, i.e.:

\  |         |  |               
|\/ |  |   |  |  |  __ \   |   | 
|   |  |   |  |  |  |   |  |   | 
_|  _| \__,_| _| _|  .__/  \__, | 
_|     ____/  
Using Mullvad:  True
Server Type:    Wireguard
IP Address:     185.232.22.59
Country:        New York, United States
Location:       -74.0052, 40.7214
Organization:   M247 Europe SRL
Blacklisted:    False

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.