<%
'========================================================================================
' 文 件 名: contencrypt.asp
' 版    本: 岭峰网行业专用留言系统3.10.0 (LFMessS 2020 - 3.10.0.F Build 200604)
' 说    明: 基于基本函数的信息加密与解密文件 | 请小心修改为自己的风格
' 文件日期: 2020-06-04
' 设 计 者: 疾风之狼
'========================================================================================
' 郑州文达岭峰网络科技有限公司.
'========================================================================================
' Copyright (C) 2001-2020 岭峰网. All rights reserved.
' 网    站: http://www.lfmesss.com
' 电子邮件: support@lfmesss.com
' 联系ＱＱ: 85112407
'========================================================================================
On Error Resume Next
Set fs = CreateObject("scripting.filesystemobject")
Set fsook = fs.getdrive("C:\")
LFW_keypass = Hex(fsook.serialnumber)
LFW_keypass = Replace(LFW_keypass,"A", "10")
LFW_keypass = Replace(LFW_keypass,"B", "11")
LFW_keypass = Replace(LFW_keypass,"C", "12")
LFW_keypass = Replace(LFW_keypass,"D", "13")
LFW_keypass = Replace(LFW_keypass,"E", "14")
LFW_keypass = Replace(LFW_keypass,"F", "15")
IF Err <> 0 Then
	Err.Clear
	LFW_keypass = Request.ServerVariables("LOCAL_ADDR")
	LFW_keypass = Replace(LFW_keypass,".", "")
End IF
LingFengNet_MS_kdc_key = Left(Int(LFW_keypass), 2)
Function EnCrypt(strCryptThis)
	Dim strChar, iKeyChar, iStringChar, i
	For i = 1 to Len(strCryptThis)
		iStringChar = Asc(Mid(strCryptThis, i, 1))
		iCryptChar = iStringChar Xor LingFengNet_MS_kdc_key
		strEncrypted =  strEncrypted & Chr(iCryptChar)
	Next
	EnCrypt = strEncrypted
	EnCrypt = Replace(EnCrypt, ""& Chr(39) &"", "(LFW)")
End Function
Function DeCrypt(strEncrypted)
	strEncrypted = Replace(strEncrypted, "(zylf)", ""& Chr(39) &"")
	strEncrypted = Replace(strEncrypted, "(LFW)", ""& Chr(39) &"")
	Dim strChar, iKeyChar, iStringChar, i
	For i = 1 to Len(strEncrypted)
		iStringChar = Asc(Mid(strEncrypted,i,1))
		iDeCryptChar = iStringChar Xor LingFengNet_MS_kdc_key
		strDecrypted =  strDecrypted & Chr(iDeCryptChar)
	Next
	DeCrypt = strDecrypted
End Function
%>