asp 복호화,chrw,chr 인 코딩 파일 복원 방법

asp 함수 의 인 자 를 chrw 인 코딩 을 통 해 암호 화 한 후 chrw 내용 을 어떻게 디 코딩 합 니까?아래 의 디 코딩 함 수 는 원래 매우 간단 합 니 다.내용 중의 chrw 문자열 을 정규 추출 한 다음 에 eval 동적 으로 실행 하여 가 져 온 chrw 문자열 로 내용 을 얻 은 다음 에 교 체 를 실행 하면 됩 니 다.주의사항 은 소스 코드 에 있 는 설명 을 참고 하여 소스 코드 를 vbs 형식의 파일 로 저장 한 후 실행 하 십시오.asp 파일 이 라면 createobject 를 server.createobject 로 수정 해 야 합 니 다.

function readfile(fn)'         
 set fso=createobject("scripting.filesystemobject")
 set ts=fso.OpenTextFile(fn,1,false,-2)'           ,     unicode  , -2(      )   -1(unicode  )。0 ascii
 readfile=ts.ReadAll
 ts.close
 set ts=nothing
 set fso=nothing
end function
function decodechrw(s)'  chrw     
 set rx=new RegExp
 rx.Global=true
 rx.IgnoreCase=true
 rx.Pattern="ChrW\s*\(\s*\d+\s*\)(\s*&\s*ChrW\s*\(\s*\d+\s*\))*"'  chrw 
 set mc=rx.Execute(s)
 for each m in mc
  s=replace(s, m.value,""""&eval(m.value)&"""")
 next
 rx.Pattern="Chr\s*\(\s*\d+\s*\)(\s*&\s*Chr\s*\(\s*\d+\s*\))*"‘  chr 
 set mc=rx.Execute(s)
 for each m in mc
  s=replace(s, m.value,""""&eval(m.value)&"""")
 next
 decodechrw=s
 
end function
function decodechrwfile(fn)'      chrw     
 s=readfile(fn)
 s=decodechrw(s)
 '         
 set fso=createobject("scripting.filesystemobject")
 set ts=fso.OpenTextFile(replace(fn,".","_decode."),2,true,-2)'                  _decode     , fn encode.txt,        encode_decode.txt
 ts.write s
 ts.close
 set ts=nothing
 set fso=nothing
end function
decodechrwfile("encode.txt")'       chrw          ,           

좋은 웹페이지 즐겨찾기