summaryrefslogtreecommitdiff
path: root/other/ssharp/sharpterms.pl
blob: 8dccac5f98ded409c50803c1041db3959357e105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

# xterm popup daemon for ssharp (C) 2002 Stealth

my %xterms = ();

for (;;) {
	opendir D, "/tmp" or die "$!";
	my @allfiles = readdir D;
	closedir D;
	@allfiles = grep /ssharp-/, @allfiles;

	foreach (@allfiles) {
		next if defined $xterms{$_};
		$xterms{$_} = 1;
		# TAKE CARE: this is a security vulnerability (locally)
		system("xterm -T $_ -e /usr/local/bin/mss-client /tmp/$_ &");
		sleep(1);
	}
}