|< 1 2 >| | 18 Einträge, 2 Seiten |
1
2
3
4
my $output = `who`;
my ($ip) = $output =~ /^.*?(\d+\.\d+\.\d+\.\d+)$/gis;
my $ping = `ping -a $ip`;
print $ping;
[E|B,11.08.2004, 18:59]HiHo!
Code: (dl )1
2
3
4my $output = `who`;
my ($ip) = $output =~ /^.*?(\d+\.\d+\.\d+\.\d+)$/gis;
my $ping = `ping -a $ip`;
print $ping;
Quick 'n dirty 'n untested. 8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
#
use IO::Socket;
my $sock = IO::Socket::INET->new(qq(127.0.0.1:1234));
my $ci = 4;
my $player = "Devel";
my $user = 1; #<---- Der Wert ist ist diesem Beispiel festgelegt.
{
print $sock qq(sel 12345\n);
print $sock qq(slogin superadmin abcde\n);
print $sock qq(fp $player\n); #<---(1)
print $sock qq(mptc $ci $user\n);
print $sock qq(msgu $user @ --[ Hallo Welt ]---\n);
print "Programm Ende\nquit)";
}
1
2
3
4
5
6
7
8
9
$sock->recv($text,128)
my @lines = split /\n/, $text;
while ($lines[0] !~ /^p_id/)
{ shift(@lines) }
my $p_id = (split /\s+/, $lines[1])[0];
print $sock "kick $p_id\n";
my $p_id = (split /\s+/, $lines[1])[0];
|< 1 2 >| | 18 Einträge, 2 Seiten |