Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AD-Control-Golang
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶腾飞
AD-Control-Golang
Commits
aa2ef175
You need to sign in or sign up before continuing.
Commit
aa2ef175
authored
Nov 17, 2023
by
陶腾飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v2.6.7
parent
a44fe036
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
15 deletions
+31
-15
README.MD
+1
-0
public/dept.go
+4
-0
public/env.go
+4
-4
public/msg_deal.go
+21
-11
public/user.go
+1
-0
No files found.
README.MD
View file @
aa2ef175
...
@@ -113,6 +113,7 @@
...
@@ -113,6 +113,7 @@
-
2022/07-31 v2.6.4 为支持windows激活添加功能
-
2022/07-31 v2.6.4 为支持windows激活添加功能
-
2022/07-31 v2.6.5 小工具支持批量执行命令
-
2022/07-31 v2.6.5 小工具支持批量执行命令
-
2022/08-18 v2.6.6 adct在开机时判断用户超时登录
-
2022/08-18 v2.6.6 adct在开机时判断用户超时登录
-
2023/11-17 v2.6.7 数据盘盘符更新,重启消息发送失败问题修复
## 四、其他说明
## 四、其他说明
...
...
public/dept.go
View file @
aa2ef175
...
@@ -28,6 +28,7 @@ const Dept_zw_qbbm_js_string = "技术"
...
@@ -28,6 +28,7 @@ const Dept_zw_qbbm_js_string = "技术"
const
Dept_zw_qbbm_jd_string
=
"京东"
const
Dept_zw_qbbm_jd_string
=
"京东"
const
Dept_zw_qbbm_hw_string
=
"华为"
const
Dept_zw_qbbm_hw_string
=
"华为"
const
Dept_zw_qbbm_dy_string
=
"抖音"
const
Dept_zw_qbbm_dy_string
=
"抖音"
const
Dept_zw_qbbm_bd_string
=
"百度"
const
Dept_zw_qbbm_bgyj_string
=
"报告研究中心"
const
Dept_zw_qbbm_bgyj_string
=
"报告研究中心"
const
Dept_zw_qbbm_xmglwyh_string
=
"项目管理委员会"
const
Dept_zw_qbbm_xmglwyh_string
=
"项目管理委员会"
const
Dept_zw_zztd
=
"郑州团队"
const
Dept_zw_zztd
=
"郑州团队"
...
@@ -51,6 +52,7 @@ var Dept_zw_qbbm_map map[string]string = map[string]string{
...
@@ -51,6 +52,7 @@ var Dept_zw_qbbm_map map[string]string = map[string]string{
"克洛里斯Chloris(字)"
:
Dept_zw_qbbm_zj_string
,
"克洛里斯Chloris(字)"
:
Dept_zw_qbbm_zj_string
,
"美杜莎Medusa(滴)"
:
Dept_zw_qbbm_dd_string
,
"美杜莎Medusa(滴)"
:
Dept_zw_qbbm_dd_string
,
"普罗米修斯Prometheus"
:
Dept_zw_qbbm_dy_string
,
"普罗米修斯Prometheus"
:
Dept_zw_qbbm_dy_string
,
"赫贝尔Hebe(度)"
:
Dept_zw_qbbm_bd_string
,
"雅典娜Athena(巨)"
:
Dept_zw_qbbm_jl_string
,
"雅典娜Athena(巨)"
:
Dept_zw_qbbm_jl_string
,
"赫斯提亚Hestia(研)"
:
Dept_zw_qbbm_bgyj_string
,
"赫斯提亚Hestia(研)"
:
Dept_zw_qbbm_bgyj_string
,
"宙斯Zeus"
:
Dept_zw_jishu
,
"宙斯Zeus"
:
Dept_zw_jishu
,
...
@@ -96,6 +98,8 @@ func GetPostationFromHostname(hostname string) (string, error) {
...
@@ -96,6 +98,8 @@ func GetPostationFromHostname(hostname string) (string, error) {
return
Cmdb_Position_7
,
nil
return
Cmdb_Position_7
,
nil
case
HOST_Dept_DY
:
case
HOST_Dept_DY
:
return
Cmdb_Position_7
,
nil
return
Cmdb_Position_7
,
nil
case
HOST_Dept_BD
:
return
Cmdb_Position_7
,
nil
default
:
default
:
return
""
,
fmt
.
Errorf
(
"%s 不是预定的情报部门的格式"
,
hostname
)
return
""
,
fmt
.
Errorf
(
"%s 不是预定的情报部门的格式"
,
hostname
)
}
}
...
...
public/env.go
View file @
aa2ef175
...
@@ -14,7 +14,7 @@ const SymbolDH = "、"
...
@@ -14,7 +14,7 @@ const SymbolDH = "、"
// AD-Control //
// AD-Control //
const
Version
string
=
"2.6.
6
"
const
Version
string
=
"2.6.
7
"
const
Host_adserver_lan
string
=
"192.168.0.20"
const
Host_adserver_lan
string
=
"192.168.0.20"
const
Host_adserver_wan
string
=
"115.231.214.234"
const
Host_adserver_wan
string
=
"115.231.214.234"
const
Host_adserver
string
=
"ADSERVER"
const
Host_adserver
string
=
"ADSERVER"
...
@@ -59,9 +59,9 @@ const SMB_ADSoftPlus string = SMB_ADSoft + `plus\`
...
@@ -59,9 +59,9 @@ const SMB_ADSoftPlus string = SMB_ADSoft + `plus\`
var
Dir_tmp
string
=
GetEnv
(
"tmp"
)
var
Dir_tmp
string
=
GetEnv
(
"tmp"
)
const
Dir_softlike
string
=
`
H
:\software\softlike\`
const
Dir_softlike
string
=
`
D
:\software\softlike\`
const
Dir_application
string
=
`
H
:\software\application\`
const
Dir_application
string
=
`
D
:\software\application\`
const
Dir_otherFile
string
=
`
H
:\file\`
const
Dir_otherFile
string
=
`
D
:\file\`
// application //
// application //
const
App_MultiSplit
string
=
SMB_ADSoftOthTool
+
"win_MultiSplit.exe"
const
App_MultiSplit
string
=
SMB_ADSoftOthTool
+
"win_MultiSplit.exe"
...
...
public/msg_deal.go
View file @
aa2ef175
...
@@ -146,6 +146,9 @@ func (rep *MJreport) MsgDeal() interface{} {
...
@@ -146,6 +146,9 @@ func (rep *MJreport) MsgDeal() interface{} {
}
}
case
Msg_Report_TimeOutTurnOffPC
:
case
Msg_Report_TimeOutTurnOffPC
:
LOG
(
INFO
,
rep
.
Instruction
,
rep
.
Computername
+
" 超时关机"
)
LOG
(
INFO
,
rep
.
Instruction
,
rep
.
Computername
+
" 超时关机"
)
if
err
:=
SendWXWrokTextToChatAccountManager
(
rep
.
Computername
+
" 超时关机"
);
err
!=
nil
{
LOG
(
ERROR
,
rep
.
Instruction
,
err
.
Error
())
}
case
Msg_Report_WillTurnOnPC
:
case
Msg_Report_WillTurnOnPC
:
switch
rep
.
Status
{
switch
rep
.
Status
{
...
@@ -341,7 +344,7 @@ func (rep *MJreport) MsgDeal() interface{} {
...
@@ -341,7 +344,7 @@ func (rep *MJreport) MsgDeal() interface{} {
case
Msg_Report_GetSoftlike
:
case
Msg_Report_GetSoftlike
:
switch
rep
.
Status
{
switch
rep
.
Status
{
case
Msg_status_commit
:
case
Msg_status_commit
:
f
,
err
:=
GetFolderInFileName
(
`
H
:\software\softlike\`
)
f
,
err
:=
GetFolderInFileName
(
`
D
:\software\softlike\`
)
if
err
!=
nil
{
if
err
!=
nil
{
LOG
(
ERROR
,
rep
.
Instruction
,
err
)
LOG
(
ERROR
,
rep
.
Instruction
,
err
)
}
}
...
@@ -713,24 +716,31 @@ func (wxwork *MJwxwork) MsgDealSend() {
...
@@ -713,24 +716,31 @@ func (wxwork *MJwxwork) MsgDealSend() {
}
}
LOG
(
INFO
,
wxwork
.
Instruction
,
fmt
.
Sprintf
(
"host:%s,name:%s"
,
pc
,
wxwork
.
Name
))
LOG
(
INFO
,
wxwork
.
Instruction
,
fmt
.
Sprintf
(
"host:%s,name:%s"
,
pc
,
wxwork
.
Name
))
if
err
:=
RestartRemotePCForNow
(
pc
);
err
!=
nil
{
LOG
(
ERROR
,
wxwork
.
Instruction
,
err
)
wxwork
.
SendText
(
Error_WXWork_Fail_ReTry
)
return
}
Delay
(
10
)
go
func
(
name
,
userid
string
)
{
go
func
(
name
,
userid
string
)
{
for
i
:=
0
;
i
<
60
;
i
++
{
s
,
_
:=
PSTest_Connection
(
pc
)
if
!
s
{
break
}
Delay
(
1
)
}
for
i
:=
0
;
i
<
20
;
i
++
{
for
i
:=
0
;
i
<
20
;
i
++
{
s
tatus
,
_
:=
PSTest_Connection
(
pc
)
s
,
_
:=
PSTest_Connection
(
pc
)
if
!
statu
s
{
if
s
{
wxwork
.
SendText
(
"重启已完成~"
)
wxwork
.
SendText
(
"重启已完成~"
)
return
return
}
}
Delay
(
10
)
Delay
(
10
)
}
}
}(
wxwork
.
Name
,
wxwork
.
UserID
)
}(
wxwork
.
Name
,
wxwork
.
UserID
)
if
err
:=
RestartRemotePCForNow
(
pc
);
err
!=
nil
{
LOG
(
ERROR
,
wxwork
.
Instruction
,
err
)
wxwork
.
SendText
(
Error_WXWork_Fail_ReTry
)
return
}
wxwork
.
Result
=
"开始重启,请等待~"
wxwork
.
Result
=
"开始重启,请等待~"
// 电源管理 芝麻关机
// 电源管理 芝麻关机
...
...
public/user.go
View file @
aa2ef175
...
@@ -23,6 +23,7 @@ const HOST_Dept_BGYJ string = "BGYJ"
...
@@ -23,6 +23,7 @@ const HOST_Dept_BGYJ string = "BGYJ"
const
HOST_Dept_HW
string
=
"HW"
const
HOST_Dept_HW
string
=
"HW"
const
HOST_Dept_JD
string
=
"JD"
const
HOST_Dept_JD
string
=
"JD"
const
HOST_Dept_DY
string
=
"DY"
const
HOST_Dept_DY
string
=
"DY"
const
HOST_Dept_BD
string
=
"BD"
// os
// os
const
(
const
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment