Advertisement
BaSs_HaXoR

Node.js Install Kali Linux (script)

Feb 27th, 2015
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.37 KB | None | 0 0
  1. # Install nodejs in kali linux
  2. # https://gist.github.com/binkybear/40bd757e47a1649f6732
  3. #!/bin/bash
  4. clear
  5.  
  6. if [[ $EUID -ne 0 ]]; then
  7.   echo "You must be root" 2>&1
  8.   exit 1
  9. fi
  10.  
  11. ARCH=$(uname -m)
  12.  
  13. if [ "$ARCH" == 'x86_64' ] ; then
  14.   echo "[+] Detected AMD64"
  15.     architecture=amd64
  16. elif [ "$ARCH" == 'i386' ] ; then
  17.   echo "[+] Detected i386"
  18.     architecture=i386
  19. elif [  "$ARCH" == 'armv7l' ] ; then
  20.   echo "[+] Detected ARMHF"
  21.     architecture=armhf
  22. else
  23.   echo "Unknown architecture"
  24.     exit 1
  25. fi
  26. sleep 5
  27. echo ""
  28. echo "[+] Changing to /tmp"
  29. cd /tmp
  30.  
  31. # libv8 package
  32. echo "[+] Downloading libv8 package..."
  33. wget http://ftp.us.debian.org/debian/pool/main/libv/libv8-3.14/libv8-3.14.5_3.14.5.8-8~bpo70+1_${architecture}.deb
  34.  
  35. sleep 3
  36.  
  37. # nodejs package
  38. echo "[+] Downloading nodejs package..."
  39. wget http://ftp.tku.edu.tw/Linux/Kali/kali/pool/main/n/nodejs/nodejs_0.10.29~dfsg-1~bpo70+1_${architecture}.deb
  40.  
  41. sleep 3
  42.  
  43. # install nodejs / dependency
  44. echo "[+] Installing NodeJS"
  45. dpkg -i libv8*
  46. dpkg -i nodejs_0.10.29~dfsg-1~bpo70+1_${architecture}.deb
  47. ln /usr/bin/nodejs /usr/bin/node
  48.  
  49. echo "[+] Testing NodeJS version"
  50. node -v
  51.  
  52. sleep 3
  53.  
  54. # install npm (you will get error but it works okay)
  55. echo "[+] Installing NPM"
  56. curl https://www.npmjs.org/install.sh | sudo sh
  57.  
  58. # clean up
  59. echo "[+] Removing temporary files"
  60. rm -rf /tmp/*
  61.  
  62. #BaSs_HaXoR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement