Wie o wie heeft verstand van PERL en kan een scriptje schrijven dat de dubbel geflushde blocks (naar een pproxy) kan filteren uit de proxy logs??? Met ip en tijd erbij enzo...
Zou bijzonder handig zijn!
Zou bijzonder handig zijn!
Verwijderd
...
Auw.. doe dit nooit als er 350MB aan logs in die directory staatOp woensdag 10 januari 2001 22:59 schreef dredge het volgende:
stappel had dit voor me :
cat pproxyrc5* | awk -F, ' { print $4 "\t" $3 "\t" $2 } ' | sort | uniq -d -c
filtert er nix uit maar je krijgt wel een lijst zo
Verwijderd
Overigens lijkt het me dat je toch echt maar 's eenOUTPUT: Keyblock log
--------------------
The personal proxy will also output so-called "key logs" which record
details of each completed block that is reported to it by a client.
These files are intended for automated processing and so they have a
very regular, comma delimited formatting. Each line of a key log has the
following fields, in order:
date/timestamp of format "mm/dd/yy hh:mm:ss"
IP address of the reporting client
email address of the client
first block number in completed packet (16 hexadecimal digits)
itersize of packet (number of 2^28 blocks)
operating system identifier of client (0=unknown).
cpu type of client (0=unknown).
build number of client (middle segment of version number).
01/15/99 07:39:16,0.0.0.0,rc5@distributed.net,6404AF4970000000,10,0,0,6400
See bottom of this document for a list of OS and CPU types and
numbers.
Verwijderd
1
| 01/15/99 07:39:16,0.0.0.0,rc5@distributed.net,6404AF4970000000,10,0,0,6400 |
Hmmmm ok, da's een goede reden.Op een laptop die meestal op een accu werkt? Liever niet, dank je.
Nee, "itersize of packet (number of 2^28 blocks)". 6404AF4970000000 tot 6404AF4A10000000. (naar de achterste 7 cijfers hoef je dus helemaal niet te kijken, die zijn gegarandeerd altijd 0)Dus hier is dat van block 6404AF4970000000 tot en met 6404AF4970000009
Verwijderd
Young child with dreams, dream every dream on your own. When children play, seems like you end up alone. Papa says he'd love to be with you, If he had the time. So you turn on the only friend you can find, there in your mind.. (Neil Diamond -Shilo-)
Verwijderd
Young child with dreams, dream every dream on your own. When children play, seems like you end up alone. Papa says he'd love to be with you, If he had the time. So you turn on the only friend you can find, there in your mind.. (Neil Diamond -Shilo-)
Young child with dreams, dream every dream on your own. When children play, seems like you end up alone. Papa says he'd love to be with you, If he had the time. So you turn on the only friend you can find, there in your mind.. (Neil Diamond -Shilo-)
Toch maar eens een andere sig bedenken :P
Verwijderd
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
| #!/usr/bin/perl
#
undef %full;
$log = "pproxyrc5all.log";
open (INPUTFILE, '<'."$log");
while (defined($entry = <INPUTFILE> )) {
chomp($entry);
$entry =~ tr/A-Z/a-z/;
($datetime, $ipaddr, $email, $block, $nkeys, $os, $cpu, $ver, $space) = split(/,/, $entry);
if (defined($full{$block})) {
$full{$block} += 1;
print "!!! Double found (" . $full{$block} . ") : " . $block . " !!! \n",
" again flushed by " . $email . " from : " . $ipaddr . " on : " . $datetime . "\n";
} else {
$full{$block} = 1;
}
}
close INPUTFILE; |
1
2
3
4
| type pproxyrc520010101.log >> pproxyrc5all.log type pproxyrc520010102.log >> pproxyrc5all.log type pproxyrc520010103.log >> pproxyrc5all.log type pproxyrc520010104.log >> pproxyrc5all.log |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| #!/usr/bin/perl
#
undef %full;
$log = "pproxyrc5all.log";
open (INPUTFILE, '<'."$log");
while (defined($entry = <INPUTFILE> )) {
chomp($entry);
$entry =~ tr/A-Z/a-z/;
($datetime, $ipaddr, $email, $block, $nkeys, $os, $cpu, $ver, $space) = split(/,/, $entry);
if (defined($full{$block})) {
$full{$block} += 1;
print $datetime . "," . $ipaddr . "," . $email . "," . $block . "," . $nkeys . "," . $os . "," . $cpu . ",8010 \n";
} else {
$full{$block} = 1;
}
}
close INPUTFILE; |
Ik draai het ook op mijn laptop, zodra de power eraf is gaatOp een laptop die meestal op een accu werkt? Liever niet, dank je.
Verwijderd
Apple iPhone 17 LG OLED evo G5 Google Pixel 10 Samsung Galaxy S25 Star Wars: Outlaws Nintendo Switch 2 Apple AirPods Pro (2e generatie) Sony PlayStation 5 Pro
Tweakers is onderdeel van
DPG Media B.V.
Alle rechten voorbehouden - Auteursrecht © 1998 - 2026
•
Hosting door TrueFullstaq