Leser: 26
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/perl -w
use Config;
use FileHandle;
my $sidewinderlog = shift;
my $destfolder = 'L:\\sw-logs';
my $ftp_file = "$destfolder\\ftp.log";
my $dns_file = "$destfolder\\dns.log";
my $web_file = "$destfolder\\web.log";
my $mail_file = "$destfolder\\mail.log";
my $other_file = "$destfolder\\other.log";
my $inputfh = new FileHandle "< $sidewinderlog";
my $ftp = new FileHandle "> $ftp_file";
my $dns = new FileHandle "> $dns_file";
my $web = new FileHandle "> $web_file";
my $mail = new FileHandle "> $mail_file";
my $other = new FileHandle "> $other_file";
my $c; # Count
while ( <$inputfh> ) {
$c++;
if ( ! ( $c % 10000 ) ) {
print "$c done...\n";
}
# Filter double lines
if ( ! /date=\"/ ) { next; }
# FTP
if ( /dstport: 21 / || /dstport: 20 / || /srcport: 21 / || /srcport: 20 / ||
/dstport=21,/ || /dstport=20,/ || /srcport=21,/ || /srcport=20,/
)
{
print $ftp $_;
next;
}
# DNS
if ( /dstport: 53 / || /srcport: 53 / || /dstport=53,/ || /srcport=53,/ ) {
print $dns $_;
next;
}
# WEB
if (
(/srcip: 10.10.10.1[0-9]?/ && ( /dstport: 80 / || /dstport: 53 / || /dstport: 443 / ))
||
(/srcip=10.10.10.1[0-9]?,/ && ( /dstport=80,/ || /dstport=53,/ || /dstport=443,/ ))
) {
print $web $_;
next;
}
if ( /dstport: 25 / || /srcport: 25 / || /dstport=25,/ || /srcport=25,/ ) {
print $mail $_;
next;
}
print $other $_;
}
close $inputfh;
close $ftp;
close $dns;
close $web;
close $mail;
close $other;
print $ftp $_ oder die $!
2009-05-05T13:00:08 GwenDragonA) Welches Windows hast du denn?
Die Dateibeschränkung auf eine bestimmte Dateigröße gilt ja m. E. nicht für NTFS.
2009-05-05T13:00:08 GwenDragonB) Deine Regexes stimmen nur bedingt
Zeile 4z und 49: Wenn das IPs sein sollen, musst du den Punkt maskieren!
2009-05-05T13:00:08 GwenDragonWelche Fehlermeldung kommt dann?
Out of memory during "large" request for 536875008 bytes, total sbrk() is 268781568 bytes at sidecutter.pl line 41, <INPUT> line 2075440.
1
2
3
4
if ( length($_) > 1000 ) {
print "Überlange Zeile gefunden mit ".length($_)." Zeichen.\n";
print substr(0,1000,$_)."...";
exit; }
Guest MapacheNein. Denn wenn du die Zeile einliest, ist sie ja schon gelesen und da ist es zu spät und der Speicher voll-Fehler schlägt zu.Könnt ich das irgendwie testen?
Guest MapacheWenn das stimmt, dann … Solche Leuten sollte man Beine machen, die so dusselig sind.Mir scheint, da cat'ed jemand unterschiedliche Files zusammen.
QuoteKann ich beim Einlesen aus <> irgendwie den Zeilentrenner selbst festlegen?
Ich schau mir mal an, welchen Trenner die ersten paar Zeilen haben.
Guest MapacheAlso die ersten Zeilen haben ein <LF> am Ende.
$> split -1000000
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
#!/usr/bin/perl use strict; use warnings; my $infile='/path/to/infile'; my $fh = new FileHandle($infile,'r'); die "ERROR Open $infile ($!)\n" unless(defined($fh)); my $data=''; my $line; my $buff; while(!$fh->eof()) { $line=''; # Daten einlesen solange kein "\n" oder "\r" kommt while(!index($data,"\x0A") && !index($data,"\x0D") ) { $fh->read($buff,1024); # anpassen wenn es zu langsam ist... $data.=$buff; } # erste Zeile Heraussplitten ("\n" und "\r") gehen verloren # das läuft solange wie $data noch Newlines enthalten # das "split" ist recht langsam, mit "index" und "substr" währe es schneller ($line,$data)=split(/[\x0A\x0D]+/,$data,2); working($line); } # jetzt noch den Rest verarbeiten... working($_) for(split(/[\x0A\x0D]+/,$data)); close($fh); exit(0); ######################################### # Verarbeiten ########################### ######################################### sub working { my $line=shift; # arbeite damit ... }
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
#!/usr/bin/perl use strict; use warnings; use FileHandle; my $infile=shift; my $ftp_file = "ifwprod-ftp.log"; my $dns_file = "ifwprod-dns.log"; my $web_file = "ifwprod-web.log"; my $mail_file = "ifwprod-mail.log"; my $other_file = "ifwprod-other.log"; my $ftp = new FileHandle "> $ftp_file"; my $dns = new FileHandle "> $dns_file"; my $web = new FileHandle "> $web_file"; my $mail = new FileHandle "> $mail_file"; my $other = new FileHandle "> $other_file"; my $fh = new FileHandle($infile,'r'); die "ERROR Open $infile ($!)\n" unless(defined($fh)); my $data=""; my $line; my $buff; my $count; while(!$fh->eof()) { $line=''; # Daten einlesen solange kein "\n" oder "\r" kommt # overflow couter my $oc = 0; while(index($data,"\x0A") < 0 && index($data,"\x0D") < 0 ) { $fh->read($buff,1024); # anpassen wenn es zu langsam ist... $data.=$buff; $oc++; if ( $oc gt 1000 ) { print "Overflow detected at line $count:\n"; print $data."\n"; print $buff."\n"; exit(1); } } # erste Zeile Heraussplitten ("\n" und "\r") gehen verloren # das läuft solange wie $data noch Newlines enthalten # das "split" ist recht langsam, mit "index" und "substr" währe es schneller ($line,$data)=split(/[\x0A\x0D]+/,$data,2); #print $line."\n\n"; working($line); $count++; if ( ! ( $count % 10000 ) ) { print "$count lines done\n"; } } # jetzt noch den Rest verarbeiten... working($_) for(split(/[\x0A\x0D]+/,$data)); close($fh); close $ftp; close $dns; close $web; close $mail; close $other; exit(0); ######################################### # Verarbeiten ########################### ######################################### sub working { $_ = shift; # arbeite damit ... # FTP if ( /dstport: 21 / || /dstport: 20 / || /srcport: 21 / || /srcport: 20 / || /dstport=21,/ || /dstport=20,/ || /srcport=21,/ || /srcport=20,/ ) { print $ftp $_ or die $!; } # DNS elsif ( /dstport: 53 / || /srcport: 53 / || /dstport=53,/ || /srcport=53,/ ) { print $dns $_ or die $!; } # WEB elsif ( (/srcip: 10\.1\.1\.1[0-9]?/ && ( /dstport: 80 / || /dstport: 53 / || /dstport: 443 / )) || (/srcip=10\.1\.1\.1[0-9]?,/ && ( /dstport=80,/ || /dstport=53,/ || /dstport=443,/ )) ) { print $web $_ or die $!; } # MAIL elsif ( /dstport: 25 / || /srcport: 25 / || /dstport=25,/ || /srcport=25,/ ) { print $mail $_ or die $!; } else { print $other $_ or die $!; } }
1
2
3
4
5
6
7
8
9
10
11
12
1600000 lines done
1610000 lines done
1620000 lines done
1630000 lines done
1640000 lines done
1650000 lines done
1660000 lines done
1670000 lines done
1680000 lines done
1690000 lines done
Overflow detected at line 1695136:
Apr 27 09:08:32 abc12_ab0.net.intra.abc-firm.com auditd: Apr 27 07:08:32 2009 UTC f_http_proxy a_libproxycommon t_nettraffic p_major pid: 3060 ruid: 0 euid: 0 pgid: 3060 logid: 0 cmd: 'httpp' domain: htpp edomain: htpp hostname: abcd.net.abcde.abc-b
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
while(!$fh->eof()) { $line=''; # Daten einlesen solange kein "\n" oder "\r" kommt # overflow couter my $oc = 0; while(index($data,"\x0A") < 0 && index($data,"\x0D") < 0 && $oc < 1000) { $fh->read($buff,1024); # anpassen wenn es zu langsam ist... $data.=$buff; $oc++; if ( $oc gt 10000 ) { print "Overflow detected at line $count:\n"; print $data."\n"; print $buff."\n"; } } # erste Zeile Heraussplitten ("\n" und "\r") gehen verloren # das läuft solange wie $data noch Newlines enthalten # das "split" ist recht langsam, mit "index" und "substr" währe es schneller ($line,$data)=split(/[\x0A\x0D]+/,$data,2); #print $line."\n\n"; #working($line); $count++; if ( ! ( $count % 10000 ) ) { print "$count lines done\n"; } }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
1630000 lines done
1640000 lines done
1650000 lines done
1660000 lines done
1670000 lines done
1680000 lines done
1690000 lines done
Overflow detected at line 1695136:
Apr 27 09:08:32 abc12_ab0.abc.intra.abc-firm.com auditd: Apr 27 07:08:32 2009 UTC f_http_proxy a_libproxycommon t_nettraffic p_major pid: 3060 ruid: 0 euid: 0 pgid: 3060 logid: 0 cmd: 'httpp' domain: htpp edomain: htpp hostname: abc1.abc.intra.abc-f
Overflow detected at line 1695136:
Apr 27 09:08:32 abc12_ab0.abc.intra.abc-firm.com auditd: Apr 27 07:08:32 2009 UTC f_http_proxy a_libproxycommon t_nettraffic p_major pid: 3060 ruid: 0 euid: 0 pgid: 3060 logid: 0 cmd: 'httpp' domain: htpp edomain: htpp hostname: abc1.abc.intra.abc-f
Overflow detected at line 1695136:
Apr 27 09:08:32 abc12_ab0.abc.intra.abc-firm.com auditd: Apr 27 07:08:32 2009 UTC f_http_proxy a_libproxycommon t_nettraffic p_major pid: 3060 ruid: 0 euid: 0 pgid: 3060 logid: 0 cmd: 'httpp' domain: htpp edomain: htpp hostname: abc1.abc.intra.abc-f
Overflow detected at line 1695136:
Apr 27 09:08:32 abc12_ab0.abc.intra.abc-firm.com auditd: Apr 27 07:08:32 2009 UTC f_http_proxy a_libproxycommon t_nettraffic p_major pid: 3060 ruid: 0 euid: 0 pgid: 3060 logid: 0 cmd: 'httpp' domain: htpp edomain: htpp hostname: abc1.abc.intra.abc-f
Overflow detected at line 1695136:
Apr 27 09:08:32 abc12_ab0.abc.intra.abc-firm.com auditd: Apr 27 07:08:32 2009 UTC f_http_proxy a_libproxycommon t_nettraffic p_major pid: 3060 ruid: 0 euid: 0 pgid: 3060 logid: 0 cmd: 'httpp' domain: htpp edomain: htpp hostname: abc1.abc.intra.abc-f
1 2 3 4 5
if ( $oc gt 10000 ) { print "Overflow detected at line $count:\n"; printf("%x\n",$data); printf("%x\n",$buff); }
1
2
3
Overflow detected at line 1695139:
Argument "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..." isn't numeric in printf at sidechopper.pl line 39.
0
1 2 3 4 5 6 7 8 9 10
if ( $oc gt 10000 ) { print "Overflow detected at line $count:\n"; my @data_arr=unpack('C*', $data); my $data_hex; foreach my $c (@data_arr) { $data_hex .= "\%" . sprintf ("%lx", $c); } print "$data_hex\n"; }
1
2
3
4
5
6
7
8
9
10
11
12
1600000 lines done
1610000 lines done
1620000 lines done
1630000 lines done
1640000 lines done
1650000 lines done
1660000 lines done
1670000 lines done
1680000 lines done
1690000 lines done
Overflow detected at line 1695136:
%41%70%72%20%32%37%20%30%39%3a%30%38%3a%33%32%20%69%66%77%31%32%5f%65%6d%30%2e%6e%65%74%2e%69%6e%74%72%61%2e%62%68%66%2d%62%61%6e%6b%2e%63%6f%6d%20%61%75%64%69%74%64%3a%20%20%41%70%72%20%32%37%20%30%37%3a%30%38%3a%33%32%20%32%30%30%39%20%55%54%43%20%20%66%5f%68%74%74%70%5f%70%72%6f%78%79%20%61%5f%6c%69%62%70%72%6f%78%79%63%6f%6d%6d%6f%6e%20%74%5f%6e%65%74%74%72%61%66%66%69%63%20%70%5f%6d%61%6a%6f%72%20%70%69%64%3a%20%33%30%36%30%20%72%75%69%64%3a%20%30%20%65%75%69%64%3a%20%30%20%70%67%69%64%3a%20%33%30%36%30%20%6c%6f%67%69%64%3a%20%30%20%63%6d%64%3a%20%27%68%74%74%70%70%27%20%64%6f%6d%61%69%6e%3a%20%68%74%70%70%20%65%64%6f%6d%61%69%6e%3a%20%68%74%70%70%20%68%6f%73%74%6e%61%6d%65%3a%20%69%66%77%31%2e%6e%65%74%2e%69%6e%74%72%61%2e%62%68%66%2d%62%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%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0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0
2009-05-06T06:57:22 MapacheMan nehme eine 9,5 GB Datei mit %00en gezippt auf 50kb und schicke sie per Mail durchs Haus. Wenn der Mail-Virenscanner dann lustig beginnt auszupacken, isses aus.
working($line) if $line;
tail -1 inputfile