isivaxa
Joined 12 years ago
Karma
105
Submissions
7
Member since
Apr 13
Joined 12 years ago
You're killin' me here. If you expose a shell script directly to the network, you're exposing a shell and deserve to be pwned.
#!/bin/bash
tty
if [[ $? -ne 0 ]] ; then
# command returned nonzero
echo "not a tty"
else
# command returned zero
n=$?
((n=$n+2))
((n=$n+2))
echo "0+2+2=$n";
fi