3
3
// @File : phpruncode.aardio
4
4
// @Comment : PHP代码调试助手 (≡^∇^≡)
5
5
6
+ /*
7
+ 2022年5月2日23:13:47 修改编辑器为microsoft/monaco-editor
8
+ */
9
+
6
10
import win.ui;
7
11
/*DSG{{*/
8
- var winform = win.form(text='PHP代码调试助手 (\u2261^\u2207^\u2261)';right=759 ;bottom=469 )
12
+ var winform = win.form(text='PHP代码调试助手 (\u2261^\u2207^\u2261)';right=863 ;bottom=615 )
9
13
winform.add(
10
- button={cls="button";text="运行代码";left=632;top=0;right=760;bottom=40;z=2};
11
- button2={cls="button";text="清空日志";left=632;top=40;right=760;bottom=80;z=4};
12
- edit={cls="edit";left=0;top=0;right=632;bottom=304;autohscroll=false;edge=1;font=LOGFONT(h=-16;name='Consolas');multiline=1;vscroll=1;z=1};
13
- edit2={cls="edit";left=0;top=304;right=760;bottom=472;edge=1;font=LOGFONT(h=-13);multiline=1;z=3}
14
+ button={cls="button";text="运行代码";left=736;top=0;right=864;bottom=40;z=1};
15
+ button2={cls="button";text="清空日志";left=736;top=40;right=864;bottom=80;z=3};
16
+ button3={cls="button";text="关于";left=736;top=120;right=864;bottom=160;z=4};
17
+ button4={cls="button";text="刷新";left=736;top=80;right=864;bottom=120;z=6};
18
+ custom={cls="custom";text="自定义控件";left=0;top=0;right=736;bottom=456;z=5};
19
+ edit2={cls="edit";left=0;top=456;right=864;bottom=616;edge=1;multiline=1;z=2}
14
20
)
15
21
/*}}*/
16
22
17
23
import php;
18
24
import console;
25
+ import web.view;
26
+ import wsock.tcp.simpleHttpServer;
27
+
28
+ theView = web.view(winform.custom, ," --disable-site-isolation-trials --disable-web-security");
29
+ var url = wsock.tcp.simpleHttpServer.startUrl("\web\index.html");
30
+
31
+ theView.go(url);
19
32
20
33
winform.Logd = function(...){
21
34
import debug;
@@ -36,7 +49,12 @@ winform.Logd = function(...){
36
49
}
37
50
38
51
winform.button.oncommand = function(id,event){
39
- var code = winform.edit.text;
52
+
53
+ //var code = winform.edit.text;
54
+ var code = theView.xcall("window.editorGetText");
55
+
56
+ //console.log(code);
57
+
40
58
if(code and #code > 0) {
41
59
winform.code = code;
42
60
thread.invoke(
@@ -70,7 +88,9 @@ winform.button2.oncommand = function(id,event){
70
88
winform.edit2.text = "";
71
89
}
72
90
73
- winform.edit.text = /***
91
+ //winform.edit.text =
92
+ /***
93
+ // 对象序列化
74
94
class test{
75
95
private $flag = "flag{this-is-flag}";
76
96
public $a = "snail";
@@ -80,7 +100,26 @@ class test{
80
100
$test = new test; //建立一个test的对象;
81
101
$data = serialize($test); //将对象进行序列化;
82
102
echo $data;
103
+
104
+ // MD5利用
105
+ $_GET['name'] = "QNKCDZO";
106
+ $_GET['password'] = "240610708";
107
+ echo $_GET['name'] != $_GET['password'];
108
+ echo MD5($_GET['name']) == MD5($_GET['password']);
109
+
83
110
***/
84
111
112
+ winform.button3.oncommand = function(id,event){
113
+ winform.Logd("这是一个可以离线运行PHP代码的工具 可以用作ctf web的调试工具");
114
+ winform.Logd("Github: https://github.com/sfantree/php.porttable.debug");
115
+ winform.Logd("Contact Me: popy32 Email: 74o5o27o8#qq.com");
116
+ }
117
+
118
+ winform.button4.oncommand = function(id,event){
119
+ theView.go(url);
120
+ }
121
+
122
+
123
+
85
124
winform.show();
86
125
win.loopMessage();
0 commit comments