Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
1N3
GitHub Repository: 1N3/Sn1per
Path: blob/master/modes/nuke.sh
4033 views
1
# NUKE MODE #####################################################################################################
2
if [[ "$MODE" = "nuke" ]]; then
3
if [[ -z "$FILE" ]]; then
4
logo
5
echo "You need to specify a list of targets (ie. -f <targets.txt>) to scan."
6
exit
7
fi
8
if [[ "$REPORT" = "1" ]]; then
9
for a in `cat $FILE`;
10
do
11
if [[ ! -z "$WORKSPACE" ]]; then
12
args="$args -w $WORKSPACE"
13
WORKSPACE_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
14
echo -e "$OKBLUE[*] Saving loot to $WORKSPACE_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
15
mkdir -p $WORKSPACE_DIR 2> /dev/null
16
mkdir $WORKSPACE_DIR/domains 2> /dev/null
17
mkdir $WORKSPACE_DIR/screenshots 2> /dev/null
18
mkdir $WORKSPACE_DIR/nmap 2> /dev/null
19
mkdir $WORKSPACE_DIR/notes 2> /dev/null
20
mkdir $WORKSPACE_DIR/reports 2> /dev/null
21
mkdir $WORKSPACE_DIR/output 2> /dev/null
22
fi
23
args="$args --noreport --noloot"
24
TARGET="$a"
25
args="$args -t $TARGET -b"
26
echo -e "$OKRED "
27
echo -e "$OKRED ____"
28
echo -e "$OKRED __,-~~/~ \`---."
29
echo -e "$OKRED _/_,---( , )"
30
echo -e "$OKRED __ / < / ) \___"
31
echo -e "$OKRED - ------===;;;'====------------------===;;;===----- - -"
32
echo -e "$OKRED \/ ~'~'~'~'~'~\~'~)~'/"
33
echo -e "$OKRED (_ ( \ ( > \)"
34
echo -e "$OKRED \_( _ < >_>'"
35
echo -e "$OKRED ~ \`-i' ::>|--\""
36
echo -e "$OKRED I;|.|.|"
37
echo -e "$OKRED <|i::|i|\`."
38
echo -e "$OKRED (\` ^''\`-' ')"
39
echo -e "$OKRED --------------------------------------------------------- $RESET"
40
echo -e "$OKORANGE + -- --=[WARNING! Nuking ALL target! $RESET"
41
echo -e "$RESET"
42
if [[ ! -z "$WORKSPACE_DIR" ]]; then
43
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
44
sniper $args | tee $WORKSPACE_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
45
else
46
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
47
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
48
fi
49
args=""
50
done
51
fi
52
53
if [[ "$LOOT" = "1" ]]; then
54
loot
55
fi
56
exit
57
fi
58