1. 程式人生 > >KSOA單據保護表中Clientid解析為mac和ip

KSOA單據保護表中Clientid解析為mac和ip

exe sse null binary 保護 soa right sele ssi

SELECT DISTINCT a.*,ISNULL(c.client_net_address,‘‘) AS client_net_address
FROM (
      SELECT *
            ,RIGHT(UPPER(sys.fn_varbintohexstr(CONVERT(VARBINARY(4),CAST(SUBSTRING(clientid,1,3) AS INT)))),2)
            +RIGHT(UPPER(sys.fn_varbintohexstr(CONVERT(VARBINARY(4),CAST(SUBSTRING(clientid,4
,3) AS INT)))),2) +RIGHT(UPPER(sys.fn_varbintohexstr(CONVERT(VARBINARY(4),CAST(SUBSTRING(clientid,7,3) AS INT)))),2) +RIGHT(UPPER(sys.fn_varbintohexstr(CONVERT(VARBINARY(4),CAST(SUBSTRING(clientid,10,3) AS INT)))),2) +RIGHT(UPPER(sys.fn_varbintohexstr(CONVERT
(VARBINARY(4),CAST(SUBSTRING(clientid,13,3) AS INT)))),2) +RIGHT(UPPER(sys.fn_varbintohexstr(CONVERT(VARBINARY(4),CAST(SUBSTRING(clientid,16,3) AS INT)))),2) AS MAC FROM tmp_dj_baohu ) AS a LEFT JOIN sys.sysprocesses AS b ON a.MAC = b.net_address LEFT JOIN sys.dm_exec_connections AS
c ON b.spid = c.session_id

KSOA單據保護表中Clientid解析為mac和ip