10-01-2017, 05:14 PM
|
#3
|
|
• الانـتـسـاب » Jan 2017
|
• رقـم العـضـويـة » 131869
|
• المشـــاركـات » 99
|
• الـدولـة »
|
• الـهـوايـة »
|
• اسـم الـسـيـرفـر » No Server
|
• الـجـنـس » Male
|
• نقـاط التقييم » 10
|
|
|
رد: مشكله dc لسا موجوده :(
هجرب وارود على حضرتك
واستفسار معلشى
اعدل هنا ايه غير ip
كود PHP:
<!-- #include file = "DBConnect.asp" -->
<!-- #include file = "Function.asp" -->
<!-- #include file = "Class_MD5.asp" -->
<%
On Error Resume Next
' Error
If Err.Number <> 0 Then
Response.Write "-1"
Response.End
End If
'''''''''' Check ACL only Call from Billing Server
Dim IP
Dim BillingServer
BillingServer = "10.0.1.42"
IP = Request.ServerVariables("REMOTE_ADDR")
'If(IP <> BillingServer) Then
' Response.Write "ACCESSDENY"
' Response.End
'End If
''''''''''
Dim sdSQL
Dim sdRS
Dim ReturnValue
sdSQL = "SET NOCOUNT ON EXEC CGI.CGI_WebGetTotalSilk "
'Response.Write sdSQL
'Response.End
Set sdRS = DBConnA.Execute(sdSQL)
ReturnValue = sdRS(0)
sdRS.Close
Set sdRS = Nothing
DBConnA.Close
Set DBConnA = Nothing
' Error
If Err.Number <> 0 Then
Response.Write "-1"
Response.End
End If
Response.Write ReturnValue
Response.End
%>
وهنا
كود PHP:
<!-- #include file = "DBConnect.asp" -->
<!-- #include file = "Function.asp" -->
<!-- #include file = "Class_MD5.asp" -->
<%
On Error Resume Next
' Error
If Err.Number <> 0 Then
Response.Write "-1"
Response.End
End If
'''''''''' Req
Dim UserJID
Dim Silk_Offset_Own
Dim Silk_Offset_Gift
Dim Mileage_Offset
Dim ShardID
Dim CharID
Dim ItemID
Dim IP
Dim Valid_Key
UserJID = Trim(Request("JID"))
Silk_Offset_Own = Trim(Request("so"))
Silk_Offset_Gift = Trim(Request("sg"))
Mileage_Offset = Trim(Request("sp"))
ShardID = Trim(Request("sid"))
CharID = Trim(Request("cid"))
ItemID = Trim(Request("iid"))
IP = Trim(Request("ip"))
Valid_Key = Trim(Request("vk"))
UserJID = FilterReqXSS(UserJID)
Silk_Offset_Own = FilterReqXSS(Silk_Offset_Own)
Silk_Offset_Gift = FilterReqXSS(Silk_Offset_Gift)
Mileage_Offset = FilterReqXSS(Mileage_Offset)
ShardID = FilterReqXSS(ShardID)
CharID = FilterReqXSS(CharID)
ItemID = FilterReqXSS(ItemID)
IP = FilterReqXSS(IP)
Valid_Key = FilterReqXSS(Valid_Key)
' Error - Parameter
Dim ParaResult
ParaResult = 1
If Valid_Key = "" OR IsNull(Valid_Key) OR IsEmpty(Valid_Key) Then
ParaResult = -10
End If
If IP = "" OR IsNull(IP) OR IsEmpty(IP) Then
ParaResult = -9
End If
If ItemID = "" OR IsNull(ItemID) OR IsEmpty(ItemID) Then
ParaResult = -8
End If
If CharID = "" OR IsNull(CharID) OR IsEmpty(CharID) Then
ParaResult = -7
End If
If ShardID = "" OR IsNull(ShardID) OR IsEmpty(ShardID) Then
ParaResult = -6
End If
If Mileage_Offset = "" OR IsNull(Mileage_Offset) OR IsEmpty(Mileage_Offset) Then
ParaResult = -5
End If
If Silk_Offset_Gift = "" OR IsNull(Silk_Offset_Gift) OR IsEmpty(Silk_Offset_Gift) Then
ParaResult = -4
End If
If Silk_Offset_Own = "" OR IsNull(Silk_Offset_Own) OR IsEmpty(Silk_Offset_Own) Then
ParaResult = -3
End If
If UserJID = "" OR IsNull(UserJID) OR IsEmpty(UserJID) Then
ParaResult = -2
End If
If ParaResult <> 1 Then
DBConnA.Close
Set DBConnA = Nothing
Response.Write ParaResult
Response.End
End If
''''''''''
Dim KeyString
Dim objMD5
Dim Confirm_Valid_Key
KeyString = "SROG8Z_CDE1210598DK_AKD3HW1K04DL2-"
Set objMD5 = New MD5
objMD5.Text = UserJID & "." & Silk_Offset_Own & "." & Silk_Offset_Gift & "." & Mileage_Offset & "." & ShardID & "." & CharID & "." & ItemID & "." & IP & "." & KeyString
Confirm_Valid_Key = objMD5.HEXMD5
' Error
If Err.Number <> 0 Then
DBConnA.Close
Set DBConnA = Nothing
Response.Write "-11"
Response.End
End If
If Trim(Valid_Key) <> Trim(Confirm_Valid_Key) Then
DBConnA.Close
Set DBConnA = Nothing
Response.Write "-12"
Response.End
End If
''''''''''
Dim sdSQL
Dim sdRS
Dim ReturnValue
sdSQL = "DEClARE @ReturnValue int "
sdSQL = sdSQL & "DECLARE @Silk_Offset_Own int "
sdSQL = sdSQL & "DEClARE @Silk_Offset_Gift int "
sdSQL = sdSQL & "DECLARE @Mileage_Offset int "
sdSQL = sdSQL & "DECLARE @ShardID int "
sdSQL = sdSQL & "DECLARE @CharID int "
sdSQL = sdSQL & "DECLARE @ItemID int "
sdSQL = sdSQL & "DECLARE @IP int "
sdSQL = sdSQL & "SET @Silk_Offset_Own = "& Silk_Offset_Own &" "
sdSQL = sdSQL & "SET @Silk_Offset_Gift = "& Silk_Offset_Gift &" "
sdSQL = sdSQL & "SET @Mileage_Offset = "& Mileage_Offset &" "
sdSQL = sdSQL & "SET @ShardID = "& ShardID &" "
sdSQL = sdSQL & "SET @CharID = "& CharID &" "
sdSQL = sdSQL & "SET @ItemID = "& ItemID &" "
sdSQL = sdSQL & "SET @IP = "& IP &" "
sdSQL = sdSQL & "EXEC @ReturnValue = _ConsumeSilkByGameServer2 "& UserJID &", @Silk_Offset_Own OUTPUT, @Silk_Offset_Gift OUTPUT, @Mileage_Offset OUTPUT, @ShardID, @CharID, @ItemID, @IP "
sdSQL = sdSQL & "SELECT @ReturnValue, @Silk_Offset_Own, @Silk_Offset_Gift, @Mileage_Offset "
Set sdRS = DBConnA.Execute(sdSQL)
ReturnValue = sdRS(0)
Silk_Offset_Own = sdRS(1)
Silk_Offset_Gift = sdRS(2)
Mileage_Offset = sdRS(3)
sdRS.Close
Set sdRS = Nothing
DBConnA.Close
Set DBConnA = Nothing
' Error
If Err.Number <> 0 Then
Response.Write "-13"
Response.End
End If
' return
If Cint(ReturnValue) = 1 Then
Response.Write "1:"& Silk_Offset_Own &","& Silk_Offset_Gift &","& Mileage_Offset
Else
Response.Write "-14:"& ReturnValue
End If
Response.End
%>
كود PHP:
<!-- #include file = "DBConnect.asp" -->
<!-- #include file = "Function.asp" -->
<!-- #include file = "Class_MD5.asp" -->
<%
On Error Resume Next
' Error
If Err.Number <> 0 Then
Response.Write "-1"
Response.End
End If
'''''''''' Check ACL only Call from Billing Server
Dim IP
Dim BillingServer
BillingServer = "10.0.1.42"
IP = Request.ServerVariables("REMOTE_ADDR")
If(IP <> BillingServer) Then
Response.Write "ACCESSDENY"
Response.End
End If
'''''''''''''''' Check MD5 secretstring
Dim RefundNo
Dim Username
Dim Password
Dim Package
Dim NumSilk
Dim ECash
Dim Secret
RefundNo = Trim(Request("RefundNo"))
RefundNo = FilterReqXSS(RefundNo)
Username = Trim(Request("Username"))
Username = FilterReqXSS(Username)
Password = Trim(Request("Password"))
Password = FilterReqXSS(Password)
Package = Trim(Request("Package"))
Package = FilterReqXSS(Package)
NumSilk = Trim(Request("NumSilk"))
NumSilk = FilterReqXSS(NumSilk)
ECash = Trim(Request("ECash"))
ECash = FilterReqXSS(ECash)
SecretStr = Trim(Request("SecretStr"))
SecretStr = FilterReqXSS(SecretStr)
' Error - Parameter
Dim ParaResult
ParaResult = "OK"
If RefundNo = "" OR IsNull(RefundNo) OR IsEmpty(RefundNo) Then
ParaResult = "PARA01"
End If
If Username = "" OR IsNull(Username) OR IsEmpty(Username) Then
ParaResult = "PARA02"
End If
If Password = "" OR IsNull(Password) OR IsEmpty(Password) Then
ParaResult = "PARA03"
End If
If Package = "" OR IsNull(Package) OR IsEmpty(Package) Then
ParaResult = "PARA04"
End If
If NumSilk = "" OR IsNull(NumSilk) OR IsEmpty(NumSilk) Then
ParaResult = "PARA05"
End If
If ECash = "" OR IsNull(ECash) OR IsEmpty(ECash) Then
ParaResult = "PARA06"
End If
If SecretStr = "" OR IsNull(SecretStr) OR IsEmpty(SecretStr) Then
ParaResult = "PARA07"
End If
If ParaResult <> "OK" Then
DBConnA.Close
Set DBConnA = Nothing
Response.Write ParaResult
Response.End
End If
''''''''''CHECK MD5 Valid key String
''''''''''
Dim KeyString
Dim objMD5
Dim Confirm_Valid_Key
KeyString = "VDC-Net2E-CGI"
Set objMD5 = New MD5
objMD5.Text = RefundNo & Username & Password & Package & NumSilk & ECash & IP & KeyString
Confirm_Valid_Key = objMD5.HEXMD5
' Error
If Err.Number <> 0 Then
DBConnA.Close
Set DBConnA = Nothing
Response.Write "ERROR"
Response.End
End If
If Trim(SecretStr) <> Trim(Confirm_Valid_Key) Then
DBConnA.Close
Set DBConnA = Nothing
Response.Write "INVALID"
Response.End
End If
''''''''''Execute Refund stored procedure
Dim sdSQL
Dim sdRS
Dim ReturnValue
sdSQL = "SET NOCOUNT ON EXEC CGI.CGI_WebRefundSilk '" & RefundNo & "'," & Username & ",'" & Password & "'," & Package & "," & NumSilk & "," & ECash & " "
'Response.Write sdSQL
'Response.End
Set sdRS = DBConnA.Execute(sdSQL)
ReturnValue = sdRS(0)
sdRS.Close
Set sdRS = Nothing
DBConnA.Close
Set DBConnA = Nothing
' Error
If Err.Number <> 0 Then
Response.Write "ERROR"
Response.End
End If
Response.Write ReturnValue
Response.End
%>
|
|
التعديل الأخير تم بواسطة thedeathlist ; 10-01-2017 الساعة 05:20 PM
|