v1ral_ITS

Easy new command line program for removing tun# adapters

Mar 29th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.39 KB | None | 0 0
  1. #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::                                                                                                                       ::
  2. #::                                                              ::
  3. #::  QUICK AND EASY COMMAND TO GE RID OF ANY REMAINING OLD tun# ADAPTERS FROM openvpn COMMAND LINE                           ::
  4. #::                                                                  ::
  5. #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6. # ImPerial TeK. Solutions (ITS)
  7. # Copyright (C) 2018 v1ral <ImPerialTeKSolutions@outlook.com
  8. #!/bin/bash
  9. PROGRAM="ipdel"
  10. # Name of our program
  11. S="sudo"
  12. # You will need elevated privledges to run this script
  13. LIST="ifconfig"
  14. # To show you the active running adapters
  15. RMV="ip link del"
  16. # To remove the chosen active adapter
  17. echo -e "\n"
  18. echo -e "For help about this command, please type --help\n"
  19. if [[ $1 == --help ]]; then
  20.     echo -e "\nUsage: $PROGRAM <command>"
  21.     echo -e "\nCommands are"
  22.     echo -e     "   list  List the currently active adapters being used by your internet"
  23.     echo -e     "   rmv   Remove any currently listed and active adapters being used by your internet"
  24. fi
  25. if [[ $1 == list ]]; then
  26.     $S $LIST   
  27. fi
  28. if [[ $1 == rmv ]]; then
  29.     echo -e "Please first enter the command ipdel list, if you have already done so \ncopy and paste now the name including the number if its a tun adapter: "
  30.     read TUN
  31.     $S $RMV $TUN
  32. fi
Add Comment
Please, Sign In to add comment