AnonYou.sh 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. #!/bin/bash
  2. #=======================================
  3. #Colors
  4. #=======================================
  5. greenf="\033[1;32m"
  6. BlueF='\e[1;34m'
  7. end="\033[0m"
  8. red='\e[1;31m'
  9. slimred='\e[0;31m'
  10. #=======================================
  11. banner() {
  12. echo -e "${red} █████╗ ███╗ ██╗ █████╗ ███╗ ██╗██╗ ██╗ █████╗ ██╗ ██╗
  13. ██╔══██╗████╗ ██║██╔══██╗████╗ ██║╚██╗ ██╔╝██╔══██╗██║ ██║
  14. ███████║██╔██╗██║██║ ██║██╔██╗██║ ╚████╔╝ ██║ ██║██║ ██║
  15. ██╔══██║██║╚████║██║ ██║██║╚████║ ╚██╔╝ ██║ ██║██║ ██║
  16. ██║ ██║██║ ╚███║╚█████╔╝██║ ╚███║ ██║ ╚█████╔╝╚██████╔╝
  17. ╚═╝ ╚═╝╚═╝ ╚══╝ ╚════╝ ╚═╝ ╚══╝ ╚═╝ ╚════╝ ╚═════╝ ${end}"
  18. echo ""
  19. }
  20. checkroot() {
  21. if (( "$EUID" != 0 ));then
  22. clear
  23. echo -e "${slimred}Sorry, I need root to do things.."
  24. echo -e "All actions provided by the program require root access."
  25. echo -e "Please use the sudo command or contact your system administrator.${end}"
  26. exit 1
  27. else
  28. clear
  29. installreq
  30. torcheck
  31. privoxycheck
  32. mac_c_check
  33. sdmemcheck
  34. echo "Press [ENTER] to go to main menu!"
  35. read aoshofhaiosfhsi
  36. main
  37. fi
  38. }
  39. installreq() {
  40. echo "Can I install depencies?(y/n)"
  41. read -p $'\e[1;31m>>>\e[0m ' caninstall
  42. case $caninstall in
  43. y)
  44. dinstall=1
  45. ;;
  46. n)
  47. dinstall=0
  48. ;;
  49. *)
  50. echo "Error input, exiting..."
  51. exit 1
  52. ;;
  53. esac
  54. }
  55. torcheck() {
  56. which tor > /dev/null 2>&1
  57. if [ "$?" -eq "0" ]; then
  58. echo -e "${end}Tor......................[ ${greenf}Found${end} ]"
  59. torinstalled=1
  60. elif [ "$?" -ne "0" ];then
  61. echo -e "Tor...........................[ ${orange}Not found${end} ]"
  62. if [ $dinstall -eq "1" ];then
  63. echo -e "Installing Tor...."
  64. sudo apt-get install tor -y > /dev/null 2>&1
  65. which tor > /dev/null 2>&1
  66. if [ "$?" -eq "0" ];then
  67. echo -e "${greenf}Succesfully installed Tor${end}"
  68. torinstalled=1
  69. else
  70. echo -e "${orange}Something went wrong while tor installation...Please, restart the program and try again!${end}"
  71. torinstalled=0
  72. fi
  73. fi
  74. else
  75. echo -e "Tor......................[ ${red}Not found${end} ]"
  76. torinstalled=0
  77. fi
  78. }
  79. sdmemcheck() {
  80. which sdmem > /dev/null 2>&1
  81. if [ "$?" -eq "0" ]; then
  82. echo -e "${end}sdmem......................[ ${greenf}Found${end} ]"
  83. sdmeminstalled=1
  84. elif [ "$?" -ne "0" ];then
  85. echo -e "sdmem...........................[ ${orange}Not found${end} ]"
  86. if [ $dinstall -eq "1" ];then
  87. echo -e "Installing secure-delete...."
  88. sudo apt-get install secure-delete -y > /dev/null 2>&1
  89. which sdmem > /dev/null 2>&1
  90. if [ "$?" -eq "0" ];then
  91. echo -e "${greenf}Succesfully installed sdmem${end}"
  92. sdmeminstalled=1
  93. else
  94. echo -e "${orange}Something went wrong while sdmem installation...Please, restart the program and try again!${end}"
  95. sdmeminstalled=0
  96. fi
  97. fi
  98. else
  99. echo -e "secure-delete......................[ ${red}Not found${end} ]"
  100. sdmeminstalled=0
  101. fi
  102. }
  103. mac_c_check() {
  104. which macchanger > /dev/null 2>&1
  105. if [ "$?" -eq "0" ]; then
  106. echo -e "${end}macchanger......................[ ${greenf}Found${end} ]"
  107. macchangerinstalled=1
  108. elif [ "$?" -ne "0" ];then
  109. echo -e "macchanger...........................[ ${orange}Not found${end} ]"
  110. if [ $dinstall -eq "1" ];then
  111. echo -e "Installing macchanger...."
  112. sudo apt-get install macchanger -y > /dev/null 2>&1
  113. which macchanger > /dev/null 2>&1
  114. if [ "$?" -eq "0" ];then
  115. echo -e "${greenf}Succesfully installed macchanger${end}"
  116. macchangerinstalled=1
  117. else
  118. echo -e "${orange}Something went wrong while macchanger installation...Please, restart the program and try again!${end}"
  119. macchangerinstalled=0
  120. fi
  121. fi
  122. else
  123. echo -e "macchanger......................[ ${red}Not found${end} ]"
  124. macchangerinstalled=0
  125. fi
  126. }
  127. privoxycheck() {
  128. which privoxy > /dev/null 2>&1
  129. if [ "$?" -eq "0" ]; then
  130. echo -e "${end}Privoxy......................[ ${greenf}Found${end} ]"
  131. privoxyinstalled=1
  132. elif [ "$?" -ne "0" ];then
  133. echo -e "Privoxy...........................[ ${orange}Not found${end} ]"
  134. if [ $dinstall -eq "1" ];then
  135. echo -e "Installing Privoxy...."
  136. sudo apt-get install privoxy -y > /dev/null 2>&1
  137. which privoxy > /dev/null 2>&1
  138. if [ "$?" -eq "0" ];then
  139. echo -e "${greenf}Succesfully installed Privoxy${end}"
  140. privoxyinstalled=1
  141. else
  142. echo -e "${orange}Something went wrong while Privoxy installation...Please, restart the program and try again!${end}"
  143. privoxyinstalled=0
  144. fi
  145. fi
  146. else
  147. echo -e "Privoxy......................[ ${red}Not found${end} ]"
  148. privoxyinstalled=0
  149. fi
  150. }
  151. main() {
  152. clear
  153. banner
  154. sleep 0.01
  155. echo "[1] Spoof MAC address"
  156. sleep 0.01
  157. echo "[2] Enable Tor-bridges"
  158. sleep 0.01
  159. echo "[3] Remove rsyslog(dangerous)"
  160. sleep 0.01
  161. echo "[4] Secure RAM wiping"
  162. sleep 0.01
  163. echo "[5] Secure swap space wiping"
  164. sleep 0.01
  165. echo "[6] File shreder"
  166. sleep 0.01
  167. echo "[7] User Guide"
  168. sleep 0.01
  169. echo "[8] Exit"
  170. read -p $'\e[1;31m>>>\e[0m ' main_choise
  171. case $main_choise in
  172. 1)
  173. if [ $macchangerinstalled -eq "1" ];then
  174. spoofer
  175. else
  176. echo "Seems like you haven't macchanger.."
  177. echo "Please, install macchanger and try again!"
  178. echo "Press [ENTER] to return to main menu!"
  179. read oiashfasiofjo
  180. main
  181. fi
  182. ;;
  183. 2)
  184. if [ $torinstalled -eq "1" ] && [ $privoxyinstalled -eq "1" ];then
  185. torbridges
  186. else
  187. echo "Seems like you haven't tor or privoxy.."
  188. echo "Please, restart the script and install requiements!"
  189. echo "Press [ENTER] to return to main menu!"
  190. read oiashfasiofjo
  191. main
  192. fi
  193. ;;
  194. 3)
  195. remrsyslog
  196. ;;
  197. 4)
  198. if [ $sdmeminstalled -eq "1" ];then
  199. wipemem
  200. else
  201. echo "Seems like you haven't secure-delete.."
  202. echo "Please, install secure-delete and try again!"
  203. echo "Press [ENTER] to return to main menu!"
  204. read oiashfasiofjo
  205. main
  206. fi
  207. ;;
  208. 5)
  209. if [ $sdmeminstalled -eq "1" ];then
  210. swapclean
  211. else
  212. echo "Seems like you haven't secure-delete.."
  213. echo "Please, install secure-delete and try again!"
  214. echo "Press [ENTER] to return to main menu!"
  215. read oiashfasiofjo
  216. main
  217. fi
  218. ;;
  219. 6)
  220. shreder
  221. ;;
  222. 7)
  223. userguide
  224. ;;
  225. 8)
  226. exit
  227. ;;
  228. *)
  229. echo "Error input, repeating.."
  230. sleep 1
  231. main
  232. ;;
  233. esac
  234. }
  235. spoofer() {
  236. clear
  237. echo "------------------------------------------------------------------------------------------"
  238. array_test=()
  239. for iface in $(ifconfig | cut -d ' ' -f1| tr ':' '\n' | awk NF)
  240. do
  241. printf "$iface\n" > /dev/null 2>&1
  242. array_test+=("$iface")
  243. done
  244. echo -e "Available interfaces : ${BlueF}${array_test[@]}${end}"
  245. echo "------------------------------------------------------------------------------------------"
  246. echo ""
  247. cur_interface=$(ip route show default | awk '/default/ {print $5}')
  248. cur_mac=$(ifconfig $cur_interface | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}')
  249. echo "Changing the MAC-address for your current interface : $cur_interface($cur_mac)"
  250. echo ""
  251. echo "If it's right, just press [ENTER] to perform actions"
  252. echo "If it's not right - please, enter the name of your interface below"
  253. read -p $'\e[1;31m>>>\e[0m ' int
  254. case $int in
  255. "")
  256. inter=$cur_interface
  257. ;;
  258. *)
  259. inter=$int
  260. ;;
  261. esac
  262. clear
  263. banner
  264. echo "------------------------------------------------------------------------------------------"
  265. echo "1. Make random MAC address"
  266. echo "2. Make specified MAC address"
  267. read -p $'\e[1;31m>>>\e[0m ' whichmac
  268. case $whichmac in
  269. 1)
  270. echo "Performing actions, please wait.."
  271. macchanger -s $inter > /dev/null 2>&1
  272. ifconfig $inter down > /dev/null 2>&1
  273. macchanger -r $inter > /dev/null 2>&1
  274. ifconfig $inter up > /dev/null 2>&1
  275. macchanger -s $inter > /dev/null 2>&1
  276. newmac=$(ifconfig $inter | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}')
  277. echo "Done!"
  278. echo "Your new mac-address is $newmac"
  279. echo "Press [ENTER] to return to main menu!"
  280. read kasjfsa
  281. main
  282. ;;
  283. 2)
  284. clear
  285. echo "Input new MAC address in the next format : 1a:2b:3c:4d:5e:6f"
  286. read -p $'\e[1;31m>>>\e[0m ' custommac
  287. echo "Performing actions, please wait..."
  288. ifconfig $inter down > /dev/null 2>&1
  289. macchanger -m $custommac $inter > /dev/null 2>&1
  290. ifconfig $inter up > /dev/null 2>&1
  291. macchanger -s $inter > /dev/null 2>&1
  292. newmac=$(ifconfig $inter | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}')
  293. echo "Done!"
  294. echo "Your new mac-address is $newmac"
  295. echo "Press [ENTER] to return to main menu!"
  296. read kasjfsa
  297. main
  298. ;;
  299. *)
  300. echo "Error input, repeating.."
  301. sleep 1
  302. spoofer
  303. ;;
  304. esac
  305. }
  306. swapclean() {
  307. clear
  308. echo "How do you want to wipe the swap space?"
  309. echo ""
  310. echo "1. Wipe fast(insecure)"
  311. echo "2. Wipe secure(slow)"
  312. echo "3. I've changed my mind, go to main menu!"
  313. echo "4. Exit"
  314. read -p $'\e[1;31m>>>\e[0m ' how2wipeswap
  315. case $how2wipeswap in
  316. 1)
  317. echo "Unmounting swap devices"
  318. swapoff -a
  319. echo "Mounting swap devices"
  320. swapon -a
  321. echo "Done! Swap space cleared succesfully"
  322. echo "Press [ENTER] to return to main menu!"
  323. read ioasjfasf
  324. main
  325. ;;
  326. 2)
  327. swapon -s
  328. echo "Enter your swap device manually(example : /dev/dm-2)"
  329. read -p $'\e[1;31m>>>\e[0m ' swapdev
  330. echo "Device : $swapdev selected, unmounting.."
  331. swapoff -a
  332. echo "Wiping $swapdev, process may be very slow"
  333. sswap -v $swapdev
  334. echo "Device $swapdev succesfully wiped, mounting it back.."
  335. swapon -a
  336. echo "Done! Press [ENTER] to return to main menu!"
  337. read asjfaspfp
  338. main
  339. ;;
  340. 3)
  341. main
  342. ;;
  343. 4)
  344. exit 0
  345. ;;
  346. *)
  347. echo "Error input, repeating.."
  348. sleep 1
  349. swapclean
  350. ;;
  351. esac
  352. }
  353. userguide() {
  354. clear
  355. banner
  356. echo "------------------------------------------------------"
  357. echo "1. What is TOR?"
  358. echo "2. What is MAC address and why I need to change it?"
  359. echo "3. What is RSYSLOG?"
  360. echo "4. What is RAM wiping?"
  361. echo "5. What is swap space wiping?"
  362. echo "6. What is shreder?"
  363. echo "7. Go back to menu"
  364. read -p $'\e[1;31m>>>\e[0m ' usg
  365. case $usg in
  366. 1)
  367. echo "TOR (The onion router) is a special network of hundreds of computers around the world to anonymize your traffic"
  368. echo "This network works like this: there are only 3 nodes through which all your traffic before getting to the target server, at the same time imposing a layer of encryption on all traffic (except for the last node on the output), from this came the name 'onion network'"
  369. echo ""
  370. echo "More information about Tor you can read on the official site of the developers"
  371. echo "https://www.torproject.org/"
  372. echo "Press [ENTER] to return back"
  373. read oaisofhaspfj
  374. userguide
  375. ;;
  376. 2)
  377. echo "MAC is a special 'physical' address of your device (media access control address)"
  378. echo "Each computer component has its own default MAC address ( mouses, keyboards have their own MAC address as well)"
  379. echo "MAC address is used for a kind of identification of the device in the network, and system administrators can put 'filters' on the MAC address, thus creating white and black lists"
  380. echo ""
  381. echo "An example of such filtering is Wi-Fi. A person can enter in the router settings a list of his own MAC addresses, and only they will be able to connect to the network, and others will not"
  382. echo "By changing the MAC address, you can bypass some of the 'hardware' blockages, as well as complicate the identification of your devices within the network"
  383. echo "Press [ENTER] to return back"
  384. read oaisofhaspfj
  385. userguide
  386. ;;
  387. 3)
  388. echo "rsyslog is a special system log that stores information about almost every action of the system"
  389. echo ""
  390. echo "On the one hand, it is a very important element for system administrators, allowing them to monitor system usage and timely detect any intrusion attempts or suspicious user activity"
  391. echo ""
  392. echo "On the other hand, if you are an ordinary user, you will not need rsyslog very much, because it also takes a lot of space over time and contains information that can be read by intruders"
  393. echo "Press [ENTER] to return back"
  394. read oaisofhaspfj
  395. userguide
  396. ;;
  397. 4)
  398. echo "Clean up RAM - the process of removing data from RAM and speeding up the system"
  399. echo "When the system is running, a lot of data is stored in RAM"
  400. echo ""
  401. echo "This data is deleted after a system reboot, however, in digital forensics there is a process of 'cold reboot' when RAM is removed from a powered-up computer by freezing (dry nitrogen)"
  402. echo "It remains switched on for some time, during which it can be connected to a special computer and the RAM dumped, thus compromising all the information from it (including the system's encryption keys)"
  403. echo ""
  404. echo "Secure RAM cleanup offers a complete, but not a quick RAM cleanup, thus protecting such data from all possible compromise"
  405. echo "Press [ENTER] to return back"
  406. read oaisofhaspfj
  407. userguide
  408. ;;
  409. 5)
  410. echo "Swap space wiping is the process of removing data from a special space reserved by the system"
  411. echo "When you run out of RAM, the data starts to be processed in the swap file, which makes the system run much faster"
  412. echo ""
  413. echo "Such files can be read and restored"
  414. echo "For this purpose, there is a special utility that can safely clear this space, making it impossible to read and restore data from it"
  415. echo "Press [ENTER] to return back"
  416. read oaisofhaspfj
  417. userguide
  418. ;;
  419. 6)
  420. echo "The shredder is a feature that allows you to irretrievably delete files."
  421. echo "The function uses the built-in 'shred' utility."
  422. echo ""
  423. echo "When you delete a file, it is not actually deleted, but 'invisible' to the system until it is overwritten later."
  424. echo "A newly deleted file can very easily be recovered with special utilities and equipment."
  425. echo "Once a file has been overwritten several times (usually about 30) it cannot be recovered"
  426. echo ""
  427. echo "shred deletes files by multiple overwrites of the deleted file so it is almost impossible to recover a rewritten file even with very expensive hardware."
  428. echo "In addition, the file name and size are overwritten, making it impossible to identify the file even if you try to restore it."
  429. echo ""
  430. echo "It is worth mentioning that it is strongly not recommended to use this feature when cleaning a file from solid-state drives (SSDs), because SSDs have a different structure than HDDs, which can be irreparably damaged by such overwriting."
  431. echo "Press [ENTER] to return back"
  432. read oaisofhaspfj
  433. userguide
  434. ;;
  435. 7)
  436. main
  437. ;;
  438. *)
  439. echo "Error input, repeating.."
  440. sleep 1
  441. userguide
  442. ;;
  443. esac
  444. }
  445. shreder() {
  446. clear
  447. banner
  448. echo "1. I want to remove all from directory"
  449. echo "2. I want to remove single file"
  450. read -p $'\e[1;31m>>>\e[0m ' shredopt
  451. case $shredopt in
  452. 1)
  453. echo "Enter or Drag'n'Drop directory path to shred"
  454. read -p $'\e[1;31m>>>\e[0m ' directory
  455. dir2shred=$directory*
  456. echo "Shredding all from directory $directory, please wait"
  457. shred -v -f -n 30 -z $dir2shred
  458. echo "Done! Press [ENTER] to return to main menu!"
  459. read asihofhasof
  460. main
  461. ;;
  462. 2)
  463. echo "Drag'n'Drop or enter your file to shred"
  464. read -p $'\e[1;31m>>>\e[0m ' file2shred
  465. echo "Shredding your file ($file2shred). Please wait.."
  466. shred -v -f -n 30 -z $file2shred
  467. echo "Done! Press [ENTER] to return to main menu!"
  468. read asihofhasof
  469. main
  470. ;;
  471. *)
  472. echo "Error input, repeating.."
  473. sleep 1
  474. shreder
  475. ;;
  476. esac
  477. }
  478. wipemem() {
  479. clear
  480. banner
  481. echo "Wiping RAM memory is slow process,but very effective in the sense that after such a rewrite it is almost impossible to 'take out' anything from the RAM."
  482. echo "But in case, if you want to wipe your RAM fast, select the 2nd option"
  483. echo "However, some things can be restored if you will select fast option"
  484. echo ""
  485. echo "1. Wipe my RAM securely, I have a lot of time"
  486. echo "2. Wipe my RAM fast(non-secure)"
  487. echo "3. Do nothing, I've changed my mind. Go to main menu"
  488. echo "4. Exit"
  489. read -p $'\e[1;31m>>>\e[0m ' how2wipemem
  490. case $how2wipemem in
  491. 1)
  492. wiperamsec
  493. ;;
  494. 2)
  495. wiperamfast
  496. ;;
  497. 3)
  498. main
  499. ;;
  500. 4)
  501. exit 0
  502. ;;
  503. esac
  504. }
  505. wiperamsec() {
  506. echo "Wiping your RAM hard, please wait"
  507. echo "Try to not use your computer now"
  508. sleep 5
  509. echo "Dropping your caches.."
  510. echo 1024 > /proc/sys/vm/min_free_kbytes
  511. echo 3 > /proc/sys/vm/drop_caches
  512. echo 1 > /proc/sys/vm/oom_kill_allocating_task
  513. echo 1 > /proc/sys/vm/overcommit_memory
  514. echo 0 > /proc/sys/vm/oom_dump_tasks
  515. echo "Wiping your RAM(may take some time)"
  516. sdmem -v
  517. echo "Done! Your RAM is wiped succesfully"
  518. echo "Shutting down your machine. Have a nice day!"
  519. }
  520. wiperamfast() {
  521. echo "Wiping your RAM fast, please wait"
  522. echo "Try to not use your computer now"
  523. sleep 5
  524. echo "Dropping your caches.."
  525. echo 1024 > /proc/sys/vm/min_free_kbytes
  526. echo 3 > /proc/sys/vm/drop_caches
  527. echo 1 > /proc/sys/vm/oom_kill_allocating_task
  528. echo 1 > /proc/sys/vm/overcommit_memory
  529. echo 0 > /proc/sys/vm/oom_dump_tasks
  530. echo "Wiping your RAM(may take some time)"
  531. sdmem -fllv
  532. }
  533. torbridges() {
  534. clear
  535. banner
  536. grep -iRl "forward-socks4a / localhost:9050 ." /etc/privoxy/config > /dev/null 2>&1
  537. if [ "$?" -eq "0" ] || [ "$?" -eq "130" ];then
  538. echo "Config already added, starting services.."
  539. echo "Starting tor service"
  540. service tor start
  541. echo "Done"
  542. echo "Starting privoxy service"
  543. service privoxy start
  544. echo "Done!"
  545. echo "Now, manually add this proxies in your system proxy parameters"
  546. echo "HTTP Proxy : localhost:8118"
  547. echo "HTTPS Proxy : localhost:8118"
  548. echo "SOCKS Proxy : localhost:9050"
  549. echo "After adding proxy, you visit any site through TOR network!"
  550. echo "Press [ENTER] to return to main menu!"
  551. read kdskpjpf
  552. main
  553. else
  554. echo "Configuring Privoxy, please wait.."
  555. echo "forward-socks5 / localhost:9050 ." >> /etc/privoxy/config
  556. echo "forward-socks4 / localhost:9050 ." >> /etc/privoxy/config
  557. echo "forward-socks4a / localhost:9050 ." >> /etc/privoxy/config
  558. echo "Starting tor service"
  559. service tor start
  560. echo "Done..."
  561. echo "Starting privoxy service"
  562. service privoxy start
  563. echo "Done!"
  564. echo "Now, manually add this proxies in your system proxy parameters"
  565. echo "HTTP Proxy : localhost:8118"
  566. echo "HTTPS Proxy : localhost:8118"
  567. echo "SOCKS Proxy : localhost:9050"
  568. echo "After adding proxy, you visit any site through TOR network!"
  569. echo "Press [ENTER] to return to main menu!"
  570. read kdskpjpf
  571. main
  572. fi
  573. }
  574. remrsyslog() {
  575. which rsyslogd > /dev/null 2>&1
  576. if [ "$?" -eq "0" ]; then
  577. echo "Are you sure that you want to remove rsyslog?"
  578. echo "In case your system may be hacked, you couldn't check the logs"
  579. echo "Enter : 'YES REMOVE RSYSLOG' to continue or 'back' to return to main menu"
  580. read -p $'\e[1;31m>>>\e[0m ' removeornot
  581. case $removeornot in
  582. "YES REMOVE RSYSLOG")
  583. echo "Removing rsyslog, please wait"
  584. sudo apt-get remove rsyslog -y > /dev/null 2>&1
  585. which rsyslogd > /dev/null 2>&1
  586. if [ "$?" -eq "1" ]; then
  587. echo "Done. rsyslog has been removed succesfully"
  588. echo "Press [ENTER] to return to main menu!"
  589. read oashfoadshig
  590. main
  591. else
  592. echo "Something went wrong while removing rsyslog"
  593. echo "Please, try again"
  594. echo "Press [ENTER] to return to main menu!"
  595. read aisohfahfp
  596. main
  597. fi
  598. ;;
  599. "back")
  600. main
  601. ;;
  602. *)
  603. echo "Error input, going back to main menu!"
  604. sleep 1
  605. main
  606. ;;
  607. esac
  608. else
  609. echo "No rsyslog detected, so not removed!"
  610. echo "Press [ENTER] to return to main menu!"
  611. read hashfkahshf
  612. main
  613. fi
  614. }
  615. checkroot