Skip to content

Commit

Permalink
update on auto see router ip
Browse files Browse the repository at this point in the history
  • Loading branch information
WilSegale committed Feb 12, 2025
1 parent ca60ed8 commit 163305a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions linux/DontEdit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ CURRENT_TIME=$(date +"%I:%M:%S %p")
# Gets current date in mm/dd/yyyy format
CURRENT_DATE=$(date +"%m/%d/%Y")

#auto gets the ip address of the router
IPADDR=$(ip route | awk '/default/ {print $3}')

# List of required packages/commands (separated by spaces)
required_packages=("wget" "hydra" "nmap" "ssh" "mysql" "figlet" "dialog" "x11-utils")

Expand Down
4 changes: 2 additions & 2 deletions linux/GlobalScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ else
echo -e "${RED}This can take up to 1 hour to complete.${NC}"

# Scan the entire network and display open ports
sudo nmap -sS 192.168.1.1/24 -Pn -oN scan.txt --open
sudo nmap -sS $IPADDR/24 -Pn -oN scan.txt --open
echo "Scan complete. Open ports saved to scan.txt"
# asks if the user want to see scan on a open file or not
read -p "Would you like to see the scan on a open file (Yes or No): " SeeFile
Expand Down Expand Up @@ -198,7 +198,7 @@ else

else
# Scan specific port
sudo nmap -sS 192.168.1.1/24 -p $service -oN $service.txt --open
sudo nmap -sS $IPADDR/24 -p $service -oN $service.txt --open
read -p "Would you like to see the ${service} on a open file (Yes or No): " SeeFile

if [[ " ${yes[*]} " == *" ${SeeFile} "* ]]; then
Expand Down
4 changes: 2 additions & 2 deletions linux/GuiGlobal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ if [[ "$OSTYPE" == "${OS}"* ]]; then
echo -e "${RED}This can take up to 1 hour to complete.${NC}"

# Scan the entire network and display open ports
sudo nmap -sS 192.168.1.1/24 -Pn -oN scan.txt --open
sudo nmap -sS $IPADDR/24 -Pn -oN scan.txt --open
echo "Scan complete. Open ports saved to scan.txt"
# asks if the user want to see scan on a open file or not
SeeFile=$(dialog --title "SEE-File" \
Expand Down Expand Up @@ -194,7 +194,7 @@ if [[ "$OSTYPE" == "${OS}"* ]]; then

else
# Scan specific port
sudo nmap -sS 192.168.1.1/24 -p $service -oN $service.txt --open
sudo nmap -sS $IPADDR/24 -p $service -oN $service.txt --open

SeeFile=$(dialog --title "Nmap output" \
--inputbox "Would you like to see the ${service} on a open file (Yes or No):" 10 60 \
Expand Down
4 changes: 2 additions & 2 deletions linux/ManualGlobalScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ else
echo -e "${RED}This can take up to 1 hour to complete.${NC}"

# Scan the entire network and display open ports
sudo nmap -sS 192.168.1.1/24 -Pn -oN scan.txt --open
sudo nmap -sS $IPADDR/24 -Pn -oN scan.txt --open

# asks if the user want to see scan on a open file or not
read -p "Would you like to see the scan on a open file (Yes or No): " SeeFile
Expand Down Expand Up @@ -193,7 +193,7 @@ else

else
# Scan specific port
sudo nmap -sS 192.168.1.1/24 -p "${service}" -oN $service.log --open
sudo nmap -sS $IPADDR/24 -p "${service}" -oN $service.log --open
read -p "Would you like to see the ${service} on a open file (Yes or No): " SeeFile

if [[ " ${yes[*]} " == *" ${SeeFile} "* ]]; then
Expand Down

0 comments on commit 163305a

Please sign in to comment.