Thread Script nicht ohne Admin-Rechte starten (5 answers)
Opened by Gast at 2007-07-09 19:10

RPerl
 2007-07-12 15:40
#78321 #78321
User since
2006-11-26
384 Artikel
BenutzerIn

user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl

use strict;
use warnings;

my $id = '^uid=0';
my $testid = qx{/usr/bin/id};

if ( $testid !~ /$id/ ) {
    print "[-] access denied!";
       exit;
} else {
    print "[+] startin\' script";
    #&foo();
}


quick && dirty

View full thread Script nicht ohne Admin-Rechte starten