diff --git a/CHANGELOG.md b/CHANGELOG.md index 71ac2bf..3547d21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## CHANGELOG: +* v2.5c - Added various improvements to 'discover' mode scans * v2.5b - Removed NMap script checks for 'fullportonly' mode * v2.5a - Added auto-updates to check and download new versions * v2.5a - Fixed issue with install.sh to resolve pip aha error diff --git a/sniper b/sniper index a8605e6..e3e27f9 100644 --- a/sniper +++ b/sniper @@ -81,7 +81,7 @@ ## SAMPLE REPORT: # https://gist.github.com/1N3/8214ec2da2c91691bcbc -VER="2.5a" +VER="2.5" TARGET="$1" MODE="$2" OPT1="$3" @@ -129,21 +129,29 @@ cd $INSTALL_DIR function check_update { if [ "$ENABLE_AUTO_UPDATES" = "1" ]; then # echo -e "$OKBLUE + -- --=[Checking for updates...$RESET" - LATEST_VER="$(curl -s https://crowdshield.com/.injectx/sniper_ver.txt)" + LATEST_VER=$(curl -s https://api.github.com/repos/1N3/Sn1per/tags | grep -Po '"name":.*?[^\\]",'| head -1 | cut -c11-13) if [ "$LATEST_VER" != "$VER" ]; then - echo -e "$OKRED + -- --=[Sn1per $LATEST_VER is available to download... Do you want to update? (y or n)$RESET" - read ans - if [ "$ans" = "y" ]; then - rm -Rf /tmp/Sn1per/ 2>/dev/null - git clone https://github.com/1N3/Sn1per /tmp/Sn1per/ - bash /tmp/Sn1per/install.sh - rm -Rf /tmp/Sn1per/ 2>/dev/null - exit - fi + echo -e "$OKRED + -- --=[Sn1per v$LATEST_VER is available to download... To update, type \"sniper update\" $RESET" fi fi } +function update { + echo -e "$OKBLUE + -- --=[Checking for updates...$RESET" + LATEST_VER=$(curl -s https://api.github.com/repos/1N3/Sn1per/tags | grep -Po '"name":.*?[^\\]",'| head -1 | cut -c11-13) + if [ "$LATEST_VER" != "$VER" ]; then + echo -e "$OKRED + -- --=[Sn1per $LATEST_VER is available to download...Do you want to update? (y or n)$RESET" + read ans + if [ "$ans" = "y" ]; then + rm -Rf /tmp/Sn1per/ 2>/dev/null + git clone https://github.com/1N3/Sn1per /tmp/Sn1per/ + bash /tmp/Sn1per/install.sh + rm -Rf /tmp/Sn1per/ 2>/dev/null + exit + fi + fi +} + function init { mkdir -p $LOOT_DIR 2> /dev/null mkdir $LOOT_DIR/domains 2> /dev/null @@ -236,20 +244,22 @@ function help { echo ' [*] sniper airstrike ' echo ' [*] sniper nuke ' echo ' [*] sniper loot' + echo ' [*] sniper update' echo "" echo ' + -- --=[Modes:' echo '' - echo ' + -- --=[REPORT: Outputs all results to text in the loot directory for later reference. To enable reporting, append report to any sniper mode or command.' - echo ' + -- --=[STEALTH: Quickly enumerate single targets using mostly non-intrusive scans to avoid WAF/IPS blocking' - echo ' + -- --=[DISCOVER: Parses all hosts on a subnet/CIDR (ie. 192.168.0.0/16) and initiates a sniper scan against each host. Useful for internal network scans.' - echo ' + -- --=[PORT: Scans a specific port for vulnerabilities. Reporting is not currently available in this mode.' - echo ' + -- --=[WEB: Adds full automatic web application scans to the results (port 80/tcp & 443/tcp only). Ideal for web applications but may increase scan time significantly.' - echo ' + -- --=[NOBRUTE: Launches a full scan against a target host/domain without brute forcing services.' - echo ' + -- --=[AIRSTRIKE: Quickly enumerates open ports/services on multiple hosts and performs basic fingerprinting. To use, specify the full location of the file which contains all hosts, IPs that need to be scanned and run ./sn1per /full/path/to/targets.txt airstrike to begin scanning.' - echo ' + -- --=[NUKE: Launch full audit of multiple hosts specified in text file of choice. Usage example: ./sniper /pentest/loot/targets.txt nuke.' - echo -e " + -- --=[LOOT: Automatically organizes and displays loot folder in your browser and opens Zenmap GUI with all port scan results. To run, type sniper loot.$RESET" - echo "" - echo "" + echo ' + -- --=[REPORT: Outputs all results to text in the loot directory for later reference. To enable reporting, append report to any sniper mode or command.' + echo ' + -- --=[STEALTH: Quickly enumerate single targets using mostly non-intrusive scans to avoid WAF/IPS blocking' + echo ' + -- --=[DISCOVER: Parses all hosts on a subnet/CIDR (ie. 192.168.0.0/16) and initiates a sniper scan against each host. Useful for internal network scans.' + echo ' + -- --=[PORT: Scans a specific port for vulnerabilities. Reporting is not currently available in this mode.' + echo ' + -- --=[WEB: Adds full automatic web application scans to the results (port 80/tcp & 443/tcp only). Ideal for web applications but may increase scan time significantly.' + echo ' + -- --=[NOBRUTE: Launches a full scan against a target host/domain without brute forcing services.' + echo ' + -- --=[AIRSTRIKE: Quickly enumerates open ports/services on multiple hosts and performs basic fingerprinting. To use, specify the full location of the file which contains all hosts, IPs that need to be scanned and run ./sn1per /full/path/to/targets.txt airstrike to begin scanning.' + echo ' + -- --=[NUKE: Launch full audit of multiple hosts specified in text file of choice. Usage example: ./sniper /pentest/loot/targets.txt nuke.' + echo -e " + -- --=[LOOT: Automatically organizes and displays loot folder in your browser and opens Zenmap GUI with all port scan results. To run, type sniper loot.$RESET" + echo "" + echo "" + check_update } if [ -z $TARGET ]; then @@ -264,6 +274,7 @@ if [ -z $TARGET ]; then echo -e "$OKORANGE + -- --=[sniper v$VER by 1N3$RESET" echo -e "$OKORANGE + -- --=[Usage: sniper $RESET" echo "" + check_update exit fi