<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- newbed.pl   Fri May 13 10:26:47 2005
+++ bed.pl      Fri May 13 10:26:53 2005
@@ -9,6 +9,7 @@
 use Getopt::Std;
 use Socket;
 my $SOCKET = "";
+use Time::HiRes; # for Time::HiRes::sleep
 
 # which plugins do we support? insert your plugin ( dummy ) here...
 @plugins = ( "ftp", "smtp", "pop", "http", "irc", "imap", "pjl", "lpd", "finger", "socks4", "socks5" );
@@ -29,7 +30,7 @@
 print ("\n BED 0.5 by mjm ( www.codito.de ) &amp; eric ( www.snake-basket.de )\n\n");
 
 # get the parameters we need for every test
-getopts('s:t:o:p:u:v:w:x:');
+getopts('s:t:o:p:u:v:w:x:b:');
 &amp;usage unless(defined $opt_s);
 
 $opt_s = lc($opt_s);                         # convert it to lowercase
@@ -49,6 +50,7 @@
 %special_cfg=(
   "t" =&gt; "$opt_t",                           # target
   "o" =&gt; "$opt_o",                           # timeOut
+  "b" =&gt; "$opt_b",                           # banner wait time
   "p" =&gt; "$opt_p",                           # port
 
   "u" =&gt; "$opt_u",                           # special parameters for the plugin...
@@ -62,6 +64,7 @@
 $module-&gt;{port}         = undef;
 $module-&gt;{vrfy}         = ""; 
 $module-&gt;{timeout}      = undef;
+$module-&gt;{bannersleep}      = undef;
 $module-&gt;{sport}        = 0;
 
 if ($special_cfg{'t'} eq "") { $module-&gt;{target}='127.0.0.1'; }
@@ -146,7 +149,7 @@
                         foreach $log (@login){
                                 if ( $log ne "" ){
                                         send(SOCKET, $log, 0);
-                                        sleep(1);                     # some daemons need some time to reply
+                                        Time::HiRes::sleep($module-&gt;{bannersleep});                     # some daemons need some time to reply
                                 }
                         }
                         send(SOCKET, $command, 0);                    # send the attack and verify that the server is still alive
@@ -166,7 +169,7 @@
                                 close SOCKET;
                         }
 
-                sleep($module-&gt;{timeout});                                             # some servers would kick us for too fast logins
+                Time::HiRes::sleep($module-&gt;{timeout});                                             # some servers would kick us for too fast logins
                 }
                 print "\n";
         }
@@ -178,12 +181,13 @@
 print qq~
  Usage:
 
- $0 -s &lt;plugin&gt; -t &lt;target&gt; -p &lt;port&gt; -o &lt;timeout&gt; [ depends on the plugin ]
+ $0 -s &lt;plugin&gt; -t &lt;target&gt; -p &lt;port&gt; -o &lt;timeout&gt; -b &lt;banner wait time&gt; [ depends on the plugin ]
 
- &lt;plugin&gt;   = FTP/SMTP/POP/HTTP/IRC/IMAP/PJL/LPD/FINGER/SOCKS4/SOCKS5
- &lt;target&gt;   = Host to check (default: localhost)
- &lt;port&gt;     = Port to connect to (default: standard port)
- &lt;timeout&gt;  = seconds to wait after each test (default: 2 seconds)
+ &lt;plugin&gt;      = FTP/SMTP/POP/HTTP/IRC/IMAP/PJL/LPD/FINGER/SOCKS4/SOCKS5
+ &lt;target&gt;      = Host to check (default: localhost)
+ &lt;port&gt;        = Port to connect to (default: standard port)
+ &lt;timeout&gt;     = seconds to wait after each test (default: 2 seconds)
+ &lt;bannertime&gt;  = time to wait for banner (default: 0.2 seconds)
  use "$0 -s &lt;plugin&gt;" to obtain the parameters you need for the plugin.
 
  Only -s is a mandatory switch.</pre></body></html>