【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-06-16 ae5b0a8c63979351028215b8fe8cdf4b0766c272
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
<%
'连接数据库
Set objConn = Server.CreateObject("ADODB.Connection")
'objConn.ConnectionString="Provider=SQLOLEDB.1;Password=1382929319;Persist Security Info=True;User ID=sa;Initial Catalog=CAME;Data Source=120.24.159.70;Connect Timeout=60"
objConn.ConnectionString="Provider=SQLOLEDB.1;Password=camesa;Persist Security Info=True;User ID=camesa;Initial Catalog=CAME;Data Source=120.25.98.119,1432;Connect Timeout=60"
objConn.Open
 
'防护XSS,sql注射,代码执行,文件包含等多种高危漏洞
if request.querystring<>"" then call stophacker(request.querystring,"'|<[^>]*?>|^\+/v(8|9)|\b(and|or)\b.+?(>|<|=|\bin\b|\blike\b)|/\*.+?\*/|<\s*script\b|\bEXEC\b|UNION.+?SELECT|UPDATE.+?SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE).+?FROM|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)")
if Request.ServerVariables("HTTP_REFERER")<>"" then call test(Request.ServerVariables("HTTP_REFERER"),"'|\b(and|or)\b.+?(>|<|=|\bin\b|\blike\b)|/\*.+?\*/|<\s*script\b|\bEXEC\b|UNION.+?SELECT|UPDATE.+?SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE).+?FROM|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)")
if request.Cookies<>"" then call stophacker(request.Cookies,"\b(and|or)\b.{1,6}?(=|>|<|\bin\b|\blike\b)|/\*.+?\*/|<\s*script\b|\bEXEC\b|UNION.+?SELECT|UPDATE.+?SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE).+?FROM|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)") 
'call stophacker(request.Form,"^\+/v(8|9)|\b(and|or)\b.{1,6}?(=|>|<|\bin\b|\blike\b)|/\*.+?\*/|<\s*script\b|<\s*img\b|\bEXEC\b|UNION.+?SELECT|UPDATE.+?SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE).+?FROM|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)")
 
 
SQL_injdata = "'| and |exec|insert|select|delete|update |count|chr|master|truncate|char|declare| or "
SQL_inj = split(SQL_Injdata,"|")
If Request.Form<>"" Then
    For Each Sql_Post In Request.Form
        For SQL_Data=0 To Ubound(SQL_inj)
            If instr(LCase(Request.Form(Sql_Post)),Sql_Inj(Sql_DATA))>0 Then
            'Response.Write Request.Form(Sql_Post)
            Response.Write("<div style='position:fixed;top:0px;width:100%;height:100%;background-color:white;color:green;font-weight:bold;border-bottom:5px solid #999;'><br>您的提交带有不合法参数1,谢谢合作!<br></div>")
            Response.end
            end if
        next
    next
end If
 
 
function test(values,re)
  dim regex
  set regex=new regexp
  regex.ignorecase = true
  regex.global = true
  regex.pattern = re
  if regex.test(values) then
                                IP=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
                                If IP = "" Then 
                                  IP=Request.ServerVariables("REMOTE_ADDR")
                                end if
                                'slog("<br><br>操作IP: "&ip&"<br>操作时间: " & now() & "<br>操作页面:"&Request.ServerVariables("URL")&"<br>提交方式: "&Request.ServerVariables("Request_Method")&"<br>提交参数: "&l_get&"<br>提交数据: "&l_get2)
    Response.Write("<div style='position:fixed;top:0px;width:100%;height:100%;background-color:white;color:green;font-weight:bold;border-bottom:5px solid #999;'><br>您的提交带有不合法参数2,谢谢合作!<br></div>")
    Response.end
   end if
   set regex = nothing
end function 
 
 
function stophacker(values,re)
 dim l_get, l_get2,n_get,regex,IP
 for each n_get in values
  for each l_get in values
   l_get2 = values(l_get)
   set regex = new regexp
   regex.ignorecase = true
   regex.global = true
   regex.pattern = re
   if regex.test(l_get2) then
                                IP=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
                                If IP = "" Then 
                                  IP=Request.ServerVariables("REMOTE_ADDR")
                                end if
                                'slog("<br><br>操作IP: "&ip&"<br>操作时间: " & now() & "<br>操作页面:"&Request.ServerVariables("URL")&"<br>提交方式: "&Request.ServerVariables("Request_Method")&"<br>提交参数: "&l_get&"<br>提交数据: "&l_get2)
    Response.Write("<div style='position:fixed;top:0px;width:100%;height:100%;background-color:white;color:green;font-weight:bold;border-bottom:5px solid #999;'><br>您的提交带有不合法参数3,谢谢合作!<br></div>")
    Response.end
   end if
   set regex = nothing
  next
 next
