Sn1per by 1N3@CrowdShield

This commit is contained in:
root
2017-01-27 14:38:34 -05:00
parent 7d37cc8413
commit 0008bf8f37
2 changed files with 6 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
## CHANGELOG:
* v2.2e - Changed NMap scan options (removed -P0 flag)
* v2.2d - Added MongoDB checks
* v2.2d - Improved NMap scanning options
* v2.2c - Added CouchDB checks

23
sniper
View File

@@ -35,6 +35,7 @@
TARGET="$1"
MODE="$2"
OPT1="$3"
DISABLE_POSTGRESQL="true" # disabling postgresql startup, assuming it's running already
INSTALL_DIR="/usr/share/sniper"
LOOT_DIR="/usr/share/sniper/loot"
PLUGINS_DIR="/usr/share/sniper/plugins"
@@ -94,7 +95,7 @@ function loot {
rm -f $LOOT_DIR/.fuse_* 2> /dev/null
echo -e "$OKORANGE + -- --=[Starting Metasploit service...$RESET"
/etc/init.d/metasploit start 2> /dev/null
/etc/init.d/postgresql start 2> /dev/null
if [ -z $DISABLE_POSTGRESQL ]; then /etc/init.d/postgresql start 2> /dev/null; fi
echo -e "$OKORANGE + -- --=[Importing NMap XML files into Metasploit...$RESET"
msfconsole -x "workspace -a $WORKSPACE; workspace $WORKSPACE; db_import $LOOT_DIR/nmap/nmap*.xml; hosts; services; exit;"
echo -e "$OKORANGE + -- --=[Copying loot to workspace: $WORKSPACE...$RESET"
@@ -106,22 +107,8 @@ function loot {
cp -Rf $LOOT_DIR/imports/ $LOOT_DIR/workspace/$WORKSPACE/ 2> /dev/null
cp -Rf $LOOT_DIR/notes/ $LOOT_DIR/workspace/$WORKSPACE/ 2> /dev/null
cp -Rf $LOOT_DIR/web/ $LOOT_DIR/workspace/$WORKSPACE/ 2> /dev/null
rm -Rf $LOOT_DIR/screenshots/ 2> /dev/null
rm -Rf $LOOT_DIR/nmap/ 2> /dev/null
rm -Rf $LOOT_DIR/domains/ 2> /dev/null
rm -Rf $LOOT_DIR/output/ 2> /dev/null
rm -Rf $LOOT_DIR/reports/ 2> /dev/null
rm -Rf $LOOT_DIR/imports/ 2> /dev/null
rm -Rf $LOOT_DIR/notes/ 2> /dev/null
rm -Rf $LOOT_DIR/web/ 2> /dev/null
mkdir $LOOT_DIR/screenshots/ -p 2> /dev/null
mkdir $LOOT_DIR/nmap -p 2> /dev/null
mkdir $LOOT_DIR/domains -p 2> /dev/null
mkdir $LOOT_DIR/output -p 2> /dev/null
mkdir $LOOT_DIR/reports -p 2> /dev/null
mkdir $LOOT_DIR/imports -p 2> /dev/null
mkdir $LOOT_DIR/notes -p 2> /dev/null
mkdir $LOOT_DIR/web -p 2> /dev/null
rm -Rf $LOOT_DIR/{screenshots,nmap,domains,outputs,reports,imports,notes,web}/ 2> /dev/null
mkdir $LOOT_DIR/{screenshots,nmap,domains,outputs,reports,imports,notes,web}/ -p 2> /dev/null
echo -e "$OKORANGE + -- --=[Opening workspace directory...$RESET"
iceweasel 2> /dev/null &
sleep 2
@@ -666,7 +653,7 @@ else
nmap -sU -T5 -p U:$OPT1 --open $TARGET
fi
service postgresql start
if [ -z $DISABLE_POSTGRESQL ]; then service postgresql start; fi
echo ""
echo -e "$OKGREEN + -- ----------------------------=[Running Intrusive Scans]=----------------- -- +$RESET"