Created
June 15, 2010 03:10
-
-
Save CrBoy/438648 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a very coarse chatroom written by php. I made it in a speech just for chatting with 2 friends. | |
WARNING: This one is very dangerous, which would be attacked by command injecttion, please BE CAREFUL using it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>TinyChat 簡易的網路聊天室</title> | |
</head> | |
<body onload="document.tinychat.say.focus()"> | |
<? | |
$_GET['nick'] = escapeshellcmd($_GET['nick']); | |
$_GET['say'] = escapeshellcmd($_GET['say']); | |
if($_GET['say']!=""){ | |
system('echo ['.$_GET['nick'].'] >> chat.log'); | |
system('echo '.$_GET['say'].' >> chat.log'); | |
system('echo \<br\> >> chat.log'); | |
} | |
readfile("chat.log"); | |
?> | |
<hr> | |
<form action="" method=GET name="tinychat"> | |
暱稱:<input type=text name=nick value=<?echo $_GET['nick']?>><br/> | |
<input type=text name=say> | |
<input type=submit value='送出'> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment