Yoko

All sides of Injection
It is currently 2026-03-17 03:48:37

All times are UTC+02:00




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 2004-10-27 21:13:56 
Offline

Joined: 2004-05-03 17:30:45
Posts: 32
Location: OR
I was trying to do a software with Visual Basic and studiing the UO protocol i've seen it uses the Huffman Compression Metod.

Yoko do you have a Visual Basic port for the Compressor/Decompressor functions in Injection DLL, or maybe a dll usable with vb?

_________________
OR


Top
   
 Post subject:
PostPosted: 2004-10-27 21:34:58 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
http://uosoft.ru/renaissance/files/fclient_src.zip


Top
   
 Post subject:
PostPosted: 2004-10-27 21:46:16 
Offline

Joined: 2004-05-03 17:30:45
Posts: 32
Location: OR
i tried it a lot, but the class which decompress has a little bug. I've contacted the author, but no answer.

The problem is that it doesn't decompress well certain strings, and it is for sure, because i tried to compress a string, decompress the result, and the obtainer string wasn't equal to the first.

Any other help? It's very important for me..

_________________
OR


Top
   
 Post subject:
PostPosted: 2004-10-27 22:17:13 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
I don't know about compress, but decompress is 100% correct. My UO Script Client is based on that decompress algoritm.


Top
   
 Post subject:
PostPosted: 2004-10-28 00:43:47 
Offline
Expert!

Joined: 2004-05-30 00:31:54
Posts: 74
dl this:

http://uo.elitecoder.net/phpBB/viewtopic.php?t=281

use the exported functions... since you are using VB, set the struct pointer to NULL


Top
   
 Post subject:
PostPosted: 2004-10-28 00:46:29 
Offline

Joined: 2004-05-03 17:30:45
Posts: 32
Location: OR
i'm working on a client which is able to change the packets sent by the server. It's something like a proxy, it receive, modify packets, and send them to the real client. The compression i really important. In the injection.dll there is a compressor, it's written in c++. Unfortunately i'm not skilled enough to convert it in Visual Basic, and also a lot of things used in the code is natively unportable.. The best way is to use in VB a dll compiled in c++, using the Yoko Code. Only Yoko can do something like this, i hope he'll answer..

_________________
OR


Top
   
 Post subject:
PostPosted: 2004-10-28 01:16:13 
Offline

Joined: 2004-05-03 17:30:45
Posts: 32
Location: OR
Necr0Potenc3 seems what i need, but i didn't understand how to use the dll, when i try to call compress it crashes. Can you hint me how to do a packet compression, maybe with a sample?

_________________
OR


Top
   
 Post subject:
PostPosted: 2004-10-28 01:39:23 
Offline

Joined: 2004-05-03 17:30:45
Posts: 32
Location: OR
This is the code i've written. Is there any error?

Private Declare Sub Compress Lib "UOEncryption.dll" (Dest() As Byte, Source() As Byte, DestSize As Integer, SrcSize As Integer)

Private Sub Form_Load()
Dim src() As Byte, dst() As Byte
String2Array "hello", src()
Compress dst, src, 1000, 5
End Sub

Private Function String2Array(Text, ByRef ar() As Byte) As Long
On Error Resume Next
ReDim ar(Len(Text) - 1)
For i = 0 To Len(Text) - 1
ar(i) = Asc(Mid(Text, i + 1, 1))
Next i
End Function


When I run the program, VB Crashes. Any help?

_________________
OR


Top
   
 Post subject:
PostPosted: 2004-10-28 02:05:24 
Offline

Joined: 2004-05-03 17:30:45
Posts: 32
Location: OR
ok, new things i've done, but still not working. There's something wrong with memory:

'IN A MODULE

Public Declare Sub Compress Lib "UOEncryption.dll" (ByRef Dest() As Byte, ByRef Source() As Byte, ByRef DestSize As Integer, ByRef SrcSize As Integer)

Public Src() As Byte
Public Dst() As Byte
Public SrcLength As Integer
Public DestLength As Integer


'IN MAIN FORM

Private Sub Form_Load()
String2Array "ciao", Src()
SrcLength = 4
DestLength = 1000
Compress Dst, Src, DestLength, SrcLength
End Sub

Private Function String2Array(Text, ByRef ar() As Byte) As Long
On Error Resume Next
ReDim ar(Len(Text) - 1)
For i = 0 To Len(Text) - 1
ar(i) = Asc(Mid(Text, i + 1, 1))
Next i
End Function



When i run it says Error 49: Bad DLL calling convention. If i debug Src, DestLength and SrclLength, everything works, if I debug Dst it crashes saying memory could not be read. Someone can help?

_________________
OR


Top
   
 Post subject:
PostPosted: 2004-10-28 23:28:56 
Offline

Joined: 2004-05-03 17:30:45
Posts: 32
Location: OR
ok I converted in VB the Necromancer Compress and Decomoress functions. All working good. Thanks to all.

_________________
OR


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 10 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited