Leser: 1
7 Einträge, 1 Seite |
1
2
3
use Sys::Hostname;
my $hostname = hostname;
print "---------- $hostname ----------\n";
1
2
3
4
5
6
7
8
use Win32::IPConfig;
my $host = shift || Win32::NodeName;
my $ipconfig = Win32::IPConfig->new($host)
or die "Unable to connect to $host\n";
my $hostname = $ipconfig->get_hostname;
my $address = $ipconfig->get_domain;
my $host_add = ($hostname . '.' . $address);
print "$host_add\n";
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
use Win32::TieRegistry (Delimiter=> "/");
my $Hostname = $Registry->{"HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/Hostname"};
print "\n$Hostname\n";
print "---------------------------------------\n\n";
#Dhcp Domain Name auslesen
my $Domain = $Registry->{"HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/DhcpDomain"};
print "\n$Domain\n";
print "---------------------------------------\n\n";
my $Host_Domain_Name = "$Hostname.$Domain";
print "\n$Host_Domain_Name\n";
print "---------------------------------------\n\n";
QuoteUse of uninitialized value in gethostbyaddr at D:\DOKUME~1\FE~1.MAR\LO
<Hostname.Domainname>24 Drücken Sie eine beliebige Taste . . .
7 Einträge, 1 Seite |