v1ral_ITS

Easily Safely Execute Any Root Cmds [ terminal ] GUI Example

Apr 2nd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.23 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. ####################################
  10. # VARIABLES IN ALL CAPS HERE FIRST #
  11. ####################################
  12.     # Console colors
  13.     W='\033[0m'  # white (normal)
  14.     R='\033[31m'  # red
  15.     G='\033[32m'  # green
  16.     O='\033[33m'  # orange
  17.     B='\033[34m'  # blue
  18.     P='\033[35m'  # purple
  19.     C='\033[36m'  # cyan
  20.     GR='\033[37m'  # gray
  21.     TAB=$( printf "\t" )
  22. ##############################################################################################
  23. # BEGIN SCRIPT MULTIPLE OPTIONS PROMPTS ETC EASY SAFETY ROOT COMMANDS AND HELPFUL SMALL LIST #
  24. ##############################################################################################
  25.     echo -e $C"`busybox > cmds.$$`"
  26.     read -p "See A Short Helpful List Of Avaliable Commands (y/n):" LSK
  27.     if [[ $LSK == y ]]; then
  28.         cat cmds.$$
  29.     fi
  30.     rm -R cmds.$$  
  31.     msg=$(kdialog --title "Any Sudo Commands" --inputbox "Enter Your Command(s) here:" )
  32.     notify-send "Sudo $msg Will Be Executed" -i face-smile
  33.     sudo $msg
  34.     echo -e $GR"Command=$TAB[ $msg ]"
  35.     echo -e $B"Done!"
  36.     echo -e $O"As A Precaution, Please Make Sure You Want To Execute This Root Command, Please Hit [E]nter After [y]or[n] \n$TAB You May Do This Quickly: \nNow:"
  37.     echo -e $C"$TAB $TAB Execute another command? [y]or[no]"
  38.     read TGH
  39.     if [[ $TGH == y ]]; then
  40.         cmd
  41.     fi
  42.     echo -e "Current Working Directory Is:  \nDirectory=`pwd`"    
  43.     echo -e $R"Goodbye!"
  44.     echo -e $B"Shell Scripting Solutions To Make Your Life Easier: 2018 TM v1ral <ImPerialTeKSolutions@outlook.com>"
  45.     date
  46. #######
  47. # END #
  48. #######
Add Comment
Please, Sign In to add comment