Usefull tools in linux, example snippet, etc
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Some usefull python scripts and snippets

Repo Website -

My Website -

Downoload some of the below scripts: wget -qO && sudo bash

1. changer init script

It is an init script which changes the MAC address of wlan0 interface. As I said init script, it will run at the time of system boot and changes the MAC address i.e there is will be new MAC whenever system boots. With simple commands we can restore/change the MAC whenever we want. Read my blog post for more info and how to install

  service changer restore (Restores original MAC)
  service changer new (Asigns new MAC)
  service changer show (Shows current MAC)


netstat/ss like tool, which displays the current connections statuses with pid. Reads info from /proc/net/tcp


A simple "localhost" open port scanner script with socket


A simple "Domain Tools" like script which retrives location of the specified host and show where you are with "public ip". Below you can see the usage, without arguments python displays information of your ISP with your public IP and your location

Uses free HTTP APIs

   root@ultron:/# python -h
   usage: [-h] [-m] [-H HOST] [-v]

   Net Tools

   optional arguments:
      -h, --help  show this help message and exit
      -m          shows public IP
      -H HOST     shows domain info of the host
      -v          show program's version number and exit
root@ultron:/opt/scripts# python -m

root@ultron:/opt/scripts# python 
| Host            CtrlS XXXXXXXXXXX                        |
| Your Public IP  45.XXX.XX.XXX                            |
| ISP             E XXX Entertainment Pvt                  |
| AS              AS182XX CtrlS XXXXXXXXXXX Ltd.           |
| City            GuXXXX                                   |
| Region          AnXXXX XrXXXXX                           |
| Country         India                                    |
| Latitude        XX.3                                     |
| Longitude       XX.45                                    |
| Time Zone       Asia/Kolkata                             |
| ZIP             XXX002                                   |


Uses dnscrypt-proxy tool to setup DSNCrypt in machine. Check installation steps here

  • What is DNSCrypt and Why?

    DNSCrypt is a protocol that authenticates communications between a DNS client and a DNS resolver. It prevents DNS spoofing. It uses cryptographic signatures to verify that responses originate from the chosen DNS resolver and haven't been tampered with.

    It is an open specification, with free and opensource reference implementations, and it is not affiliated with any company nor organization.

* Shows available  servers by downloading .csv file from offical repo. No need to specify manually
* Daemonize the process
###NOTE: If you run without arguments, it will display DNSCrypt servers to choose

root@ultron:/# python -h
usage: [-h] [-H HOST] [-d] [-v]


optional arguments:
  -h, --help  show this help message and exit
  -H HOST     Connect to this DNS server
  -d          Download DNS server list(/opt/dnscrypt-resolvers.csv) and
  -v          show program's version number and exit
  • encryptdns

    • An init script runs dnscrypt-proxy on startup
    • Specify csv_file location and resolver_name in the script. (You get this info from python -d)
    sudo wget -O /etc/init.d/encryptdns
    sudo chmod +x /etc/init.d/encryptdns
    sudo update-rc.d encryptdns defaults

