#!/bin/bash
# Hello, forum.local.
# I am a simple bash script able to upload myself as a forum topic. This
# makes me a cheating quine (I read and process my source code externally).
B="postername=$0&Board=prog&Subject=cat%20%3e%20forum.local&Body=`od -t x1 -w9999 -A n $0|tr " " %`"
(
echo "POST /addpost.php?showlite= HTTP/1.1"
echo "Host: forum.local"
echo "User-Agent: `$SHELL --version | head -1`"
echo "Content-Type: application/x-www-form-urlencoded"
echo "Content-Length: ${#B}"
echo
echo -n $B
) > /dev/tcp/forum.local/80
vall
42 =)
agaaaa
Вроде quine не должен читать собственный исходник.
gervalya5
#!/bin/bash# Hello, forum.local.
# I am a simple bash script able to upload myself as a forum topic. This
# makes me a cheating quine (I read and process my source code externally).
B="postername=$0&Board=prog&Subject=cat%20%3e%20forum.local&Body=`od -t x1 -w9999 -A n $0|tr " " %`"
(
echo "POST /addpost.php?showlite= HTTP/1.1"
echo "Host: forum.local"
echo "User-Agent: `$SHELL --version | head -1`"
echo "Content-Type: application/x-www-form-urlencoded"
echo "Content-Length: ${#B}"
echo
echo -n $B
) > /dev/tcp/forum.local/80