Thread Perl-Skript Portierung: IIS5 -> IIS6 (11 answers)
Opened by Gast at 2008-09-18 19:00

Gast Gast
 2008-09-19 19:56
#114797 #114797
Hallo, anbei unser Skript in drei Teilen.

Teil 1/3:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$path="e:\\var\\www\\lars\\io\\";
$TimeOutMinutes   =  5;
$debug = 0;
$filenr =  0;
$NewFilename="";
$ext="";

binmode STDIN;
srand(time()^($$+($$<<15)));

$user_input = read(STDIN, $Buffer, $ENV{CONTENT_LENGTH});

open DBG, ">$path" . "debug.trc"        if $debug;
print DBG $Buffer                       if $debug;
close(DBG)                                                                      if $debug;


$exists = 1;
$last = int(rand(99999)) + 1;

while($exists != 0)
{
        $last = int(rand(99999)) + 1;
        $name = $path."h".$last.".in";
        if(open(TESTDAT, $name)  !=  0 )
        {
                close(TESTDAT);
                $exists = 1;
        }
        else
                {
                        if ( open(TESTDAT,$path."h".$last.".tmp") != 0 )
                                {
                                        close(TESTDAT);
                                        $exists = 1;
                                }
                        else
                                {
                                        open(LARSOUT, ">".$path."h".$last.".tmp");
                                        $exists = 0;
                                }
                }
}

View full thread Perl-Skript Portierung: IIS5 -> IIS6