DNSCrypt runs on localhost( port 53. After running the script(if everything is ok) please change the DNS IP in network settings like below

Network Setting


Displays wifi hotspots near to you. Uses the command iwlist. Option -j will diplays json format with more info. Similar command nmcli d wifi list

root@android:/opt/scripts# python -h
usage: [-h] [-j] [-v]

Displays wifi hotspots info near to you. [Coded by VEERENDRA KAKUMANU]

optional arguments:
  -h, --help  show this help message and exit
  -j          Dumps in json format
  -v          show program's version number and exit
root@android:/opt/scripts# python 
| ID |        ESSID        |    MAC Address    | Channel | Frequency | Singal Level |
| 01 | Iron                | AA:AA:AA:47:9C:36 | 3       | 2.422 GHz | -51 dBm      |
| 02 | DDDDD XXXXX         | AA:AA:AA:10:D8:10 | 1       | 2.412 GHz | -80 dBm      |
| 03 | XXXXXXXXXXX         | AA:AA:20:7C:58:77 | 1       | 2.412 GHz | -78 dBm      |
| 04 | YYY                 | AA:12:AA:00:61:32 | 1       | 2.412 GHz | -89 dBm      |
| 05 | WWWWWWW             | AA:AA:AA:CF:0B:45 | 2       | 2.417 GHz | -85 dBm      |
| 06 | XXXXXX              | 66:AA:AA:30:AA:86 | 5       | 2.432 GHz | -86 dBm      |
| 07 | Wolverine           | 98:FC:11:AA:44:F2 | 6       | 2.437 GHz | -88 dBm      |
| 08 | NNNN                | 0C:AA:B5:AA:B7:D4 | 9       | 2.452 GHz | -76 dBm      |
| 09 | TTTTTT              | 6C:AA:AA:FC:AA:1B | 11      | 2.462 GHz | -85 dBm      |
| 10 | AAAAAAAAAAAA        | 48:AA:33:AA:D2:95 | 11      | 2.462 GHz | -87 dBm      |
| 11 | GGGGGGGGG           | DC:EF:AA:12:AA:5C | 13      | 2.472 GHz | -84 dBm      |
| 12 | EEEEEE              | AA:3A:AA:1B:9E:30 | 10      | 2.457 GHz | -86 dBm      |
| 13 | RRRRRR              | 1C:AA:2B:61:AA:A7 | 13      | 2.472 GHz | -85 dBm      |


A simple pastebin tool, sends data to and retrieves ternding pastes.

Usefull when we need to capture huge logs or some output from command. Just have to pipe the output to the script cat apache.logs | pastebin

root@shadows:/opt# python -h
usage: [-h] [-t] [-p] [-f PFORMAT] [-n PNAME]

Sends data to
[*]PIPE the ouput to the script.                                
Example: echo 'Test' | python

optional arguments:
  -h, --help  show this help message and exit
  -t          Gets trending paste
  -p          Public Paste
  -f PFORMAT  Format of the text(Optional). Please refer formats
  -n PNAME    Name of the past(Optional)

How to run the script from any where?

  1. Get the script

    wget -qO pastebin

  2. Give executable permissions

    chmod +x pastebin

  3. Copy the script to /usr/local/bin directory

    cp pastebin /usr/local/bin

If every thing is ok, it will shows the pastebin url like below

root@shadows:~# echo "Huge output from logs that we need to share." | pastebin -n "pastebin-tool-test"

A simple shell script that fills zeros in empty space. Please refer stackoverflow question for more info

./ fast shutdown  # Fast wipe and shutdowns
./ fast reboot  # Fast wipe and restart
  • Avaiable wipes (Arguments)
    • fast
    • med
    • slow


Simple HTTP server. You can share your directory in LAN

Download: wget -qO && python

veeru@ultron:~/$ python -h
usage: [-h] [-H HOST] [-p PORT] [-d WEB_DIR]

Simple HTTP Server

optional arguments:
  -h, --help  show this help message and exit
  -H HOST     Host IP. Default:
  -p PORT     Port. Default: 8001
  -d WEB_DIR  Web Directory. Default: pwd
  • Run the script from anywhere
wget -qO httpserver
sudo chmod +x httpserver
sudo mv httpserver /usr/local/bin/


An automated script to setup VPN with openvpn. Usefull when setting up VPN with .ovpn config file(For example Tunnel Bear, ProtonVPN).

  • After you donwload, change OVPN_DIRECTORY location in script which contains .ovpn files.

  • Create auth.txt and specify location at AUTH_FILE_LOCATION

    The auth.txt should like below

Required Packages
  • sudo apt-get install openvpn network-manager-openvpn-gnome network-manager-openvpn-gnome resolvconf
$ python -h
usage: [-h] [-k] [-c]

A simple automated script to septup VPN with openvpn [Coded by @veerendra2]

optional arguments:
   -h, --help  show this help message and exit
   -k          Graceful killing of openvpn process
   -c          Check openvpn is running
  • Run from anywhere
wget -qO httpserver
sudo chmod +x openvpn_auto
sudo mv openvpn_auto /usr/local/bin/