end function 
 
sub slog(logs)
        dim toppath,fs,Ts
        toppath = Server.Mappath("/log.txt")
                                Set fs = CreateObject("scripting.filesystemobject")
                                If Not Fs.FILEEXISTS(toppath) Then 
                                    Set Ts = fs.createtextfile(toppath, True)
                                    Ts.close
                                end if
                                    Set Ts= Fs.OpenTextFile(toppath,8)
                                    Ts.writeline (logs)
                                    Ts.Close
                                    Set Ts=nothing
                                    Set fs=nothing
end Sub
 
OperationRecord=""
UP_PicI=0
'验证字段
Function SafeRequest(ParaName)
    ParaValue=ParaName
    if not isnull(ParaValue) then
    ParaValue = trim(ParaValue)
    ParaValue = replace(ParaName,"'","''")
    ParaValue = replace(ParaValue,"""","&quot;")
    end if
    OperationRecord=OperationRecord&ParaValue&";"
    SafeRequest=ParaValue
End Function
 
PositionURL=Request.ServerVariables("URL")
 
'重复刷新禁止提示
If trim(Request("SystemMessageType"))="" then
session("SMT_URL")=""
End If
 
'还回按键链接
ReturnURLID=trim(Request("ReturnURLID"))
SystemMessageType=trim(Request("SystemMessageType"))
PositionURLID=session("PositionURLID")
if ReturnURLID<>"" then PositionURLID=ReturnURLID
if Request.ServerVariables("QUERY_STRING")<>"" then PositionURLS=PositionURL&"?"&Request.ServerVariables("QUERY_STRING")
if session("PositionURL"&PositionURLID)<>PositionURLS and ReturnURLID="" and SystemMessageType="" and PositionURL<>"/admin_save.gds" And left(PositionURL,8)<>"/weixin/" and PositionURL<>"/DispatchOrder_End.gds" and PositionURL<>"/DispatchOrder_DKP.gds" and PositionURL<>"/DispatchOrder.gds" and PositionURL<>"/ServiceOrder.gds" then
    if PositionURLID="" or PositionURLID>=10 then PositionURLID=0
    PositionURLID=PositionURLID+1
    session("PositionURL"&PositionURLID)=PositionURLS
    'Response.Write PositionURLID &"|"&PositionURL
end if
session("PositionURLID")=PositionURLID
 
'网站主域名
WEBURL="https://sys.966120.com.cn"
'员工照片网址
OAImgURL="https://api.966120.com.cn/OA_img/"
 
Function isDepartment(ModuleID)
  if InStr(admin_Power,","&ModuleID)>0 then
  isDepartment=1
  else
  isDepartment=0
  end if
End Function
 
'--------------------------OA操作记录---------------------begin
Function OA_Running(Running)
    OA_RunningOAid=session("adminID")
    If OA_RunningOAid="" Then OA_RunningOAid=Request.Cookies("CAME")("adminID")
    If OA_RunningOAid="" Then OA_RunningOAid=0
    If Running="" Then Running="未知操作"
    If Len(PositionURLS)>200 Then PositionURLS=Left(PositionURLS,200)
    If InStr(Running,":10")>1 Then
        Running_ID=Mid(Running,InStr(Running,":10")+1,10)
    ElseIf InStr(Running,":30")>1 Then
        Running_ID=Mid(Running,InStr(Running,":30")+1,10)
    End If
    sql="Insert into OA_Running (OAid,OA_IP,Running,Running_URL,Running_ID) values ("&OA_RunningOAid&",'"&Request.ServerVariables("REMOTE_ADDR")&"','"&Running&"','"&PositionURLS&"','"&Running_ID&"')"
    objConn.Execute sql
End Function 
'--------------------------OA操作记录---------------------end
 
'--------------------------合作操作校验---------------------begin
'session("adminID")
'--------------------------合作操作校验---------------------end
%>