├── LICENSE ├── README.md ├── install.sh └── netnoob /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 NARCOTIC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 👨🏽‍💻 NETNOOB 2 | Netnoob is a simple program written in bash that contains basic Linux network tools, information gathering tools and scanning tools. 3 | 4 | ## 👨🏽‍💻 Content 5 | 6 | 1. Get information about your computer and network 7 | |-- 1. Your Ip & Mac Address 8 | |-- 2. Your Network Statistics 9 | |-- 3. Your Ethernet Devices 10 | 11 | 2. Get information about another computer or a network 12 | |-- 1. IP Address 13 | |-- 2. Scan All Ports 14 | |-- 3. Scan a Specific Port 15 | |-- 4. Scan Most Common 100 Ports 16 | |-- 5. Find [CNAMES] Alias Domain Names 17 | |-- 6. Domain Information Groper 18 | |-- 7. Records 19 | 20 | 3. Network Settings and Shared Drives 21 | |-- 1. Change IP Address 22 | |-- 2. Change Mac Address 23 | |-- 3. Create a Networked Drive 24 | |-- 4. Mount a Networked Drive 25 | 26 | ## 👨🏽‍💻 Installing and Using 27 | 28 | 1. Clone this repository : git clone https://github.com/narcotic/netnoob 29 | 30 | 2. Change directory to netnoob : cd netnoob 31 | 32 | 3. Make install.sh executable : chmod +x install.sh 33 | 34 | 4. Install : ./install.sh 35 | 36 | 5. Use command : netnoob to run it from terminal 37 | 38 | ## 👨🏽‍💻 Disclaimer 39 | Author of this tool is not responsible for any damage caused by this tool. Use with caution. 40 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | clear 3 | 4 | prgm='netnoob' 5 | Yellow="\033[1;33m"; 6 | End="\033[0m" 7 | 8 | printf $Yellow 9 | printf " _| _| _|_|_|_| _|_|_|_|_| _| _| _|_| _|_| _|_|_| \n" 10 | printf " _|_| _| _| _| _|_| _| _| _| _| _| _| _|\n" 11 | printf " _| _| _| _|_|_| _| _| _| _| _| _| _| _| _|_|_| \n" 12 | printf " _| _|_| _| _| _| _|_| _| _| _| _| _| _|\n" 13 | printf " _| _| _|_|_|_| _| _| _| _|_| _|_| _|_|_| \n" 14 | printf "\n" 15 | printf "============================== NETNOOB--2018 ==============================\n" 16 | printf "============================= GITHUB/NARCOTIC =============================\n" 17 | printf $End 18 | printf "\n" 19 | 20 | error() 21 | { 22 | printf "ERROR: %s\n" "$2" 1>&2 23 | [ $1 -gt 0 ] && exit $1 24 | } 25 | 26 | if ! [ ${UID:-`id -u`} -eq 0 ]; then 27 | error 1 'RUN AS ROOT!' 28 | fi 29 | 30 | exe() 31 | { 32 | Red='\033[1;31m' 33 | Green='\033[1;32m' 34 | Reset='\033[0m' 35 | MSG=$1 36 | 37 | shift 38 | 39 | printf "%s... " "$MSG" 40 | 41 | $@ 1> /dev/null 2>&1 42 | 43 | if [ $? -gt 0 ]; then 44 | printf " $Red[ERROR]$Reset\n" 45 | else 46 | printf " $Green[OK]$Reset\n" 47 | fi 48 | 49 | unset Red Green Reset MSG 50 | } 51 | 52 | if [ -f $prgm -a -r $prgm ]; then 53 | if [ -f "/usr/bin/$prgm" ]; then 54 | printf "File '/usr/bin/$prgm' Already Exists.\n" 55 | printf "Overwrite? [Y/N] " 56 | read YNAnswer 57 | case $YNAnswer in 58 | [Yy]|[Yy][Ee][Ss]) 59 | ;; 60 | [Nn]|[Nn][Oo]) 61 | printf "Nothing Done! Quitting!" 62 | exit 0 ;; 63 | *) 64 | error 1 'Invalid Eesponse! Quitting!' ;; 65 | esac 66 | fi 67 | 68 | exe "[1/3] Installing to '/usr/bin/netnoob'" cp "$prgm" /usr/bin/ 69 | exe "[2/3] Setting correct file modes" chmod 755 "/usr/bin/$prgm" 70 | exe "[3/3] Correcting ownership" chown 0:0 "/usr/bin/$prgm" 71 | printf "Done!\n" 72 | else 73 | error 1 'File '$prgm' Missing or Inaccessible.' 74 | fi 75 | # END OF THE PROGRAM 76 | -------------------------------------------------------------------------------- /netnoob: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | 4 | GREEN="\033[32m"; YELLOW="\033[1;33m"; RED="\033[0;31m"; REDL="\e[101m"; BLINK="\e[5m"; END="\033[0m" 5 | 6 | printf $YELLOW 7 | printf " _| _| _|_|_|_| _|_|_|_|_| _| _| _|_| _|_| _|_|_| \n" 8 | printf " _|_| _| _| _| _|_| _| _| _| _| _| _| _|\n" 9 | printf " _| _| _| _|_|_| _| _| _| _| _| _| _| _| _|_|_| \n" 10 | printf " _| _|_| _| _| _| _|_| _| _| _| _| _| _|\n" 11 | printf " _| _| _|_|_|_| _| _| _| _|_| _|_| _|_|_| \n" 12 | printf "\n" 13 | printf "============================== NETNOOB--2018 ==============================\n" 14 | printf "============================= GITHUB/NARCOTIC =============================\n" 15 | printf $END 16 | 17 | printf "\n" 18 | 19 | if [[ $EUID -ne 0 ]] 20 | then 21 | printf $RED 22 | printf $BLINK 23 | printf "Running as Root!\n\n" 24 | printf $END 25 | sleep 2 26 | sudo netnoob 27 | fi 28 | 29 | printf "1. Get information about your computer and network\n" 30 | printf "2. Get information about another computer or a network\n" 31 | printf "3. Network Settings and Shared Drives\n" 32 | 33 | printf "\n" 34 | printf "0. Exit ->\n" 35 | printf "\n" 36 | 37 | read -p "NETNOOB : " sel1 38 | 39 | if [ $sel1 = 0 ] 40 | then 41 | exit 42 | fi 43 | 44 | while [ $sel1 = 1 ]; do 45 | 46 | printf "=========================*==========*=========================\n" 47 | 48 | printf "\n" 49 | printf "1. Your IP & MAC address\n" 50 | printf "2. Your Network Statistics\n" 51 | printf "3. Your Ethernet Devices\n" 52 | 53 | printf "\n" 54 | printf "0. Exit ->\n" 55 | printf "\n" 56 | 57 | read -p "NETNOOB : " sel2 58 | 59 | if [ $sel2 = 1 ] 60 | then 61 | printf $YELLOW 62 | arp -e 63 | printf "\n" 64 | printf $END 65 | fi 66 | 67 | if [ $sel2 = 2 ] 68 | then 69 | printf $YELLOW 70 | netstat 71 | printf "\n" 72 | printf $END 73 | fi 74 | 75 | if [ $sel2 = 3 ] 76 | then 77 | printf $YELLOW 78 | printf "\n" 79 | sudo ethtool eth0 80 | printf $END 81 | fi 82 | 83 | if [ $sel2 = 0 ] 84 | then 85 | exit 86 | fi 87 | done 88 | 89 | if [ $sel1 = 2 ] 90 | then 91 | read -p "Domain name or IP Address : " webaddr 92 | fi 93 | 94 | while [ $sel1 = 2 ]; do 95 | printf "=========================*==========*=========================\n" 96 | 97 | printf "\n" 98 | 99 | printf "1. IP Address\n" 100 | printf "2. Scan all ports\n" 101 | printf "3. Scan a specific port\n" 102 | printf "4. Scan most common 100 ports\n" 103 | printf "5. Find [CNAMES] Alias Domain Names\n" 104 | printf "6. Domain Information Groper\n" 105 | printf "7. Records\n" 106 | 107 | printf "\n" 108 | printf "0. Exit ->\n" 109 | printf "\n" 110 | 111 | read -p "NETNOOB : " sel2 112 | 113 | if [ $sel2 = 1 ] 114 | then 115 | printf $YELLOW 116 | sudo host $webaddr 117 | printf "\n" 118 | printf $END 119 | fi 120 | 121 | if [ $sel2 = 2 ] 122 | then 123 | printf $YELLOW 124 | sudo nmap $webaddr 125 | printf "\n" 126 | printf $END 127 | fi 128 | 129 | if [ $sel2 = 3 ] 130 | then 131 | read -p "Port Number : " port 132 | printf $YELLOW 133 | sudo nmap -p $port $webaddr 134 | printf "\n" 135 | printf $END 136 | fi 137 | 138 | if [ $sel2 = 4 ] 139 | then 140 | printf $YELLOW 141 | sudo nmap -F $webaddr 142 | printf "\n" 143 | printf $END 144 | fi 145 | 146 | if [ $sel2 = 5 ] 147 | then 148 | printf $YELLOW 149 | sudo host -t CNAME $webaddr 150 | printf "\n" 151 | printf $END 152 | fi 153 | 154 | if [ $sel2 = 6 ] 155 | then 156 | printf $YELLOW 157 | sudo dig $webaddr any 158 | printf $END 159 | fi 160 | 161 | if [ $sel2 = 7 ] 162 | then 163 | printf $YELLOW 164 | sudo whois $webaddr 165 | printf $END 166 | fi 167 | 168 | if [ $sel2 = 0 ] 169 | then 170 | exit 171 | fi 172 | done 173 | 174 | if [ $sel1 = 3 ] 175 | then 176 | printf "\n" 177 | printf $REDL 178 | printf "Changing network settings might cause problems in connectivity.\n" 179 | printf "Do not use this tool without proper understanding!\n" 180 | printf $END 181 | printf "\n" 182 | read -p "Continue ? [Y/N] : " yesno 183 | fi 184 | 185 | if [[ $yesno = 'y' || $yesno = 'Y' ]]; then 186 | while [ $sel1 = 3 ]; do 187 | printf "=========================*==========*=========================\n" 188 | 189 | printf "\n" 190 | 191 | printf "1. Change IP address\n" 192 | printf "2. Change MAC address\n" 193 | printf "3. Create a Networked Drive\n" 194 | printf "4. Mount a Networked Drive\n" 195 | 196 | printf "\n" 197 | printf "0. Exit ->\n" 198 | printf "\n" 199 | 200 | read -p "NETNOOB : " sel2 201 | 202 | if [ $sel2 = 1 ] 203 | then 204 | printf $YELLOW 205 | printf "Your current IP address is : \n\n" 206 | arp -e 207 | printf "\n" 208 | printf $END 209 | read -p "Your new IP address should be, XXX.XXX.XXX.XXX : " newip 210 | read -p "Your new Default Gateway should be, XXX.XXX.XXX.XXX : " newgateway 211 | printf "\n" 212 | ifconfig eth0 down 213 | ifconfig eth0 inet $newip 214 | route add default gw $newgateway 215 | printf "\n" 216 | printf $YELLOW 217 | printf "Your IP address has been changed to $newip" 218 | printf "\n" 219 | printf "Your Default Gateway has been changed to $newgateway" 220 | printf "\n\n" 221 | printf $END 222 | fi 223 | 224 | if [ $sel2 = 2 ] 225 | then 226 | printf $YELLOW 227 | printf "Your current MAC address is : \n\n" 228 | arp -e 229 | printf "\n" 230 | printf $END 231 | read -p "Your new MAC address should be, XX:XX:XX:XX:XX:XX : " newmac 232 | printf "\n" 233 | ifconfig eth0 down 234 | macchanger -m $newmac eth0 235 | ifconfig eth0 up 236 | sleep 2 237 | printf $YELLOW 238 | printf "\n" 239 | printf "Your new MAC address is : $newmac" 240 | printf "\n\n" 241 | printf $END 242 | fi 243 | 244 | if [ $sel2 = 3 ] 245 | then 246 | printf $YELLOW 247 | printf "Installing Samba...\n\n" 248 | printf $END 249 | sudo apt-get install samba 250 | printf "\n" 251 | printf $YELLOW 252 | printf "Done...\n\n" 253 | printf $END 254 | read -p "Your Current Username : " uid 255 | read -p "Share Name : " folder 256 | printf "\n" 257 | printf $YELLOW 258 | printf "Creating Share '$folder'...\n" 259 | printf $END 260 | mkdir /home/$uid/$folder 261 | printf "Location : /home/$uid/$folder\n\n" 262 | sudo smbpasswd -a $uid 263 | printf "\n" 264 | printf $YELLOW 265 | printf "Appending Changes to /etc/samba/smb.conf...\n" 266 | printf $END 267 | sudo bash -c "echo [$folder] >> /etc/samba/smb.conf" 268 | sudo bash -c "echo path = /home/$uid/$folder >> /etc/samba/smb.conf" 269 | sudo bash -c "echo valid users = $uid >> /etc/samba/smb.conf" 270 | sudo bash -c "echo read only = no >> /etc/samba/smb.conf" 271 | printf $YELLOW 272 | printf "Restarting Samba...\n" 273 | printf $END 274 | sudo service smbd restart 275 | printf $YELLOW 276 | printf "Done...\n" 277 | printf $END 278 | fi 279 | 280 | if [ $sel2 = 4 ] 281 | then 282 | read -p "Give a Name for the Mount Folder : " mountname 283 | read -p "Path of the Networked Drive (//192.168.1.10/nas/files) : " naspath 284 | read -p "Login Username : " username 285 | printf "Mounting...\n" 286 | sleep 2 287 | cd ~/Desktop 288 | mkdir $mountname 289 | sudo mount.cifs $naspath ~/Desktop/$mountname -o user=$username 290 | printf $YELLOW 291 | printf "\n" 292 | printf "Your Networked Drive is Mounted at /Desktop/$mountname" 293 | printf "\n\n" 294 | printf $END 295 | fi 296 | 297 | if [ $sel2 = 0 ] 298 | then 299 | exit 300 | fi 301 | done 302 | else 303 | exit 304 | fi 305 | 306 | #END OF THE PROGRAM 307 | --------------------------------------------------------------------------------