亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? psa-chapter08.txt

?? perl語言的經典文章
?? TXT
?? 第 1 頁 / 共 2 頁
字號:

# the port number clients should connect to
$serverport = "9967";
# and the name of the server
$servername = "reportserver";    
# name to IP address
$serveraddr = inet_ntoa(scalar gethostbyname($servername)); 
$reporttoaddr  = "project\@example.com";
$reportfromaddr  = "project\@example.com";

$reserver = IO::Socket::INET->new(PeerAddr => $serveraddr,
                                  PeerPort => $serverport,
                                  Proto    => "tcp",
                                  Type     => SOCK_STREAM)
  or die "Unable to build our socket half: $!\n";


if ($ARGV[0] ne "-m"){
    print $reserver $ARGV[0];
}
else {
    use Mail::Mailer;

    print $reserver "DUMPNOW\n";
    chomp($subject = <$reserver>);
    $body = join("",<$reserver>);

    $type="sendmail";
    my $mailer = Mail::Mailer->new($type) or
      die "Unable to create new mailer object:$!\n";

    $mailer->open({
		   From => $reportfromaddr,
		   To => $reporttoaddr,
		   Subject => $subject
		  }) or die "Unable to populate mailer object:$!\n";

    print $mailer $body;
    $mailer->close;
}

close($reserver);
-------
#*
#* a subroutine (and example use of the subroutine) that provides 
#* decent problem reporting output
#*

use Text::Wrap;

