Sanitary entrance from irc

So, I was thinking of writing an ib bot / bot extension that allows users to play certain text games when starting a game,

sending parts of certain lines that they enter (regular expression for the game signal, if not in the ex.rbot bot channel, in the "forest" field) sends "enter the forest" to std in the game,

while the standard one from the game is cached by the bot, and the channel is cached to the channel (for example, “Rejoice for the duck was defeated” is read into the linear cache inside the bot, and then the bot sends it to the corresponding channel as

gamename: let's be happy for

gamename: duck defeated ")

But how am I concerned about the difficult things that people on irc could do to deprive all non-printable characters of sufficient security? If the program exits (for example, they enter the quit command for the game), what happens when you try to write the file descriptor for these std programs to (error)? Any other potential problems? Note. I'm going to run this on linux or * bsd, so I don’t have to worry about specific events on Windows.

+3
source share
3 answers

Some basics you can consider:

  • , , , , , , , . , , - , , , - .
  • . , .
  • PID , , , , ..

, , google , ,.

, . , , .

+2

" ' |
+1

, , , .

, IRC, CRLF-. , IRC. (\ r) (). , HTTP SMTP. IRC IRCD (,/join /kick /ban:). ASCII 0x0A (\n) 0x0D (\ r). , , .

, OWASP A1: Injection. , sql .

+1
source

Source: https://habr.com/ru/post/1756395/


All Articles