Hi list !
I subscribed to this list because I want to learn more about mod_perl and
apache. I'm familiar with perl but recently I had to surender using the old
fashioned plain perl use IO::Socket; scripts...
I have written a perl script which prevents browsers (or evil exploits) to
send buffer owerflows to apache. Basicaly this script is supposed to listen
on port 80 for incoming connections. The input (from browsers) is read up to
500 characters.
Here's a sample from the script:
for(;$paddr = accept(CLIENT,SERVER);close CLIENT){
open(STDIN,">&CLIENT");open(STDOUT,">&CLIENT");open(STDERR,">&CLIENT");
recv CLIENT,@input,500,0;
After the program reads the browsers input he sends it to an apache webserver
sitting on port 3000 (and only accepting connections from localhost), then
the script grabs the httpd's reply and sends it back to the client listening
on port 80. The problem is that this program slows down the connection
creating 30 second lags (YES i removed buffering).
Some friend of mine told me that apache perl modules should be faster so
here's my question. How do I limit the webclient's input to a number of
characters, bytes whatever...
Best regards
HalbaSus
-----------------------
Proud member of PentaGuard
"Making the net a safer place since 1998"