Jump to content

ascii 7


gabba2008

Recommended Posts

Hi,

 

I wanted to know if anyone can help me, I run a small chatbot on my server.The thing is I now have some idiot with a proxy dropping the bell code ascii 7. this does my head in because they do not just drop it once but up to 50 Bells per hit

 

I wanted to know if there was any way off adding code to my script to stop this and if anyone knows the code,the script was made for me but I have lost contact

 

I found this out ascii 7

 

Decimal  Octal  Hex    Binary        Value

007        007    007    00000111      BEL    (Bell)

Link to comment
https://forums.phpfreaks.com/topic/119259-ascii-7/
Share on other sites

hi again,

 

I did find this but it don't quite work as I am still under attack .anyone know why this dont work ?

 

 

 

1.

      function sanitise_string($string) {

  2.

              // Removes any unwanted characters from input received

  3.

              // from outside the client.

  4.

     

  5.

              // Define strings we want to strip.

  6.

              $strings = array (

  7.

                      "\x07", // "Beep"

  8.

                      );

  9.

     

  10.

              // Now strip them.

  11.

              $string = str_replace($strings, "", $string);

  12.

     

  13.

              // And return the result.

  14.

              return $string;

  15.

              }

 

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/119259-ascii-7/#findComment-617854
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.