Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- output=$3
- filex=tmpmainfile.sh
- echo $"$(cat $2)" > $filex
- banner=$(figlet "$1" | gzip | base64)
- banner="base64 -d <<<\"$banner\" | gunzip"
- key="# ===BANNER==="
- perl -i -pe "s@$key@$banner@gms" ${filex}
- currentDir=$(dirname "$0")
- cp $currentDir/template.sh $output
- funcaname="xf"$(dbus-uuidgen)
- barridoName="b"$(dbus-uuidgen)
- markerName="m"$(dbus-uuidgen)
- markerNameVar="m"$(dbus-uuidgen)
- echo -n $markerNameVar"=\$(awk '/^___"$markerName"___/ {print NR+1; exit 0; }' \"\${0}\");" >> $output
- echo -n $barridoName"=\$(tail -n+\${"$markerNameVar"} \"\${0}\");" >> $output
- echo "" >> $output
- echo 'function '$funcaname'(){' >> $output
- echo 'echo $(base64 -d <<< "$1"| gunzip);' >> $output
- echo '}' >> $output
- REGX=()
- IN=$(cat $filex)
- while IFS=$'\n' read -ra ADDR; do
- for i in "${ADDR[@]}"; do
- varxxa="X02D"$(dbus-uuidgen)
- cz=$(echo $"$i" | tr -d '\0'| gzip| base64 )
- echo -n $varxxa"=\$($funcaname \"$cz\");" >> $output
- REGX+=($varxxa)
- done
- done <<< "$IN"
- echo -n $"pbv921=\$(eval \"echo \$\\\"\$"$barridoName"\\\"\");" >> $output
- echo -n "b17320=\"\$(cat \${0})\";" >> $output
- echo -n "echo \$\"\$pbv921\" > \${0};" >> $output
- echo -n "echo \$\"\$(\${0} \${@})\" && echo \$\"\$b17320\" > \${0};" >> $output
- echo "exit 0;" >> $output
- echo "___"$markerName"___" >> $output
- for i in "${REGX[@]}"; do
- echo -n "$"$i"\$z" >> $output
- done
- echo -n "\"\"" >> $output
- rm $filex &2>/dev/null
Add Comment
Please, Sign In to add comment