ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- PKx])| Hostname.pmnu[package Sys::Hostname; use strict; use Carp; require Exporter; our @ISA = qw/ Exporter /; our @EXPORT = qw/ hostname /; our $VERSION; our $host; BEGIN { $VERSION = '1.20'; { local $SIG{__DIE__}; eval { require XSLoader; XSLoader::load(); }; warn $@ if $@; } } sub hostname { # method 1 - we already know it return $host if defined $host; # method 1' - try to ask the system $host = ghname() if defined &ghname; return $host if defined $host; if ($^O eq 'VMS') { # method 2 - no sockets ==> return DECnet node name eval { local $SIG{__DIE__}; $host = (gethostbyname('me'))[0] }; if ($@) { return $host = $ENV{'SYS$NODE'}; } # method 3 - has someone else done the job already? It's common for the # TCP/IP stack to advertise the hostname via a logical name. (Are # there any other logicals which TCP/IP stacks use for the host name?) $host = $ENV{'ARPANET_HOST_NAME'} || $ENV{'INTERNET_HOST_NAME'} || $ENV{'MULTINET_HOST_NAME'} || $ENV{'UCX$INET_HOST'} || $ENV{'TCPWARE_DOMAINNAME'} || $ENV{'NEWS_ADDRESS'}; return $host if $host; # method 4 - does hostname happen to work? my($rslt) = `hostname`; if ($rslt !~ /IVVERB/) { ($host) = $rslt =~ /^(\S+)/; } return $host if $host; # rats! $host = ''; croak "Cannot get host name of local machine"; } elsif ($^O eq 'MSWin32') { ($host) = gethostbyname('localhost'); chomp($host = `hostname 2> NUL`) unless defined $host; return $host; } else { # Unix # is anyone going to make it here? local $ENV{PATH} = '/usr/bin:/bin:/usr/sbin:/sbin'; # Paranoia. # method 2 - syscall is preferred since it avoids tainting problems # XXX: is it such a good idea to return hostname untainted? eval { local $SIG{__DIE__}; require "syscall.ph"; $host = "\0" x 65; ## preload scalar syscall(&SYS_gethostname, $host, 65) == 0; } # method 2a - syscall using systeminfo instead of gethostname # -- needed on systems like Solaris || eval { local $SIG{__DIE__}; require "sys/syscall.ph"; require "sys/systeminfo.ph"; $host = "\0" x 65; ## preload scalar syscall(&SYS_systeminfo, &SI_HOSTNAME, $host, 65) != -1; } # method 3 - trusty old hostname command || eval { local $SIG{__DIE__}; local $SIG{CHLD}; $host = `(hostname) 2>/dev/null`; # BSDish } # method 4 - use POSIX::uname(), which strictly can't be expected to be # correct || eval { local $SIG{__DIE__}; require POSIX; $host = (POSIX::uname())[1]; } # method 5 - sysV uname command (may truncate) || eval { local $SIG{__DIE__}; $host = `uname -n 2>/dev/null`; ## sysVish } # bummer || croak "Cannot get host name of local machine"; # remove garbage $host =~ tr/\0\r\n//d; $host; } } 1; __END__ =head1 NAME Sys::Hostname - Try every conceivable way to get hostname =head1 SYNOPSIS use Sys::Hostname; $host = hostname; =head1 DESCRIPTION Attempts several methods of getting the system hostname and then caches the result. It tries the first available of the C library's gethostname(), C<`$Config{aphostname}`>, uname(2), C, C<`hostname`>, C<`uname -n`>, and the file F. If all that fails it Cs. All NULs, returns, and newlines are removed from the result. =head1 AUTHOR David Sundstrom EFE Texas Instruments XS code added by Greg Bacon EFE =cut PK#] 6DHostname/Hostname.sonuȯELF> @@8 @ ` ` `  x x x 888$$p p p Stdp p p Ptdx x x ,,QtdRtd` ` ` GNU29Ǘ%'b%5A@0BE|qX$  q~e, F") < 0  Y__gmon_start___ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalizelibpthread.so.0gethostnamePerl_newSVpvPerl_sv_2mortalPerl_stack_grow__stack_chk_failPerl_croak_xs_usageboot_Sys__HostnamePerl_xs_handshakePerl_newXS_deffilePerl_xs_boot_epiloglibperl.so.5.26libc.so.6_edata__bss_start_endGLIBC_2.2.5GLIBC_2.4ui Aii M`  h p p p                     HHI HtH5 % hhhhhhhhqhah Q%% D% D% D%  D% D% D% D% D% D% DH= H H9tH Ht H= H5 H)HHH?HHtH HtfD= u+UH=r Ht H= Yd] ]wAVAUATUSHHPH/dH%(HD$H1HGxHHPHWxHcHGHH)HHHG IH)HI@L1LHA[At5HHHfHEH+HD$HdH3%(uOHP[]A\A]A^fHCAH8McJHCJHDHHHeHH5ff.UHLZ1SH UHHS HHH5FHHH[]GHH1.20v5.26.0Hostname.cSys::Hostname::ghname;,8HpHhzRx $FJ w?:*3$"Dp@\FBB A(A0G 0A(A BBBC $YEMZ aFAGNU p p U  < ` h o`H W x  ooooox  0@PGA$3a1I GA$3p1113 9 GA*GA$annobin gcc 8.5.0 20210514GA$plugin name: gcc-annobinGA$running gcc 8.5.0 20210514GA*GA*GA! GA*FORTIFYGA+GLIBCXX_ASSERTIONS GA*GOW*GA*cf_protectionGA+omit_frame_pointerGA+stack_clashGA!stack_realign GA*FORTIFY GA+GLIBCXX_ASSERTIONSHostname.so-5.26.3-423.el8_10.x86_64.debugձ7zXZִF!t/ ]?Eh=ڊ2Ns\ٕwIZ:@oz }YOmuא{7ğ-[_9C<AC{x̺bhR-G(ZPy$OyswfRji"KPue]6z:q^ {Gxx&C]`7"f3+(2 1nrF.li|2-kx(!p[~I`?ۚc|W$c 2~Fc4F˝/2_44pCirEvZTSyt)5Nx35G9eUqca0f ʣj-%>7g eovsRF4ݖ$cCa VhG̱+52UrE~ s_i j~ALJ럜kܖlm6)݅"P봺'p;ڎFT ,m3 UPXŘTVEǕ44þ;1f-x~A‡\i?-/){,'So+Q6H~2_= C DXϝȯҕ\e^Cz95Y@V6*gYZ.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.plt.sec.text.fini.rodata.eh_frame_hdr.eh_frame.note.gnu.property.init_array.fini_array.data.rel.ro.dynamic.got.bss.gnu.build.attributes.gnu_debuglink.gnu_debugdata 88$o``4( 0HHW8o$Eo0T^Bhcn``w 9}< < 2I I .x x , p p ` ` h h p p x x x x `HH0xP"PKx])| Hostname.pmnu[PK#] 6D.Hostname/Hostname.sonuȯPKb,