VB 写了一个解码程序 需要重新写成java或者c

freeflash 2010-11-30 09:14:50
今天遇到一个密码解析程序是用vb写的!但是我对vb不了解尤其是对其中的函数变量定义什么的,我希望好心人能帮我把下面的vb程序装换为java或者c的方法,程序如下:原为地址是
http://www.eve-software.com/security/ueditpw.html

' Masterkey. Taken from the UltraEdt.exe
Private Const Masterkey = "sdfkh we;34u[ jwef "

'Decode a single character
Public Function UEDecode(i_Asc, ByVal i_Pos As Integer)

i_Pos = i_Pos Mod 19
If i_Pos = 0 Then i_Pos = 19

UEDecode = ((Not i_Asc) And Asc(Mid(Masterkey, i_Pos, 1))) + (i_Asc And ((Not Asc(Mid(Masterkey, i_Pos, 1))) And 127))

End Function

'Decode password
Public Function UEDecodeString(str_password As String)

Dim i As Integer

UEDecodeString = ""

For i = 1 To (Len(str_password) / 2)
UEDecodeString = UEDecodeString + Chr$(UEDecode(Val("&H" + Mid(str_password, (2 * (i - 1)) + 1, 2)), i))
Next i

End Function

如果哪位好心人能帮我转换为java/c,我实在感激不尽,由于这个段代码如果能够解码UltraEdt存UltraEdt.ini中的ftp密码,因为我们这个东西对我来说确实蛮重要的!期待朋友们的帮助!

谢谢!
...全文
99 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