Advertisement
Guest User

Error....

a guest
Mar 21st, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.53 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. path=$(pwd)
  4. backup_window_size="printf '\e[8;24;80t'"
  5.  
  6.  
  7.  
  8. #some colors
  9. RED="\e[31m"
  10. GREEN="\e[32m"
  11. YELLOW="\e[33m"
  12. BLUE="\e[34m"
  13. MAGENTA="\e[35m"
  14. CYAN="\e[36m"
  15. RESTORE="\e[39"
  16. BOLD="\e[1m"
  17. NORMAL="\e[0m"
  18.  
  19. printf '\e[8;35;100t'
  20.  
  21. #functions
  22.  
  23.  
  24. function err_report {
  25. if exit[1]
  26. then
  27. echo -e $RED "Please report all errors to: ${BLUE}https://github.com/ViperZCrew"
  28. read -p "Do you want to report error?[Y/N]: " rprt
  29. if [[ $rprt == "y" || $rprt == "Y" ]]
  30. then
  31. firefox https://github.com/ViperZCrew
  32. else
  33. err_solver
  34. fi
  35. fi
  36. }
  37.  
  38. function err_solver {
  39.  
  40. clear
  41. echo -e "${RED}[!] ${YELLOW}Wrong command..."
  42. sleep 2
  43. clear
  44. bash automation.sh
  45. }
  46.  
  47. function package_installer {
  48.  
  49. echo -e $BOLD ""
  50. echo -ne "${CYAN}Tilix... -> "
  51. sleep 0.5
  52. if ! hash tilix 2>/dev/null;then
  53. echo -e $RED "Not installed [✗]"
  54. apt install tilix -y
  55. else
  56. echo -e $GREEN "Installed [✓]"
  57. fi
  58.  
  59. echo -e $BOLD ""
  60. echo -ne "${CYAN}Python... -> "
  61. sleep 0.5
  62. if ! hash python 2>/dev/null;then
  63. echo -e "\e[1;31mNot installed [✗]"
  64. apt install python -y
  65. else
  66. echo -e "\e[;32mInstalled [✓]"
  67. fi
  68.  
  69. echo -e $BOLD ""
  70. echo -ne "${CYAN}Nano... -> "
  71. sleep 0.5
  72. if ! hash nano 2>/dev/null;then
  73. echo -e $RED "Not installed [✗]"
  74. apt install nano -y
  75. else
  76. echo -e $GREEN "Installed [✓]"
  77. fi
  78.  
  79. # echo -e $BOLD ''
  80. # echo -ne "${CYAN}Fish... -> "
  81. # sleep 0.5
  82. # if ! hash fish 2>/dev/null;then
  83. # echo -e $RED "Not installed [✗]"
  84. # apt install fish -y
  85. # else
  86. # echo -e $GREEN "Installed [✓]"
  87. # fi
  88. # fish is not really required, only for beginners, you can install it by apt install fish.
  89.  
  90. }
  91.  
  92. function command_check {
  93.  
  94. echo -e "${RED}[*] ${YELLOW}Checking if tool callable..."
  95. sleep 1
  96. echo -e "${RED}[*] ${YELLOW}Current path: ${MAGENTA}$path."
  97. sleep 2
  98. echo -e "${RED}[*] ${YELLOW}Adding tool to call list."
  99. sleep 1
  100. export pwd=$path
  101. echo -e "alias tmaker='cd ${path} && ./4ut0m4t10n.sh'" >> /root/.bashrc
  102. #FILE="$path/backup/.bashrc"
  103. #if [ -f "$FILE" ]
  104. #then
  105. # echo -e "${RED}[!] ${YELLOW}Backup created."
  106. #else
  107. # cp -R /root/.bashrc $path/backup
  108. #fi
  109. #awk '!a[$0]++' /root/.bashrc >> /root/.bashr
  110. #rm /root/.bashrc
  111. #mv -v /root/.bashr /root/.bashrc &>/dev/null
  112. echo -e "${RED}[*] ${YELLOW}Run this tool by: ${BLUE}tmaker${YELLOW}."
  113. echo -e "${RED}[*] ${YELLOW}Removed duplicates lines."
  114.  
  115. }
  116.  
  117. function pause {
  118. read -p "$*"
  119. }
  120.  
  121. function full_config {
  122. clear
  123. echo -e "${GREEN}Checking root..."
  124. echo ''
  125. sleep 1
  126. if [ "$EUID" -ne 0 ]
  127. then
  128. echo -e "${RED}[✗] No root detected >:("
  129. else
  130. echo -e "${GREEN}[✓] Root Access :)"
  131. fi
  132. sleep 1.5
  133. pause 'Press [Enter] to continue to start....'
  134. echo -e $YELLOW"[!] Starting package installer.."
  135. sleep 0.5
  136.  
  137. package_installer
  138. echo -e "${CYAN}[!] Configuring your source list."
  139. sleep 0.7
  140. clear
  141. echo -e "${CYAN}[!] Configuring your source list.."
  142. sleep 0.7
  143. clear
  144. echo -e "${CYAN}[!] Configuring your source list..."
  145. sleep 0.7
  146. rm -rf /etc/apt/sources.list
  147. touch /etc/apt/sources.list
  148. echo "deb http://http.kali.org/kali kali-rolling main non-free contrib
  149. deb-src http://http.kali.org/kali kali-rolling main non-free contrib
  150. deb https://deb.torproject.org/torproject.org stretch main
  151. deb-src https://deb.torproject.org/torproject.org stretch main" >> /etc/apt/sources.list
  152. cound_words=$(wc -l /etc/apt/sources.list | cut -d\ -f 1)
  153. sleep 1
  154. echo -e $BLUE"Added ${RED}$cound_words ${BLUE}lines to sources list."
  155. pause 'Press [Enter] to continue....'
  156. echo -e $BOLD ""
  157. echo -e $YELLOW ""
  158. read -p "[*] Do you want to see the added lines[y/N]? " sl
  159. if [[ $sl == "y" || $sl == "Y" ]]
  160. then
  161. cd lib
  162. tilix -e bash source.sh
  163. sleep 0.5
  164. killp=$(ps aux | grep xterm | head -1 | awk '{print $2}')
  165. kill -9 $killp 2>/dev/null
  166. cd ..
  167. else
  168. echo ""
  169. echo -e "${RED}[skiping] ${YELLOW}Ignoring new entries at ${RED}/etc/apt/sources.list..."
  170. sleep 1
  171. fi
  172. echo -e $BOLD ""
  173. echo -e $RED"[!] Importing kali.org archive key:"
  174. wget -q -O - https://www.kali.org/archive-key.asc | apt-key add -
  175. echo -e "${YELLOW}[!] Updating system."
  176. apt update
  177. apt upgrade -y
  178. #apt full-upgrade -y
  179. echo ""
  180. echo -e "${GREEN}[✓] ${CYAN}Your system has been updated."
  181. pause 'Press [Enter] to continue....'
  182. sleep 1
  183. clear
  184. echo -e $CYAN ""
  185. echo -e $BOLD ""
  186. read -p "Do you want to see your kali linux version[y/N]? " kv
  187. if [[ $kv == "y" || $kv == "Y" ]]
  188. then
  189. vk=$(cat /etc/os-release | grep VERSION= | sed -n 's/[A-Z"=]//g;p')
  190. clear
  191. echo -e "${BOLD}"
  192. echo -e "${GREEN}[*] Your kali version is:${RED} $vk${GREEN}."
  193. else
  194. echo -e "${GREEN}[✓] ${CYAN}Done!"
  195. pause 'Press [Enter] to continue....'
  196. fi
  197. sleep 1
  198. echo -e $MAGENTA ""
  199. read -p "[*] Do you want install packages[y/N]? " pck
  200. if [[ $pck == "y" || $pck == "Y" ]]
  201. then
  202. echo -e "[~] ${GREEN}Installing new packages, get something to drink and relax.."
  203. apt install python3 python3-* tor tor-arm torbrowser-launcher proxychains filezilla* software-center gdebi geany neofetch git bettercap urlsnarf ngrep awk curl mdk3 mdk4 bc cowpatty php-cgi php apache2 libssl-dev gpa gnupg2 net-tools wget postfix libncurses5 libxml2 tcpdump libexiv2-dev build-essential python-xmpp python-pip ssh ssh-tools htop stacer bleachbit leafpad snapd yersinia cmake make g++ gcc libidevicemobile openssh-server openssl screen wapiti whatweb nmap golismero host wget uniscan wafw00f dirb davtest theharvester xsser dnsrecon fierce dnswalk whois sslyze lbd dnsenum dmitry davtest nikto dnsmap netcat gvfs gvfs-common gvfs-daemons gvfs-libs gconf-service gconf2 gconf2-common gvfs-bin psmisc -y
  204. clear
  205. echo -e $GREEN "[✓] ${CYAN}Packages has been successfully installed."
  206. sleep 2
  207. clear
  208. echo ''
  209. echo -e $BOLD "${BLUE}
  210. Kali linux has some metapackages, means it installs particular stuff you maybe need, i will list some options which you can choose to countinue.
  211.  
  212. ${RED}[> kl <] -:- ${YELLOW}Kali linux metapackage includes various network service such as apache and ssh, the kernel of kali and many updated versions. [1,5 GB]
  213.  
  214. ${RED}[> kf <] -:- ${YELLOW}Kali Forensic is perfectly for forensic works. This resource contains forensic tools. [3,1 GB]
  215.  
  216. ${RED}[> kp <] -:- ${YELLOW}Kali linux password tools contains over 40 different password cracking utilities. [6,0 GB]
  217.  
  218. ${RED}[> kr <] -:- ${YELLOW}Kali rfid tools are for users who are doing research and exploitation. [1,5 GB]
  219.  
  220. ${RED}[> ks <] -:- ${YELLOW}Kali SDR tools contains large collection of software defined radios tools. [2,4 GB]
  221.  
  222. ${RED}[> kv <] -:- ${YELLOW}Kali voice over ip tools are for people doing voip testing and research. [1,8 GB]
  223.  
  224. ${RED}[> kw <] -:- ${YELLOW}Kali web application tools includes tools for web application hacking. [4,9 GB]
  225.  
  226. ${RED}[> ki <] -:- ${YELLOW}Kali wireless includes tools targeted towards wireless networks. [6,6 GB]
  227.  
  228. ${RED}[> menu <] -:- ${YELLOW}Skipping this and go back to menu.
  229. "
  230.  
  231. echo -e "${MAGENTA}"
  232. printf "【 mak3r@root 】${YELLOW}>/full_config ~>:${GREEN} "
  233. read mp
  234. if [[ $mp == "kl" ]]; then
  235. apt install kali-linux -y
  236. else
  237. err_solver
  238. fi
  239.  
  240. if [[ $mp == "kf" ]]; then
  241. apt install kali-linux-forensic -y
  242. else
  243. echo ''
  244. fi
  245.  
  246. if [[ $mp == "kp" ]]; then
  247. apt install kali-linux-pwtools -y
  248. else
  249. echo ''
  250. fi
  251.  
  252. if [[ $mp == "kr" ]]; then
  253.  
  254. apt install kali-linux-rfid -y
  255. else
  256. echo ''
  257. fi
  258.  
  259. if [[ $mp == "ks" ]]; then
  260. apt install kali-linux-sdr -y
  261. else
  262. echo ''
  263. fi
  264.  
  265. if [[ $mp == "kv" ]]; then
  266. apt install kali-linux-voip -y
  267. else
  268. echo ''
  269. fi
  270.  
  271. if [[ $mp == "kw" ]]; then
  272. apt install kali-linux-web -y
  273. else
  274. echo ''
  275. fi
  276.  
  277. if [[ $mp == "ki" ]]; then
  278. apt install kali-linux-wireless -y
  279. else
  280. echo ''
  281. fi
  282.  
  283. if [[ $mp == "menu" ]]; then
  284. clear
  285. pause 'Press [Enter] to continue....'
  286. echo -e "${GREEN}[~] ${RED}Skipping.."
  287. sleep 0.5
  288. clear
  289. echo -e "${GREEN}[~] ${RED}Skipping...."
  290. sleep 0.5
  291. clear
  292. echo -e "${GREEN}[~] ${RED}Skipping."
  293. sleep 0.5
  294. clear
  295. echo -e "${GREEN}[~] ${RED}Skipping..."
  296. err_solver
  297. else
  298. echo -e $RED "[!] ${YELLOW}Some packages can not be installed."
  299. fi
  300. else
  301. echo -e $RED"[!] ${YELLOW}Skipping."
  302. fi
  303. sleep 1.5
  304. clear
  305. printf "${RED}[*] ${YELLOW}Do you want to make a update command in one[Y/N]? "
  306. read upd
  307. if [[ $upd == "y" || $upd == "Y" ]]
  308. then
  309. echo ""
  310. printf "${RED}[?] ${YELLOW}Name of command: "
  311. read updd
  312. echo "
  313. function $updd {
  314.  
  315. apt-get update &&
  316. apt-get dist-upgrade -y &&
  317. apt-get autoremove -y &&
  318. apt-get autoclean &&
  319. apt-get clean &&
  320. reboot
  321. }" >> /root/.bashrc
  322. echo -e "${RED}[!] ${BLUE}Type ${RED}$updd ${BLUE}to make a full update for your kali linux."
  323. echo -e "${MAGENTA}[!] ${RED}To see changes, close terminal and start terminal again!"
  324. clear
  325. else
  326. echo -e $BOLD ""
  327. clear
  328. fi
  329. printf "${RED}[*] ${YELLOW}Do you want to install tor browser[Y/N]? "
  330. read tr
  331. if [[ $tr == "y" || $tr == "Y" ]]
  332. then
  333. echo -e "${RED}[*] ${YELLOW}Installing Tor Browser.."
  334. sleep 0.5
  335. clear
  336. echo -e "${RED}[*] ${YELLOW}Installing Tor Browser..."
  337. sleep 0.5
  338. clear
  339. echo -e "${RED}[*] ${YELLOW}Installing Tor Browser...."
  340. sleep 0.5
  341. clear
  342. echo -e "${RED}[*] ${YELLOW}Installing Tor Browser.."
  343. sleep 1.5
  344. clear
  345. echo -e "${RED}[✓] ${GREEN}Repositories already exists in file."
  346. echo -e "${RED}[*] ${YELLOW}Adding key."
  347. wget -O- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | sudo apt-key add -
  348. echo -e "${RED}[*] ${YELLOW}Updating & Configurate changes."
  349. apt update
  350. apt-get install tor torbrowser-launcher deb.torproject.org-keyring -y
  351. echo -e "${GREEN}[✓] ${CYAN}Done!."
  352. pause 'Press [Enter] to continue....'
  353. clear
  354. read -p "Do you want to start tor browser[Y/N]? " str
  355. if [[ $str == "y" || $str == "Y" ]]
  356. then
  357. cd /root/Downloads
  358. curl -LO https://dist.torproject.org/torbrowser/9.0.5/tor-browser-linux32-9.0.5_en-US.tar.xz
  359. tar -xvf tor-browser-linux32-9.0.5_en-US.tar.xz
  360. cd tor-browser_en-US
  361. chmod +rwx start-tor-browser.desktop
  362. cd Browser
  363. echo -e "${RED}[*] ${YELLOW}Remove line 94-98, save and exit it."
  364. sleep 2.5
  365. gedit start-tor-browser
  366. ./start-tor-browser
  367. pause 'Press [Enter] to continue....'
  368. else
  369. echo -e "${GREEN}[~] ${RED}Skipping.."
  370. sleep 0.5
  371. clear
  372. echo -e "${GREEN}[~] ${RED}Skipping...."
  373. sleep 0.5
  374. clear
  375. echo -e "${GREEN}[~] ${RED}Skipping."
  376. sleep 0.5
  377. clear
  378. echo -e "${GREEN}[~] ${RED}Skipping..."
  379. clear
  380.  
  381. fi
  382. else
  383. echo -e "${GREEN}[~] ${RED}Skipping.."
  384. sleep 0.5
  385. clear
  386. echo -e "${GREEN}[~] ${RED}Skipping...."
  387. sleep 0.5
  388. clear
  389. echo -e "${GREEN}[~] ${RED}Skipping."
  390. sleep 0.5
  391. clear
  392. echo -e "${GREEN}[~] ${RED}Skipping..."
  393. pause 'Press [Enter] to continue....'
  394. clear
  395. fi
  396. echo -e "${YELLOW}[*] ${BLUE}Adding secure DNS server in /etc/resolv.conf."
  397. clear
  398. echo -e "${RED}[*] ${YELLOW}Listing your currently dns server:(ignoring comments)"
  399. cat /etc/resolv.conf | sed '/#/d'
  400. sleep 1
  401. read -p "[?] Backup resolv.conf file[Y/N]?: " bck
  402. if [[ $bck == "y" || $bck == "Y" ]]
  403. then
  404. echo -e "${BLUE}[*] ${GREEN}Backuping original file..."
  405. sleep 0.2
  406. cp -R /etc/resolv.conf $path/backup
  407.  
  408. else
  409. echo -e "${GREEN}[~] ${RED}Skipping.."
  410. sleep 0.5
  411. clear
  412. echo -e "${GREEN}[~] ${RED}Skipping...."
  413. sleep 0.5
  414. clear
  415. echo -e "${GREEN}[~] ${RED}Skipping."
  416. sleep 0.5
  417. clear
  418. echo -e "${GREEN}[~] ${RED}Skipping..."
  419. pause 'Press [Enter] to continue....'
  420. clear
  421. fi
  422. pause 'Press [Enter] to continue..'
  423. clear
  424. sleep 0.5
  425. printf "${MAGENTA}[*] ${GREEN}Anonymous or Fast[A/F]?: "
  426. read dns
  427. if [[ $dns == "A" || $dns == "A" ]]
  428. then
  429. clear
  430. echo -e "${BLUE}"
  431. figlet An0nM0de
  432. sleep 1
  433. echo -e "${RED}[!] ${MAGENTA}Adding following IP address to your DNS list: "
  434. sleep 0.5
  435. cat lib/anon_dns.txt | sed -r '/#/d'
  436. rm -rf /etc/resolv.conf
  437. cat lib/anon_dns.txt 2>/dev/null | tail -n2 >> /etc/resolv.conf
  438. sleep 0.8
  439. echo -e "${GREEN}[*] ${MAGENTA}Done."
  440. pause 'Press [Enter] continue.'
  441.  
  442. elif [[ $dns == "f" || $dns == "F" ]]
  443. then
  444. clear
  445. echo -e "${BLUE}"
  446. figlet F4stM0de
  447. sleep 1
  448. echo -e "${RED}[!] ${MAGENTA}Adding following IP address to your DNS list: "
  449. sleep 0.5
  450. cat lib/fast_dns.txt | sed -r '/#/d'
  451. #sed -r '1,2 s/#/\r/'
  452. rm -rf /etc/resolv.conf
  453. cat lib/fast_dns.txt 2>/dev/null | tail -n2 >> /etc/resolv.conf
  454. sleep 0.8
  455. echo -e "${GREEN}[*] ${MAGENTA}Done."
  456. pause 'Press [Enter] continue.'
  457. else
  458. err_solver
  459. fi
  460. clear
  461. echo -e "${GREEN[*]${BLUE}Do you want to generate a password for your own security?[Y/N]?: "
  462. read pwdg
  463. if [[ $pwdg == "y" || $pwdg == "Y"]]
  464. then
  465. bash lib/pwd.sh
  466. else
  467. err_solver
  468. fi
  469. }
  470.  
  471. function install_tools {
  472. echo "coming soon"
  473. }
  474.  
  475. function quit {
  476. clear
  477. echo -e "${RED}[*] ${YELLOW} Pre-setting options."
  478. pause 'Press [Enter] to continue....'
  479. echo -e "${RED}[*] ${CYAN}Quitting.."
  480. sleep 0.5
  481. clear
  482. echo -e "${RED}[*] ${CYAN}Quitting..."
  483. sleep 0.5
  484. clear
  485. echo -e "${RED}[*] ${CYAN}Quitting...."
  486. sleep 0.5
  487. clear
  488. echo -e "${RED}[*] ${CYAN}Quitting.."
  489. sleep 0.5
  490. clear
  491. echo -e "${RED}[*] ${CYAN}Quitting..."
  492. sleep 0.5
  493. clear
  494. exit
  495. echo -e "${RED}[!] ${BLUE}Wrong command. Quitting."
  496. }
  497.  
  498.  
  499.  
  500. clear
  501. sleep 0.5
  502. echo -e $BLUE "
  503.  
  504. Welcome To
  505.  
  506. ████████╗██╗ ██╗███████╗ ███▄ ▄███▓ ▄▄▄ ██ ▄█▀▓█████ ██▀███
  507. ╚══██╔══╝██║ ██║██╔════╝ ▓██▒▀█▀ ██▒▒████▄ ██▄█▒ ▓█ ▀ ▓██ ▒ ██▒
  508. ██║ ███████║█████╗ ▓██ ▓██░▒██ ▀█▄ ▓███▄░ ▒███ ▓██ ░▄█ ▒
  509. ██║ ██╔══██║██╔══╝ ▒██ ▒██ ░██▄▄▄▄██ ▓██ █▄ ▒▓█ ▄ ▒██▀▀█▄
  510. ██║ ██║ ██║███████╗ ▒██▒ ░██▒ ▓█ ▓██▒▒██▒ █▄░▒████▒░██▓ ▒██▒
  511. ╚═╝ ╚═╝ ╚═╝╚══════╝
  512. "
  513.  
  514. echo -e $MAGENTA "${BOLD}The Automatic Configure Script For Kali Linux."
  515. echo ""
  516. #command_check
  517. echo -e "${RED}[!] ${YELLOW}Directory of The makeR: ${MAGENTA}${path}."
  518. echo ""
  519. sleep 0.5
  520. printf "${RED}[> full_config <] ${YELLOW} Starting to configure your kali linux for hacking."
  521. echo ""
  522. sleep 0.5
  523. printf "${RED}[> install_tools <] ${YELLOW} Lists you a list of tools that are recommend to install."
  524. echo ""
  525. sleep 0.5
  526. printf "${RED}[> social_media <] ${YELLOW} Lists you a list of social media that can be installed."
  527. echo ""
  528. sleep 0.5
  529. printf "${RED}[> cmd_crtr <] ${YELLOW} Make your own commands."
  530. echo ""
  531. sleep 0.5
  532. printf "${RED}[> credits <] ${YELLOW} Lists credits & contact."
  533. echo ""
  534. sleep 0.5
  535. printf "${RED}[> quit <] ${YELLOW} Leaving(press q to quit)."
  536. echo -e $BLUE ""
  537.  
  538. x=0
  539. while [ $x = 0 ]
  540. do
  541. clear
  542. echo '【 mak3r@root 】~>: '
  543. read ex
  544. case "$ex" in
  545. full_config)
  546. full_config
  547. x=1
  548. ;;
  549. install_tools)
  550. install_tools
  551. x=1
  552. ;;
  553. social_media)
  554. social_media
  555. x=1
  556. ;;
  557. cmd_crtr)
  558. cmd_crtr
  559. x=1
  560. ;;
  561. credits)
  562. credits
  563. x=1
  564. ;;
  565. quit)
  566. quit
  567. x=1
  568. ;;
  569. q)
  570. x=1
  571. echo 'Exiting..'
  572. sleep 0.5
  573. ;;
  574. *)
  575. echo '[!] Wrong command!'
  576. sleep 1
  577. ;;
  578. esac
  579. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement