view bin/show @ 5967:9f67418e5043

<b_jonas> ` f=bin/w\xc3\xa4lc\xc3\xa5m\xc3\xa4; >"$f" echo $\'/bin/sh\\nwelcome | sed "s/E/\xc3\x84/g;s/O/\xc3\x85/g;s/e/\xc3\xa4/g;s/o/\xc3\xa5/g"\'; chmod a+x "$f"
author HackBot
date Thu, 10 Sep 2015 11:15:33 +0000
parents 859f9b4339e6
children
line wrap: on
line source

#!/bin/sh
. lib/dcc

# Sanitize
INTERP=`echo "$2" | sed 's/[^A-Za-z0-9]/_/g'`

if [ ! -e subinterps/"$INTERP".cmd ]
then
    echo 'That is not a user interpreter!'
    exit 1
fi

if [ "`wc -l subinterps/$INTERP.arg | sed 's/ .*//'`" -gt 1 ]
then
    echo "`cat subinterps/$INTERP.cmd`" '(sending via DCC)'
    dcc_chat $IRC_NICK < subinterps/$INTERP.arg
else
    echo "`cat subinterps/$INTERP.cmd`" "`cat subinterps/$INTERP.arg`"
fi