Moje wypociny...
Kod:
#!/usr/bin/perl
use strict;
use Net::hostent;
use Socket;
use LWP::Simple;
my $max = $ARGV[0]; #URL !
my $host = $ARGV[1]; #HOST !
print q{
---------------------------------------------------------------------
www info :]
By Hardiel
gr33tz: hack.pl irc.indoirc.net
---------------------------------------------------------------------
};
print "URL: $ARGV[0] HOST: $ARGV[1]\r\n";
my $content = get $max;
die "Couldn't get $max" unless defined $content;
if($content =~ m/.*meta name="author" content="(.*)".*/i) {
print "\nAuthor: $1\n";} else {print "\nAuthor: Brak danych :]\n";}
if($content =~ m/.*meta name="Language" content="(.*)".*/i) {
print "\nLanguage: $1\n";} else {print "\nLanguage: Brak danych :]\n";}
if($content =~ m/.*meta name="Keywords" content="(.*)".*/i) {
print "\nKeywords: $1\n";} else {print "\nKeywords: Brak danych :]\n";}
if($content =~ m/.*meta name="Description" content="(.*)".*/i) {
print "\nDescription: $1\n";} else {print "\nDescription: Brak danych :]\n";}
if($content =~ m/.*meta name="copyright" content="(.*)".*/i) {
print "\nCopyright: $1\n";} else {print "\nCopyright: Brak danych :]\n";}
if($content =~ m/.*meta http-equiv="Content-Type".*content="(.*)".*/i) {
print "\nContent-Type: $1\n";} else {print "\nContent-Type: Brak danych :]\n";}
if($content =~ m/.*title>(.*)<.*title.*/i) {
print "\nTitle: $1\n";} else {print "\nTitle: Brak danych :]\n";}
if($content =~ m/.*rel="stylesheet" type=".*" href="(.*)".*/i) {
my $css1 = $1;my $bolek="$max/$css1";print "\nCSS1: $bolek\n";} else {print "\nCSS1: Brak danych :]\n";}
if($content =~ m/.*link href="(.*)" .*/i) {
my $css2 = $1;my $lolek="$max/$css2";print "\nCSS2: $lolek\n";} else {print "\nCSS2: Brak danych :]\n";}
my $obj=gethost($host); print "\noficjalna nazwa: ".$obj->name."\n";
print "\ntyp adresu: ".$obj->addrtype."\n"; print "\nwielkosc adresu: ".$obj->length."\n";
print "\nzastepcze nazwy:\n"; print "\n- $_\n" for @{$obj->aliases};
print "\nlista adresow: ",join ',',inet_ntoa(@{$obj->addr_list}),"\n";
Czekam na opinie Pozdrawiam