sub problemreport {
# $shortcontext should be a one-line description of the problem
# $usercontext should be a detailed description of the problem
# $nextstep should be the best suggestion for how to remedy the problem 
    my($shortcontext,$usercontext,$nextstep) = @_;
    my($filename, $line, $subroutine) = (caller(1))[1,2,3];
    
    push(@return,"Problem with $filename: $shortcontext\n");

    push(@return,"*** Problem report for $filename ***\n\n");
    push(@return,fill("","","- Problem: $usercontext")."\n\n");
    push(@return,"- Location: line $line of file $filename in
                 $subroutine\n\n");
    push(@return,"- Occurred: ".scalar localtime(time)."\n\n");

    push(@return,"- Next step: $nextstep\n");

    \@return;
}
    
sub fireperson {
    $report = &problemreport("the computer is on fire",<<EOR,<<EON);
While running the accounting report, smoke started pouring out of the 
back of the machine. This occurred right after we processed the ORA 
pension plan.
EOR
Please put fire out before continuing.
EON

  print @{$report};

}

&fireperson;
-------
#*
#* parsing an email message
#*

use Mail::Internet;

$messagefile = "mail";

open(MESSAGE,"$messagefile") or die "Unable to open $messagefile:$!\n";
$message = new Mail::Internet \*MESSAGE;
close(MESSAGE);
-------
#*
#* parsing an email message header
#*

use Mail::Header;

$messagefile = "mail";

open(MESSAGE,"$messagefile") or die "Unable to open $messagefile:$!\n";
$header = new Mail::Header \*MESSAGE;
close(MESSAGE);

print join("\n",sort $header->tags);
-------
#*
#* display the path a message took to get to us
#*

use Mail::Header;

$header = new Mail::Header \*STDIN;

$header->unfold('Received');
@received = $header->get('Received');

for (reverse @received){
    chomp;
    parseline($_);
    if (!defined $ehelo and !defined $validname and !defined $validip){
	print "$_\n";
    }
    else {
	write;
    }
}

format STDOUT =
@<<<<<<<<<<<<<<<<<<<<<<  @<<<<<<<<<<<<<<<<<<<<<  @<<<<<<<<<<<<<<<
$ehelo,$validname,$validip
.

sub parseline {
    my $line = $_;

    # "normal" -- from HELO (REAL [IP])
    if (/from\s+(\w\S+)\s*\((\S+)\s*\[(\d+\.\d+\.\d+\.\d+)/){
	($ehelo,$validname,$validip) = ($1,$2, $3);
    }
    # can't reverse resolve -- from HELO ([IP])
    elsif (/from\s+(\w\S+)\s+\(\[(\d+\.\d+\.\d+\.\d+)\]/){
	($ehelo,$validname,$validip) = ($1,undef, $2);
    }	
    # exim -- from [IP] (helo=[HELO IP])
   elsif (/from\s+\[(\d+\.\d+\.\d+\.\d+)\]\s+\(helo=\[(\d+\.\d+\.\d+\.\d+)\]/){
	($validip,$ehelo,$validname) = ($1,$2, undef);
    }	
    # Sun Internet Mail Server -- from [IP] by HELO
    elsif (/from\s+\[(\d+\.\d+\.\d+\.\d+)\]\s+by\s+(\S+)/){
	($validip,$ehelo,$validname) = ($1,$2, undef);
    }	
    # Microsoft SMTPSVC -- from HELO - (IP)
    elsif (/from\s+(\S+)\s+-\s+(\d+\.\d+\.\d+\.\d+)\s+/){
	($ehelo,$validname,$validip) = ($1,$2, $3);
    }
    else { # punt!
	$ehelo = $validname = $validip = undef;
    }

    return [$ehelo,$validname,$validip];
}
-------
#*
#* subroutine that checks if the name we were given matches the IP address
#* we recorded when we received the mail
#*

use Socket;

sub checkrev{
    my($ip,$name) = @_;

    return 0 unless ($ip and $name);

    my $namelook = gethostbyaddr(inet_aton($ip),AF_INET);
    my $iplook   = gethostbyname($name);

    $iplook = inet_ntoa($iplook) if $iplook;
    
    # may be recorded with different capitilization
    if ($iplook eq $ip and lc $namelook eq lc $name){
        return 0;
    }
    else {
        return 1;
    }
}
-------
#*
#* display the contents of a local sendmail blacklist
#*

$blacklist = "/etc/mail/blacklist.db";

use BerkeleyDB;

# tie the hash %blist to the blacklist file, using Berkeley DB 
# to retrieve values
tie %blist, 'BerkeleyDB::Hash', -Filename  => $blacklist
  or die "Cannot open file $filename: $! $BerkeleyDB::Error\n" ;

# iterate over each key and value in this file, printing only 
# the REJECT entries
while(($key,$value) = each %blist){
    # the entry in the list can also be marked "OK", "RELAY", etc. 
    next if ($value ne "REJECT"); 
    
    print "$key\n";
}
-------
#*
#* two ways to check against a local black list
#*

use BerkeleyDB;

$blacklist = "/etc/mail/blacklist.db";

&loadblist;

# take a host name as a command line argument and complain 
# if it is in the blacklist
if (defined &checkblist($ARGV[0])){
    print "*** found $found in our blacklist\n";
}

# load the blacklist into an array of anonymous subroutines
sub loadblist{
    tie %blist, 'BerkeleyDB::Hash', -Filename  => $blacklist
      or die "Cannot open file $filename: $! $BerkeleyDB::Error\n" ;

    while(my($key,$value) = each %blist){
        # the blacklist can also say "OK", "RELAY", and etc. 
        next if ($value ne "REJECT"); 
        push(@blisttests, eval 'sub {$_[0] =~ /\Q$key/o and $key}');
    }    
}

sub checkblist{
    my($line) = shift;

    foreach $subref (@blisttests){
        return $found if ($found = &$subref($line));
    }
    return undef;
}

### OR ###

sub loadblist{
    tie %blist, 'BerkeleyDB::Hash', -Filename  => $blacklist
      or die "Cannot open file $filename: $! $BerkeleyDB::Error\n" ;

    while(my($key,$value) = each %blist){
        # the blacklist can also say "OK", "RELAY", and etc. 
        next if ($value ne "REJECT"); 
        push(@blisttests,[qr/\Q$key/,$key]);
    }    
}

sub checkblist{
    my($line) = shift;

    foreach my $test (@blisttests){
        my($re,$key) = @{$test};
        return $key if ($line =~ /$re/);
    }
    return undef;
}
-------
#*
#* subroutine to check an address against an Internet-wide black list
#*

sub checkaddr{
    my($ip,$domain) = @_;

    return undef unless (defined $ip);

    my $lookupip = join('.',reverse split(/\./,$ip));
    
    if (gethostbyname($lookupip.$domain)){
        return $ip;
    }
    else {
        return undef;
    }
}
-------
#*
#* retrieve WHOIS information about a particular IP address
#*
sub getwhois{
    my($ip) = shift;
    my($info);

    $cn = new Net::Telnet(Host => $whoishost,
                          Port => 'whois',
                          Errmode => "return",
                          Timeout => 30)
      or die "Unable to set up $whoishost connection:$!\n";

    unless ($cn->print($ip."\n")){
        $cn->close;
        die "Unable to send $ip to $whoishost: ".$cn->errmsg."\n";
    }

    while ($ret = $cn->get){
        $info .=$ret;
    };

    $cn->close;

    return $info;
}
-------
#*
#* examine a piece of spam/UCE and tell us information about it
#* NOTE: this requires several subroutines from above
#*

use Mail::Header;
use Socket; 
use BerkeleyDB;
use Net::Telnet;

$header = new Mail::Header \*STDIN;

$header ->unfold('Received');
@received = $header->get('Received');

$rbldomain  = ".rbl.maps.vix.com";
$orbsdomain = ".relays.orbs.org";
$duldomain  = ".dul.maps.vix.com";
$blacklist  = "/etc/mail/blacklist.db";
$whoishost  = "whois.geektools.com";

&loadblist;

for (reverse @received){
    chomp;


    parseline($_);
    if (!defined $ehelo and !defined $validname and !defined $validip){
       print "$_\n";
    }
    else {
     $flags  = (&checkaddr($validip,$rbldomain)  ? "R" : ""); # in RBL?
     $flags .= (&checkaddr($validip,$orbsdomain) ? "O" : ""); # in ORBS?
     $flags .= (&checkaddr($validip,$duldomain)  ? "D" : ""); # in DUL?
     $flags .= (&checkblist($_)              ? "B" : ""); # in our list?
     $flags .= (&checkrev($validip,$validname) ? "L" : ""); # rev-lookup?
      push(@iplist,$validip);
	
      write;
    }
}

for (@iplist){
    print "\nWHOIS info for $_:\n";
    print &getwhois($_);
}

format STDOUT =
@<<<<<<<<<<<<<<<<<<<<<  @<<<<<<<<<<<<<<<<<<<<<  @<<<<<<<<<<<<<<< @<<<<
$ehelo,$validname,$validip,$flags
.
-------
#*
#* suss - attempts to determine problem machine by looking at message itself
#*

use Mail::Internet;
$localdomain = ".example.com";

# read in our host file
open(HOSTS,"/etc/hosts") or die "Can't open host file\n";
while(defined($_ = <HOSTS>)){
    next if /^#/;        # skip comments
    next if /^$/;        # skip blank lines
    next if /monitor/i;  # an example of a misleading host 

    $machine = lc((split)[1]);  # extract the first host name & downcase
    $machine =~ s/\Q$localdomain\E$//oi; # remove our domain name
    $machines{$machine}++ unless $machines{$machine};
}

# parse the message
$message = new Mail::Internet \*STDIN;
$message->head->unfold();

# check in the subject line
my $subject = $message->head->get('Subject');
$subject  =~ s/[.,;?]//g;
for (split(/\s+/,$subject)) {
    if (exists $machines{lc $_}) {
	print "subject: $_\n";
	$found++;
    }
}
exit if $found;

# check in the body of the message
chomp(my @body = @{$message->body()});
my $body = join(" ",@body);
$body =~ s/[^\w\s]/ /g;              # remove punctuation 
@body{split(' ', lc $body)} = ();    # uniq'ify the body
for (keys %body) {
    if (exists $machines{lc $_}) {
	print "body: $_\n";
	$found++;
    }
}
exit if $found;

# last resort: check the last Received: line
$received = (reverse $message->head->get('Received'))[0]; 
$received =~ s/\Q$localdomain\E//g;
for (split(/\s+/,$received)) {
    if (exists $machines{lc $_}) {
	print "received: $_\n";
    }
}
-------
#*
#* a suss-like program that checks against a printer database
#*

use Mail::Internet;
use DB_File;

$localdomain = ".example.com";

# printdb is a Berkeley DB file with a host for a key and a 
# printer for a value
$printdb     = "printdb"; 

# parse the message
$message = new Mail::Internet \*STDIN;
$message->head->unfold();

# check in the subject line
my $subject = $message->head->get('Subject');
if ($subject =~ /print(er|ing)?/i){
    # find sending machine (assumes Sendmail's header format)
    $received = (reverse $message->head->get('Received'))[0]; 
    ($host) = 
      $received =~ /^from \S+ \((?:\S+@)?(\S+)\Q$localdomain\E \[/;
}

tie %printdb, "DB_File",$printdb  or die "Can't tie $printdb database:$!\n";

print "Problem on $host may be with the printer called " . 
  $printdb{$host} . ".\n";

untie %printdb;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩激情视频在线观看| 欧美喷潮久久久xxxxx| 亚洲午夜精品网| 精品日韩99亚洲| 欧美无砖专区一中文字| 一本色道a无线码一区v| 成人精品视频一区| 国产麻豆成人传媒免费观看| 日韩精品一区第一页| 亚洲成人三级小说| 亚洲成人三级小说| 五月婷婷综合在线| 亚洲国产wwwccc36天堂| 成人高清伦理免费影院在线观看| 亚洲天堂网中文字| 国产欧美日韩激情| 亚洲国产精品精华液2区45| 欧美大片一区二区三区| 欧美性色欧美a在线播放| 在线观看www91| 欧美午夜精品理论片a级按摩| 一本在线高清不卡dvd| 91网站最新地址| 在线观看视频91| 成人激情动漫在线观看| 波波电影院一区二区三区| 成人app在线观看| 99国内精品久久| 一本色道久久综合精品竹菊| 色网站国产精品| 91在线免费视频观看| 色综合久久久久综合99| 在线日韩av片| 欧美一区二区三区日韩| 精品免费一区二区三区| 中文字幕av免费专区久久| 椎名由奈av一区二区三区| 一区二区三区四区激情| 久久久久久9999| 成人av中文字幕| 91精品国产综合久久蜜臀| 久久嫩草精品久久久精品| 亚洲一区二区三区四区五区中文 | 毛片一区二区三区| a美女胸又www黄视频久久| 欧美精品日韩综合在线| 一区免费观看视频| 狠狠色丁香婷婷综合| 精品视频一区二区不卡| 中文字幕欧美国产| 极品尤物av久久免费看| 欧美日韩高清不卡| 一级日本不卡的影视| 岛国一区二区在线观看| 欧美videos中文字幕| 欧美精品在线一区二区三区| 国产片一区二区三区| 蜜臀av亚洲一区中文字幕| 色婷婷久久综合| 国产人伦精品一区二区| 久久成人羞羞网站| 欧美一级久久久久久久大片| 亚洲激情中文1区| 97久久精品人人爽人人爽蜜臀| 日韩精品专区在线影院重磅| 一区二区三区色| 在线观看亚洲a| 亚洲激情五月婷婷| 91久久精品一区二区三区| 国产精品大尺度| 91丨porny丨国产| 亚洲人成影院在线观看| 91免费版在线| 香蕉加勒比综合久久| 欧美日韩大陆一区二区| 亚洲va欧美va人人爽| 欧美视频一区二区三区四区| 亚洲一区中文日韩| 91麻豆精品国产91| 蜜臀av性久久久久蜜臀aⅴ | 国产一区二区主播在线| 日韩一区二区免费在线电影| 免费在线观看成人| 精品久久久久久久人人人人传媒| 奇米色777欧美一区二区| 欧美一区二区三区免费| 精彩视频一区二区| 国产亚洲一二三区| 91毛片在线观看| 亚洲精品视频一区二区| 色综合 综合色| 亚洲成在人线在线播放| 欧美成人video| 丁香婷婷综合激情五月色| 亚洲欧美福利一区二区| 欧美日韩一区二区欧美激情| 日韩av网站免费在线| 国产亚洲一区字幕| 欧美伊人久久久久久久久影院 | 亚洲精品在线观看视频| 国产精品一级在线| 一区二区欧美精品| 久久久亚洲精华液精华液精华液| www..com久久爱| 奇米影视在线99精品| 国产欧美一区二区三区网站| 色视频一区二区| 久久电影网电视剧免费观看| 一区二区中文视频| 精品国产一区二区三区忘忧草| 9i在线看片成人免费| 午夜欧美在线一二页| 欧美国产日韩一二三区| 欧美日韩一级二级三级| 福利视频网站一区二区三区| 亚洲一二三专区| 久久女同互慰一区二区三区| 欧美日韩一区视频| av不卡在线播放| 国内精品免费**视频| 一区二区三区久久| 中文一区二区完整视频在线观看| 欧美日韩视频一区二区| 99精品欧美一区| 国产在线日韩欧美| 视频一区欧美日韩| 一区二区三区国产| 国产精品国产精品国产专区不蜜| 欧美一区二区三区免费在线看 | 日韩美女视频一区| 久久久久久久久久久久久女国产乱| 色婷婷国产精品综合在线观看| 麻豆视频一区二区| 日本成人在线看| 亚洲国产你懂的| 亚洲天堂2016| 中文字幕在线不卡一区二区三区| 精品国产自在久精品国产| 91精品啪在线观看国产60岁| 色94色欧美sute亚洲线路一久| 成人精品视频.| 国产精品99久久久久久似苏梦涵 | 欧美三片在线视频观看| 91视频免费播放| 国产精品自在在线| 久久99热99| 久久99精品久久久久久| 美国毛片一区二区| 精品一区二区在线观看| 看电影不卡的网站| 精品一区二区影视| 久久99精品久久久久久国产越南 | 成人一级黄色片| 成人动漫在线一区| 97久久人人超碰| 91久久精品网| 欧美亚洲国产一区在线观看网站| av亚洲精华国产精华精| 99国产精品99久久久久久| 色婷婷精品久久二区二区蜜臂av| 色综合视频一区二区三区高清| 91小视频免费观看| 欧美特级限制片免费在线观看| 欧美日韩免费不卡视频一区二区三区| 欧美性受xxxx黑人xyx性爽| 精品视频在线视频| 91精品国产91久久综合桃花| 精品久久久三级丝袜| 国产日韩精品一区二区浪潮av| 国产精品久久久久久久久免费桃花| 国产色爱av资源综合区| 亚洲另类在线一区| 免费的成人av| 丁香一区二区三区| 欧美系列在线观看| 日韩欧美国产电影| 国产精品入口麻豆原神| 亚洲在线视频免费观看| 精品在线播放午夜| 91视频在线观看免费| 欧美一级理论性理论a| 中文一区二区完整视频在线观看| 一区二区视频在线看| 蜜臀久久久99精品久久久久久| 粉嫩嫩av羞羞动漫久久久| 91国产免费看| 久久久精品人体av艺术| ...xxx性欧美| 极品美女销魂一区二区三区| 风流少妇一区二区| 欧美日韩午夜影院| 国产精品传媒视频| 韩国精品在线观看| 欧美在线观看18| 中文字幕不卡在线| 狠狠色狠狠色综合日日91app| 日本韩国欧美三级| 国产精品污网站| 美女久久久精品| 欧美日韩成人激情|