Posts: 18
Threads: 5
Joined: Oct 2010
10-19-2010, 01:01 AM
(This post was last modified: 10-20-2010, 04:01 AM by Av23.)
Hello everyones,
Just wondering but does anyone know the format of the LF2 data files? I'm a noob at programming (sort of) and I don't know how to decode the lf2 data files. Is it in hex (I doubt it)? Or something else?? If someone knows please reply.
And in case you are wondering, my goal here is to create a visual lf2 data changer. And the goal of that is to challenge my programming skills.
Thanks.
Thanks given by:
Posts: 1,694
Threads: 62
Joined: Aug 2008
10-19-2010, 01:45 AM
(This post was last modified: 10-19-2010, 01:45 AM by Alectric.)
Well, since you're new, and i cant be bothered raging, ill just be help out.
On the mainsite, there is a whole download section.
http://www.lf-empire.de/en/lf2-empire/da...ta-changer
download the data changer (not encrypters/decrypters)
Then just open up the data file with the program. Have a nice day.
Does this solve the problem/thread?
Yee be warned...flamers
Posts: 18
Threads: 5
Joined: Oct 2010
(10-19-2010, 01:45 AM)Alectric Wrote: Well, since you're new, and i cant be bothered raging, ill just be help out.
On the mainsite, there is a whole download section.
http://www.lf-empire.de/en/lf2-empire/da...ta-changer
download the data changer (not encrypters/decrypters)
Then just open up the data file with the program. Have a nice day.
Does this solve the problem/thread?
Yee be warned...flamers
Ya I know about the pre-made data changers. (I've been using this site for over 5 years)
But I want to know how they managed to decode the lf2-data files... Aka what is the format of the data files? I tried ascii, hex, and many many other random stuff that google told me to do. But everytime I get funny looking characters in my textboxes. I'm hoping its not one of the binary ones cuz that 'll take a really long time to decode............
btw If anyone has code, I'm using VB.NET. Yes I know it sucks but thats all they teach in high school... my school at least.
Thanks given by:
Posts: 1,694
Threads: 62
Joined: Aug 2008
10-19-2010, 03:55 AM
(This post was last modified: 10-19-2010, 05:43 AM by Alectric.)
oh, my apologies for misunderstanding :P
i have no idea then
Moved to programming forum btw
Thanks given by:
Posts: 4,878
Threads: 162
Joined: Mar 2008
http://www.lf-empire.de/forum/showthread.php?tid=1877
If you know how java works, it should be fairly easy to port it to .net.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~
"Freeze, you're under vrest!" - Mark, probably.
» Gallery | » Sprites | » DeviantArt
Thanks given by:
Posts: 410
Threads: 25
Joined: Sep 2008
10-19-2010, 06:15 AM
(This post was last modified: 10-19-2010, 06:16 AM by blow_fly98.)
And if you are really lazy,
VBNET-Code:
Public EncKey As String = "odBearBecauseHeIsVeryGoodSiuHungIsAGo"
Public Function EncryptString(ByVal Contents As String) As Byte()
Try
Dim EncKeyLength As Integer = EncKey.Length
Dim Encoding As New System.Text.ASCIIEncoding
Dim ContentsBytes As System.Collections.Generic.List(Of Byte) = Encoding.GetBytes(Contents).ToList
Dim ResultBytes As New System.Collections.Generic.List(Of Byte)
Dim CountBuffer As Integer = 0
Try
For Each buffer As Byte In ContentsBytes
If buffer <> &HD Then
buffer += Asc(EncKey(CountBuffer))
ResultBytes.Add(buffer)
CountBuffer += 1
End If
If CountBuffer > EncKeyLength - 1 Then
CountBuffer = 0
End If
Next
Catch ex As Exception
End Try
Return ResultBytes.ToArray
Catch ex As Exception
Return New Byte() {}
End Try
End Function
Public Function DecryptBytes(ByVal Contents() As Byte, Optional ByVal EncryptionKeyIndex As Integer = 0) As String
Try
Dim EncKeyLength As Integer = EncKey.Length
Dim ResultString(Contents.Length - 1) As Char
Dim ResultIndexBuffer As Integer = 0
Dim CharBuffer As Integer
Try
For Each buffer As Byte In Contents
CharBuffer = buffer
CharBuffer -= Asc(EncKey.Chars(EncryptionKeyIndex))
ResultString(ResultIndexBuffer) = ChrW(CharBuffer)
ResultIndexBuffer += 1
EncryptionKeyIndex += 1
If EncryptionKeyIndex > EncKeyLength - 1 Then
EncryptionKeyIndex = 0
End If
Next
Catch ex As Exception
End Try
Return New String(ResultString)
Catch ex As Exception
Return String.Empty
End Try
End Function
|
You will have to try understand it by yourself.
Of course, that might not be the BEST method when it comes to speed, however VB.NET is not the best language either...
Hiding users' signatures and avatars was the best decision ever.
hey blow :P ~ Bamboori
can I call ya koalafly? ~ Phil
Pogofly - Simoneon
k0a1af1y, looks much more stylish ~ Blue Phoenix
So hey, blow, say something! - Simoneon
Quack? ~ blow_fly98
Hi blow ~Ramond
So... is it decided that we call him "blow"? ~ Blue Phoenix
No. ~ blow_fly98
But blow, all the members now will follow us because of this convo. You're ruined!!! - Simoneon
Meh. But I'll leave this convo here anyway. ~ blow_fly98
meh koala is much more awesome so I will stick to that ~ Phil
Wait, what? Koalas can edit profiles? - Simoneon
lol, seems that i started a long discussion :P ~ Bamboori
You did, indeed. I wonder who will exceed the sig-limit... ~ Blue Phoenix
Please don't trash this. It's good eye-candy. ~ blow_fly98
koala has spoken and so shall it be =) ~ Phil
there're some html here, and bla bla bla, so I think I might exceed it. Period - Simoneon
WHY THE SPOILER?! ~ Blue Phoenix
didn't you spoiler the conversation yourself? ~ Bamboori
BLOW BLOW!!! YOU FORGOT TO WRITE NAKATO IN 'WE'RE WATCHING YOU'!!!!! - Simoneon
To0 8ad. H4 D045n't d0 any MoDdin9 at A11!!!!!!! ~ blow_fly98
Evil Sonidow does, eh? - Simoneon
Of course. Just n0t v4ry 0ft4n. ~ blow_fly98
WHY THE 1337-SPEAK?! ~ Blue Phoenix
Because I am a KOALA!!! ~ blow_fly98
To be honest, I thought they use Eucalyptus-Speal..........
......
......
D: - Simoneon
Noez, Simon forgot to close his notice! ~ Blue Phoenix
oh no its the end of the world! *panic* ~ Bamboori
Gzz Hizz Fz Mzzz
Anyone got a Eucalyptus-speak interpreter?
And did you know that a user can have more than 4 images in their signature if we edit it for them? Or am I just the last one to find out?
~ blow_fly98
OMG spoilers in spoilers! ~ Bamboori
OMG offtopic in offtopic! - Simoneon
OH HAI GUYZ, i didnt you see you thar :P ~ Alectric
Now, I seriously need to be a part of this. ~ SirFrog
Wasn't there something about childish mods editing signatures lately? ~ Reaper
What?!?! Where was it?!?!?! ~ blow_fly98
DO YOU HAVE SUGAR?! - Simoneon
I heard if you edit someone's signature enough, your profile automatically is set to Admin status. BP told me. ~ Alectric
then let's do this! ~ Bamboori
Just because I don't go around checking every single post and editing signatures doesn't mean that I don't mod here. I just don't check posts that aren't reported. ~ Evil Sonidow
Seriously. We should encourage people to start reporting more :/ - Simoneon
EvErYoNe'S pOsTeD hErE eXcEpT mH.
Hey, maybe we could report every single post just so ES could check them. ~ blow_fly98
You know, that's a hell lot of work. What about a rule that everyone has to report at least one post whenever he logs in? Or an auto-report function? ~ Reaper
I liked the report-part until we got to the point of an auto-report function. That's something that requires work --> No. ~ Blue Phoenix
Finally, I get to see some invisible users. *sniggers* ~ blow_fly98
Oh, i came back. Well, since im already here, i may as well shoot bees ~ Alectric
You know, the ducks are watching. Always watching... ~ SirFrog
Hmm, I think, Lauli is about to climax due to the awesomeness of this color-wall ~ Blue Phoenix
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage"><img src="images/unrealblack//collapse.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
<div><strong>Board Statistics</strong></div>
</td>
</tr>
</thead>
<tbody style="" id="boardstats_e">
<tr>
<td class="tcat"><span class="smalltext"><strong>Who's Online</strong> </span></td>
</tr>
<tr>
<td class="trow1"><span class="smalltext">13 users active in the past 5 minutes (13 members, 0 of whom are invisible, and 0 guests).<br /><a href="member.php?action=profile&uid=838"><span style="color: #ff7f00"><b>Alectric</b></span></a>, <a href="member.php?action=profile&uid=17"><span style="color: #ff7f00"><b>Azriel</b></span></a>, <a href="member.php?action=profile&uid=26"><span style="color: #8888ff"><b>Bamboori</b></span></a>, <a href="member.php?action=profile&uid=1056"><span style="color: #008800"><b>blow_fly98</b></span></a>, <a href="member.php?action=profile&uid=15"><span style="color: #ff0000;"><b>Blue Phoenix</b></span></a>, <a href="member.php?action=profile&uid=5"><span style="color: #8888ff;"><b>Evil Sonidow</b></span></a>, <a href="http://www.lf-empire.de/forum/member.php?action=profile&uid=8"><span style="color: #8888ff;"><b>Lord Silva</b></span></a>, <a href="member.php?action=profile&uid=3"><span style="color: #8888ff;"><b>Marshall</b></span></a>, <a href="member.php?action=profile&uid=1"><span style="color: #ff0000;"><b>MH-Razen</b></span></a>, <a href="member.php?action=profile&uid=736"><span style="color: #8888ff;"><b>Phil</b></span></a>, <a href="member.php?action=profile&uid=10"><span style="color: #ff7f00;"><b>Ramond</b></span></a>, <a href="member.php?action=profile&uid=1659"><span style="color: #008800"><b>Reaper</b></span></a>, <a href="member.php?action=profile&uid=1317"><span style="color: #ff7f00;"><b>Simoneon</b></span></a>, <a href="member.php?action=profile&uid=245"><span style="color: #008800"><b>SirFrog</b></span></a></span></td>
</tr>
</tbody>
</table> | Avatar made by Alectric |
Posts: 18
Threads: 5
Joined: Oct 2010
10-20-2010, 03:43 AM
(This post was last modified: 10-20-2010, 03:58 AM by Av23.)
Unfortunately I don't understand... :'( :'( :'( :s
I use filestream to open the file, but when I make the byte go through the decrypt function it returns negative values.
VBNET-Code:
Public EncKey As String = "odBearBecauseHeIsVeryGoodSiuHungIsAGo"
Private Sub mnuOpenTest_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles mnuOpenTest.Click
opoOpenTest.FileName = Nothing
opoOpenTest.ShowDialog()
Dim strFileName As String = opoOpenTest.FileName
Dim fs As New FileStream _
(strFileName, FileMode.Open, FileAccess.Read)
Dim Filesss As New StreamReader(fs)
Dim encoding As New System.Text.ASCIIEncoding
Do While Filesss.Peek() > -1
Dim Superbyte() As Byte = encoding.GetBytes(Filesss.ReadLine())
Me.txtText.Text &= DecryptBytes(Superbyte)
Loop
End Sub
Public Function DecryptBytes(ByVal Contents() As Byte, Optional ByVal EncryptionKeyIndex As Integer = 0) As String
Try
Dim EncKeyLength As Integer = EncKey.Length
Dim ResultString(Contents.Length - 1) As Char
Dim ResultIndexBuffer As Integer = 0
Dim CharBuffer As Integer
Try
For Each buffer As Byte In Contents
CharBuffer = buffer
CharBuffer -= Asc(EncKey.Chars(EncryptionKeyIndex))
ResultString(ResultIndexBuffer) = ChrW(CharBuffer)
ResultIndexBuffer += 1
EncryptionKeyIndex += 1
If EncryptionKeyIndex > EncKeyLength - 1 Then
EncryptionKeyIndex = 0
End If
Next
Catch ex As Exception
End Try
Return New String(ResultString)
Catch ex As Exception
Return String.Empty
End Try
End Function
|
Thanks given by:
Posts: 410
Threads: 25
Joined: Sep 2008
10-20-2010, 08:01 AM
(This post was last modified: 10-20-2010, 08:01 AM by blow_fly98.)
You don't decrypt line by line for DAT files. It's decrypted as a whole.
Also, I have to add that you decrypt everything BUT THE FIRST 123 BYTES.
So, basically something like,
VBNET-Code:
Public Function Open(ByVal filename As String) As String
Dim stuff() as Byte = System.IO.File.ReadAllBytes(filename)
Dim copied() as Byte
'....Do stuff here to copy everything from stuff to copied EXCEPT THE FIRST 123 BYTES
Return DecryptBytes(copied)
End Sub
Public Function DecryptBytes(ByVal Contents() As Byte, Optional ByVal EncryptionKeyIndex As Integer = 0) As String
Try
Dim EncKeyLength As Integer = EncKey.Length
Dim ResultString(Contents.Length - 1) As Char
Dim ResultIndexBuffer As Integer = 0
Dim CharBuffer As Integer
Try
For Each buffer As Byte In Contents
CharBuffer = buffer
CharBuffer -= Asc(EncKey.Chars(EncryptionKeyIndex))
ResultString(ResultIndexBuffer) = ChrW(CharBuffer)
ResultIndexBuffer += 1
EncryptionKeyIndex += 1
If EncryptionKeyIndex > EncKeyLength - 1 Then
EncryptionKeyIndex = 0
End If
Next
Catch ex As Exception
End Try
Return New String(ResultString)
Catch ex As Exception
Return String.Empty
End Try
End Function
|
Hiding users' signatures and avatars was the best decision ever.
hey blow :P ~ Bamboori
can I call ya koalafly? ~ Phil
Pogofly - Simoneon
k0a1af1y, looks much more stylish ~ Blue Phoenix
So hey, blow, say something! - Simoneon
Quack? ~ blow_fly98
Hi blow ~Ramond
So... is it decided that we call him "blow"? ~ Blue Phoenix
No. ~ blow_fly98
But blow, all the members now will follow us because of this convo. You're ruined!!! - Simoneon
Meh. But I'll leave this convo here anyway. ~ blow_fly98
meh koala is much more awesome so I will stick to that ~ Phil
Wait, what? Koalas can edit profiles? - Simoneon
lol, seems that i started a long discussion :P ~ Bamboori
You did, indeed. I wonder who will exceed the sig-limit... ~ Blue Phoenix
Please don't trash this. It's good eye-candy. ~ blow_fly98
koala has spoken and so shall it be =) ~ Phil
there're some html here, and bla bla bla, so I think I might exceed it. Period - Simoneon
WHY THE SPOILER?! ~ Blue Phoenix
didn't you spoiler the conversation yourself? ~ Bamboori
BLOW BLOW!!! YOU FORGOT TO WRITE NAKATO IN 'WE'RE WATCHING YOU'!!!!! - Simoneon
To0 8ad. H4 D045n't d0 any MoDdin9 at A11!!!!!!! ~ blow_fly98
Evil Sonidow does, eh? - Simoneon
Of course. Just n0t v4ry 0ft4n. ~ blow_fly98
WHY THE 1337-SPEAK?! ~ Blue Phoenix
Because I am a KOALA!!! ~ blow_fly98
To be honest, I thought they use Eucalyptus-Speal..........
......
......
D: - Simoneon
Noez, Simon forgot to close his notice! ~ Blue Phoenix
oh no its the end of the world! *panic* ~ Bamboori
Gzz Hizz Fz Mzzz
Anyone got a Eucalyptus-speak interpreter?
And did you know that a user can have more than 4 images in their signature if we edit it for them? Or am I just the last one to find out?
~ blow_fly98
OMG spoilers in spoilers! ~ Bamboori
OMG offtopic in offtopic! - Simoneon
OH HAI GUYZ, i didnt you see you thar :P ~ Alectric
Now, I seriously need to be a part of this. ~ SirFrog
Wasn't there something about childish mods editing signatures lately? ~ Reaper
What?!?! Where was it?!?!?! ~ blow_fly98
DO YOU HAVE SUGAR?! - Simoneon
I heard if you edit someone's signature enough, your profile automatically is set to Admin status. BP told me. ~ Alectric
then let's do this! ~ Bamboori
Just because I don't go around checking every single post and editing signatures doesn't mean that I don't mod here. I just don't check posts that aren't reported. ~ Evil Sonidow
Seriously. We should encourage people to start reporting more :/ - Simoneon
EvErYoNe'S pOsTeD hErE eXcEpT mH.
Hey, maybe we could report every single post just so ES could check them. ~ blow_fly98
You know, that's a hell lot of work. What about a rule that everyone has to report at least one post whenever he logs in? Or an auto-report function? ~ Reaper
I liked the report-part until we got to the point of an auto-report function. That's something that requires work --> No. ~ Blue Phoenix
Finally, I get to see some invisible users. *sniggers* ~ blow_fly98
Oh, i came back. Well, since im already here, i may as well shoot bees ~ Alectric
You know, the ducks are watching. Always watching... ~ SirFrog
Hmm, I think, Lauli is about to climax due to the awesomeness of this color-wall ~ Blue Phoenix
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage"><img src="images/unrealblack//collapse.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
<div><strong>Board Statistics</strong></div>
</td>
</tr>
</thead>
<tbody style="" id="boardstats_e">
<tr>
<td class="tcat"><span class="smalltext"><strong>Who's Online</strong> </span></td>
</tr>
<tr>
<td class="trow1"><span class="smalltext">13 users active in the past 5 minutes (13 members, 0 of whom are invisible, and 0 guests).<br /><a href="member.php?action=profile&uid=838"><span style="color: #ff7f00"><b>Alectric</b></span></a>, <a href="member.php?action=profile&uid=17"><span style="color: #ff7f00"><b>Azriel</b></span></a>, <a href="member.php?action=profile&uid=26"><span style="color: #8888ff"><b>Bamboori</b></span></a>, <a href="member.php?action=profile&uid=1056"><span style="color: #008800"><b>blow_fly98</b></span></a>, <a href="member.php?action=profile&uid=15"><span style="color: #ff0000;"><b>Blue Phoenix</b></span></a>, <a href="member.php?action=profile&uid=5"><span style="color: #8888ff;"><b>Evil Sonidow</b></span></a>, <a href="http://www.lf-empire.de/forum/member.php?action=profile&uid=8"><span style="color: #8888ff;"><b>Lord Silva</b></span></a>, <a href="member.php?action=profile&uid=3"><span style="color: #8888ff;"><b>Marshall</b></span></a>, <a href="member.php?action=profile&uid=1"><span style="color: #ff0000;"><b>MH-Razen</b></span></a>, <a href="member.php?action=profile&uid=736"><span style="color: #8888ff;"><b>Phil</b></span></a>, <a href="member.php?action=profile&uid=10"><span style="color: #ff7f00;"><b>Ramond</b></span></a>, <a href="member.php?action=profile&uid=1659"><span style="color: #008800"><b>Reaper</b></span></a>, <a href="member.php?action=profile&uid=1317"><span style="color: #ff7f00;"><b>Simoneon</b></span></a>, <a href="member.php?action=profile&uid=245"><span style="color: #008800"><b>SirFrog</b></span></a></span></td>
</tr>
</tbody>
</table> | Avatar made by Alectric |
|