Valhalla Legends Forums Archive | Battle.net Bot Development | iago's lockdown source (100% C)

AuthorMessageTime
iago
I was beat to it by a day! I was going to release mine tomorrow! :(++

http://www.skullsecurity.org/wiki/index.php/Lockdown
http://www.javaop.com/~ron/code/lockdown

Pure C.

Not as pretty as Warz's code, but it's complete :P
June 3, 2007, 7:24 AM
l2k-Shadow
why all the sudden releases?

damn, loading is back. :(
June 3, 2007, 7:36 AM
iago
[quote author=l2k-Shadow link=topic=16753.msg169648#msg169648 date=1180856217]
why all the sudden releases?

damn, loading is back. :(
[/quote]
I always release my code. And I just finished it a couple days ago, and was testing it this weekend. I was going to release it tomorrow or Monday, but there's no sense in waiting now that it's out there.
June 3, 2007, 7:39 AM
HdxBmx27
So, who wants to help convert it to java?
The cool thing about ron's code is that it dosen't use the lockdown dlls in any way (Aside from a pure data form) It dosen't have the dlls do the hard parts.
~Hdx
June 3, 2007, 7:49 AM
warz
not sure if hard parts is the right phrase - more like the large parts. :P
June 3, 2007, 8:28 AM
iago
[quote author=betawarz link=topic=16753.msg169652#msg169652 date=1180859318]
not sure if hard parts is the right phrase - more like the large parts. :P
[/quote]
No, those were the hardest functions by far. Although I admit it's mainly because of their length. If you make one mistake, it could take you an hour to find it. And I pretty much make several mistakes per function as a rule :(
June 3, 2007, 8:47 AM
warz
well, yeah, they were easily the hardest, but the main reason that we didn't have a C++ conversion was due to their length. i mean, already have a working implementation on windows... what was the point in reversing a rather large function? that thought was always lurking. hehe.
June 3, 2007, 9:00 AM
rob
I saw no good reason to reverse the large functions, for an implementation that was solely for windows. 
June 3, 2007, 9:07 AM
HeRo
Good work sarge.
June 3, 2007, 9:25 AM
Quarantine
Here, after reversing lockdown in it's entirety it will be eventually more easily understood. It could help with documentation and with implementations across other platforms. Additionally, it is in a sense future proof if the lockdown dlls were ever to even slightly change.
June 3, 2007, 11:29 AM
iago
[quote author=Rob link=topic=16753.msg169655#msg169655 date=1180861633]
I saw no good reason to reverse the large functions, for an implementation that was solely for windows. 
[/quote]
Because it's fun and rewarding! :P
June 3, 2007, 2:53 PM
inner.
Good job iago, but I don't know why you released this for..
June 3, 2007, 4:30 PM
Quarantine
So people (like you) who can't reverse it themselves can use it? Why else?

Stop being such a damn elitist just because Rob let you use his implementation. Before his you were QQing about it just like every other "programmer"
June 3, 2007, 5:43 PM
Barabajagal
So does this work with DRTL/DSHR/JSTR/SSHR as well? And if so, how do I find out what memory locations to read from? Is there a beginning and ending byte sequence to look for perhaps?
June 3, 2007, 7:09 PM
BreW
if you had read the first link, iago made a screen dumper. go make them yourself.
June 3, 2007, 7:20 PM
l2k-Shadow
[quote author=brew link=topic=16753.msg169666#msg169666 date=1180898405]
if you had read the first link, iago made a screen dumper. go make them yourself.
[/quote]

tried using it to dump sc screen and it crashed :(
June 3, 2007, 7:29 PM
iago
[quote author=·RealityRipple· link=topic=16753.msg169664#msg169664 date=1180897747]
So does this work with DRTL/DSHR/JSTR/SSHR as well? And if so, how do I find out what memory locations to read from? Is there a beginning and ending byte sequence to look for perhaps?
[/quote]
It should, assuming you can get a dump of the screen. My plugin should support all clients, but apparently it doesn't. I'll have to look into it more, but I'm not in a rush for those. I'd rather play Playstation today. :)

Perhaps you should look at the soruce? :P

But seriously, it reads the PE (portable executable) in memory, which is the image of the file (the .exe or the .dll). It uses information in that header to decide where to start and finish and where to skip and not skip.

[quote author=l2k-Shadow link=topic=16753.msg169667#msg169667 date=1180898980]
[quote author=brew link=topic=16753.msg169666#msg169666 date=1180898405]
if you had read the first link, iago made a screen dumper. go make them yourself.
[/quote]

tried using it to dump sc screen and it crashed :(
[/quote]

Yeah, apparently it doesn't work for everybody. Be sure you have the .exe and .dll both in Starcraft's folder. If you do, and it doesn't work, then sorry. It *should*, though!

June 3, 2007, 7:43 PM
inner.
[quote author=Warrior link=topic=16753.msg169661#msg169661 date=1180892601]
So people (like you) who can't reverse it themselves can use it? Why else?

Stop being such a damn elitist just because Rob let you use his implementation. Before his you were QQing about it just like every other "programmer"
[/quote]

I'm not trying to be a "elitist", Warrior. I have never tried to be. You try to be the elitist and flame me for saying "so people (like you) who can't reverse it themselves can use it" when you can't even do it yourself. So don't try to flame me for having access to a DLL that a friend had given me.

And what are you talking about "QQing" about not having lockdown? I could give a fuck's less if I had lockdown implemented into my bot. Rob was nice enough to send me his because he found out I was truthworthy. So don't come at me with this shit, Warrior. I don't even know why you flamed me for, it was uncalled for.
June 3, 2007, 9:06 PM
Ringo
Nice work iago/rob! :P
I wunderd when somone would release a fully working lockdown source :D
Lets just hope they dont change the dlls again any time soon :(

Aside I just tolk a look at the data in STAR.bin and W2BN.bin (these interested me alot), and knowing its the screen buffer (from other posts) I tolk a look at a screen shot of the logon screen (pcx -> bmp) and it looks like the bit of screen that is hashed, is:
[img]http://www.geocities.com/ringomail711/Out.bmp[/img]

This code should* output the buffer from the raw pcx from the mpq (converted into a bmp with no color/pallet changes)
[code]
Private Function GetScreenBuffer(ByVal strBMPPath As String, ByVal strDumpPath As String) As Boolean
    If Dir(strBMPPath) = vbNullString Then Exit Function
    Dim FF      As Integer
    Dim strBMP  As String
    Dim strDump As String
    FF = FreeFile
    Open strBMPPath For Binary Lock Read As #FF
        If LOF(FF) < 267351 + (48 * 640) Then
            Close #FF
            Exit Function
        End If
        strBMP = String(LOF(FF) - 267351, 0)
        Get #FF, 267351, strBMP
    Close #FF
    For FF = 1 To (48 * 640) Step 640
        strDump = Mid(strBMP, FF, 208) & strDump
    Next FF
    strDump = Left(strDump, Len(strDump) - 1)
    If Not Dir(strDumpPath) = vbNullString Then
        Call Kill(strDumpPath)
    End If
    FF = FreeFile
    Open strDumpPath For Binary Lock Write As #FF
        Put #FF, 1, strDump
    Close #FF
    GetScreenBuffer = True
End Function
[/code]
I also think* SCJ/SC/BW/SCW all use the same back screen. (I could be wrong tho)
Im not sure what image d1 uses for its back ground image, or if you could get away with useing a ss rather than the back image.
June 3, 2007, 9:22 PM
Quarantine
[quote author=inner.de link=topic=16753.msg169670#msg169670 date=1180904780]
I'm not trying to be a "elitist", Warrior. I have never tried to be. You try to be the elitist and flame me for saying "so people (like you) who can't reverse it themselves can use it" when you can't even do it yourself. So don't try to flame me for having access to a DLL that a friend had given me.
[/quote]

Ok? I never excluded myself from that list. Why else would he release it?

[quote author=inner.de link=topic=16753.msg169670#msg169670 date=1180904780]
And what are you talking about "QQing" about not having lockdown? I could give a fuck's less if I had lockdown implemented into my bot. Rob was nice enough to send me his because he found out I was truthworthy. So don't come at me with this shit, Warrior. I don't even know why you flamed me for, it was uncalled for.
[/quote]

The fact is, that if you didn't have Rob's DLL implemented in your hashing server, you'd be scrambling for iago's work.

Stop acting like a retard and use some common sense. Why would someone release code to something that has not been publicly released before? warz beat him by a day with his release, are you on his case?

Jesus christ.
June 3, 2007, 11:15 PM
dRAgoN
[quote author=iago link=topic=16753.msg169647#msg169647 date=1180855449]
I was beat to it by a day! I was going to release mine tomorrow! :(++

http://www.skullsecurity.org/wiki/index.php/Lockdown
http://www.javaop.com/~ron/code/lockdown

Pure C.

Not as pretty as Warz's code, but it's complete :P
[/quote]
Havent checked it out yet but thanks ;p
June 4, 2007, 3:24 AM
inner.
[quote author=Warrior link=topic=16753.msg169674#msg169674 date=1180912533]
[quote author=inner.de link=topic=16753.msg169670#msg169670 date=1180904780]
I'm not trying to be a "elitist", Warrior. I have never tried to be. You try to be the elitist and flame me for saying "so people (like you) who can't reverse it themselves can use it" when you can't even do it yourself. So don't try to flame me for having access to a DLL that a friend had given me.
[/quote]

Ok? I never excluded myself from that list. Why else would he release it?

[quote author=inner.de link=topic=16753.msg169670#msg169670 date=1180904780]
And what are you talking about "QQing" about not having lockdown? I could give a fuck's less if I had lockdown implemented into my bot. Rob was nice enough to send me his because he found out I was truthworthy. So don't come at me with this shit, Warrior. I don't even know why you flamed me for, it was uncalled for.
[/quote]

The fact is, that if you didn't have Rob's DLL implemented in your hashing server, you'd be scrambling for iago's work.

Stop acting like a retard and use some common sense. Why would someone release code to something that has not been publicly released before? warz beat him by a day with his release, are you on his case?

Jesus christ.
[/quote]
I didn't know that warz released his, I didn't think he would because of Rob not wanting him to.

And Jesus Christ has nothing to do with this.
June 4, 2007, 8:17 PM
Quarantine
Uhuh. What about Rob releasing his? Get on his case.

STFU, imho.
June 4, 2007, 9:05 PM
inner.
[quote author=Warrior link=topic=16753.msg169720#msg169720 date=1180991103]
Uhuh. What about Rob releasing his? Get on his case.

STFU, imho.
[/quote]
Why would you tell me to STFU, when you know I won't?

And I wasn't talking about Rob releasing his, I was talking about Rob not wanting warz to release lockdown, because him and Rob both worked on it.

And I'm not getting on anyone's case, I was simply asking iago why would he release this.. and you get all personal like you did it. You didn't do shit Warrior, so get off iago's "case". STFU, imho (whatever the hell that means)
June 4, 2007, 9:31 PM
l2k-Shadow
in my honest opinion :D
June 4, 2007, 10:03 PM
BreW
[quote]
STFU, imho (whatever the hell that means)
[/quote]
ROFL.
"SHUT THE FUCK UP, in my humble opinion"
June 4, 2007, 10:05 PM
LockesRabb
Yes, Warz released his code. Not here at this particular forum, but over at x86's forums. Here's link to the thread in where Warz released his stuff:

http://www.x86labs.org:81/forum/index.php/topic,8679.0.html

Direct link to the Warz source code download:

http://rafm.org/files/checkrevision.zip
June 4, 2007, 10:07 PM
BreW
Yeah speaking of which rob's dll doesn't work at all in vb6 when compiled









just thought i'd throw that in there...
also it randomly returns invalid checksums.
June 4, 2007, 10:17 PM
inner.
[quote author=brew link=topic=16753.msg169726#msg169726 date=1180995464]
Yeah speaking of which rob's dll doesn't work at all in vb6 when compiled

just thought i'd throw that in there...
also it randomly returns invalid checksums.
[/quote]

Sure it does. Works perfectly for me :)
June 4, 2007, 10:34 PM
l2k-Shadow
[quote author=brew link=topic=16753.msg169726#msg169726 date=1180995464]
Yeah speaking of which rob's dll doesn't work at all in vb6 when compiled









just thought i'd throw that in there...
also it randomly returns invalid checksums.
[/quote]
https://davnit.net/bnet/vL/index.php?topic=16694.msg169676#msg169676
June 4, 2007, 10:41 PM
warz
[quote author=Kyro link=topic=16753.msg169725#msg169725 date=1180994857]
Yes, Warz released his code. Not here at this particular forum, but over at x86's forums. Here's link to the thread in where Warz released his stuff:

http://www.x86labs.org:81/forum/index.php/topic,8679.0.html

Direct link to the Warz source code download:

http://rafm.org/files/checkrevision.zip
[/quote]

for the record, the url to the x86 forum post is old, and incorrect. :P
June 4, 2007, 10:42 PM
BreW
[quote author=l2k-Shadow link=topic=16753.msg169729#msg169729 date=1180996905]
https://davnit.net/bnet/vL/index.php?topic=16694.msg169676#msg169676
[/quote]
Try compiling it
June 4, 2007, 11:27 PM
Denial
Intresting, Now for lockdown version 2 that comes out.
June 5, 2007, 3:22 AM
dRAgoN
The bin dumping device seems to not like Win2k
June 5, 2007, 3:23 AM
iago
[quote author=Denial link=topic=16753.msg169741#msg169741 date=1181013723]
Intresting, Now for lockdown version 2 that comes out.
[/quote]
See my post in the thread "Hmm"

[quote author=l)ragon link=topic=16753.msg169742#msg169742 date=1181013818]
The bin dumping device seems to not like Win2k
[/quote]
It doesn't seem to work for most people. Don't know why, don't care really, just download the .bin file :P
June 5, 2007, 4:05 AM
dRAgoN
[quote author=iago link=topic=16753.msg169747#msg169747 date=1181016304]
[quote author=Denial link=topic=16753.msg169741#msg169741 date=1181013723]
Intresting, Now for lockdown version 2 that comes out.
[/quote]
See my post in the thread "Hmm"

[quote author=l)ragon link=topic=16753.msg169742#msg169742 date=1181013818]
The bin dumping device seems to not like Win2k
[/quote]
It doesn't seem to work for most people. Don't know why, don't care really, just download the .bin file :P
[/quote]
nm heh your useing an xp/vista api in one of the librarys, http://msdn2.microsoft.com/en-us/library/ms683215.aspx.
June 5, 2007, 5:01 AM
iago
wow, I didn't know that was XP-specific.

Maybe I'll fix that -- I'll put "Requires XP or higher" on the download page :D
June 5, 2007, 5:08 AM
dRAgoN
[quote author=iago link=topic=16753.msg169750#msg169750 date=1181020096]
wow, I didn't know that was XP-specific.

Maybe I'll fix that -- I'll put "Requires XP or higher" on the download page :D
[/quote]
[code] int dwProcessId = 0;
GetWindowThreadProcessId(hProcess, (LPDWORD)dwProcessId);[/code]
June 5, 2007, 2:33 PM
Myndfyr
[quote author=l)ragon link=topic=16753.msg169755#msg169755 date=1181054008]
[quote author=iago link=topic=16753.msg169750#msg169750 date=1181020096]
wow, I didn't know that was XP-specific.

Maybe I'll fix that -- I'll put "Requires XP or higher" on the download page :D
[/quote]
[code] int dwProcessId = 0;
GetWindowThreadProcessId(hProcess, (LPDWORD)dwProcessId);[/code]
[/quote]

That would generate a null pointer exception.  You're thinking:
[code]
int dwProcessId = 0;
GetWindowThreadProcessId(hProcess, &dwProcessId);
[/code]
June 6, 2007, 4:19 PM
K
[quote author=MyndFyre[vL] link=topic=16753.msg169818#msg169818 date=1181146781]
[quote author=l)ragon link=topic=16753.msg169755#msg169755 date=1181054008]
[quote author=iago link=topic=16753.msg169750#msg169750 date=1181020096]
wow, I didn't know that was XP-specific.

Maybe I'll fix that -- I'll put "Requires XP or higher" on the download page :D
[/quote]
[code] int dwProcessId = 0;
GetWindowThreadProcessId(hProcess, (LPDWORD)dwProcessId);[/code]
[/quote]

That would generate a null pointer exception.  You're thinking:
[code]
int dwProcessId = 0;
GetWindowThreadProcessId(hProcess, &dwProcessId);
[/code]
[/quote]

Which also won't work because hProcess is a process HANDLE and not a HWND.
June 6, 2007, 5:13 PM
dRAgoN
[quote author=K link=topic=16753.msg169819#msg169819 date=1181149989]
[quote author=MyndFyre[vL] link=topic=16753.msg169818#msg169818 date=1181146781]
[quote author=l)ragon link=topic=16753.msg169755#msg169755 date=1181054008]
[quote author=iago link=topic=16753.msg169750#msg169750 date=1181020096]
wow, I didn't know that was XP-specific.

Maybe I'll fix that -- I'll put "Requires XP or higher" on the download page :D
[/quote]
[code] int dwProcessId = 0;
GetWindowThreadProcessId(hProcess, (LPDWORD)dwProcessId);[/code]
[/quote]

That would generate a null pointer exception.  You're thinking:
[code]
int dwProcessId = 0;
GetWindowThreadProcessId(hProcess, &dwProcessId);
[/code]
[/quote]

Which also won't work because hProcess is a process HANDLE and not a HWND.
[/quote]
Ya that was my bad, thinking the wrong way heh.
June 6, 2007, 11:15 PM
Myndfyr
[quote author=K link=topic=16753.msg169819#msg169819 date=1181149989]
[quote author=MyndFyre[vL] link=topic=16753.msg169818#msg169818 date=1181146781]
[quote author=l)ragon link=topic=16753.msg169755#msg169755 date=1181054008]
[quote author=iago link=topic=16753.msg169750#msg169750 date=1181020096]
wow, I didn't know that was XP-specific.

Maybe I'll fix that -- I'll put "Requires XP or higher" on the download page :D
[/quote]
[code] int dwProcessId = 0;
GetWindowThreadProcessId(hProcess, (LPDWORD)dwProcessId);[/code]
[/quote]

That would generate a null pointer exception.  You're thinking:
[code]
int dwProcessId = 0;
GetWindowThreadProcessId(hProcess, &dwProcessId);
[/code]
[/quote]

Which also won't work because hProcess is a process HANDLE and not a HWND.
[/quote]

Nuh uh.  You didn't see me declare it:
[code]
HWND hProcess = GetDesktopWindow(); // or some other window function
int dwProcess = 0;

GetWindowThreadProcessId(hProcess, &dwProcessId);
[/code]
See??
June 7, 2007, 1:32 AM
dRAgoN
[quote author=brew link=topic=16753.msg169666#msg169666 date=1180898405]
if you had read the first link, iago made a screen dumper. go make them yourself.
[/quote]
If you read through this thread aswell you would notice parts are XP/Vista dependent.

edit: late reply heh my bad.
June 7, 2007, 7:28 AM
Denial
By the way im mirroring the files for Iago

http://godkillme.com/lockdown/


has the .dll's as well. If you have any more files which you need hosted let me know as the project continues.
June 7, 2007, 6:25 PM
LCSBSSRHXXX
Beautiful work Iago!  Thanks.
June 7, 2007, 9:44 PM
JoeTheOdd
[quote author=brew link=topic=16753.msg169726#msg169726 date=1180995464]
Yeah speaking of which rob's dll doesn't work at all in vb6 when compiled









just thought i'd throw that in there...
also it randomly returns invalid checksums.
[/quote]

Solution:

Quit using VB. Damn.
June 11, 2007, 4:09 PM
dRAgoN
[quote author=Joe[x86] link=topic=16753.msg169999#msg169999 date=1181578183]
[quote author=brew link=topic=16753.msg169726#msg169726 date=1180995464]
Yeah speaking of which rob's dll doesn't work at all in vb6 when compiled









just thought i'd throw that in there...
also it randomly returns invalid checksums.
[/quote]

Solution:

Quit using VB. Damn.
[/quote]

is that the only constructive comment you can come up with anymore?
June 12, 2007, 3:08 AM
DDA-TriCk-E
Rob's dll does work, you just have to use his bin files (not iagos)
June 12, 2007, 9:40 AM
rabbit
True!  Rob's works.  I pass CR with it just fine, except I get invalid version back :\
June 12, 2007, 12:40 PM
DDA-TriCk-E
Make sure you are using the bin files on his server:

Heres the download to his screen dumps:
http://www.onlythechosen.com/w2bn.bin
http://www.onlythechosen.com/star.bin
http://www.onlythechosen.com/sexp.bin

Updated CheckRevision.dll:
http://www.onlythechosen.com/test/CheckRevision.dll
June 12, 2007, 1:06 PM
rabbit
I'm not retarded.  I'm using his latest CheckRevision.dll and his screen dumps, as well as up-to-date hashes.  I still get 0x101 back.
June 12, 2007, 5:16 PM
BreW
What client are you trying to connect with? I couldn't connect using that dll at all with w2bn, but it works just dandy with sc.. for a while (after oh-so many calls it starts returning invalid results)
June 12, 2007, 11:11 PM
rabbit
I'm using my own hashes for Brood War and Rob's Brood War screen dump.
June 13, 2007, 12:32 AM
DDA-TriCk-E
[quote author=brew link=topic=16753.msg170058#msg170058 date=1181689873]
What client are you trying to connect with? I couldn't connect using that dll at all with w2bn, but it works just dandy with sc.. for a while (after oh-so many calls it starts returning invalid results)
[/quote]
He fixed that when I notified him of it, contact him for the new one, it works fine.
June 13, 2007, 7:18 AM
squeegee
I'd like to tell you all that this is not a real fix


Screen dumps? k
July 5, 2007, 2:41 AM
warz
[quote author=squeegee link=topic=16753.msg170727#msg170727 date=1183603281]
I'd like to tell you all that this is not a real fix
Screen dumps? k
[/quote]

Oh mighty squeegee, what else may you tell us?!
July 5, 2007, 4:53 AM
TheMinistered
Oh mighty dickhead betawarz, what else may you tell us, besides the fact you're a dickhead wannabe?

In reply to Hdx's post on page 1:
[quote]
not sure if hard parts is the right phrase - more like the large parts.
[/quote]

Yeah, so I'm kinda talking without actually having looked at your code or having looked at lockdown in a debugger/disassembler, But why would you only port portions of the code.  It would seem that if you planned on using the DLL you would only port code needed to load and call the dll.

i.e. lets say that the dll have four functions named one, two, three, and four and the application had two functions called load and call, lets say function two is small and the the rest in the dll are large.

it would seem that you should either a) port all the functions so you don't need a dll or b) port the load and call functions from the application.  it would seem a waste of time to only port function one just so you don't have to call it from the dll

I dunno, i'm talking about something i don't entirely know you reasons behind... just seemed illogical to me how you decided to take your approach.  please explain warz ;p thanks
July 5, 2007, 5:47 AM
warz
All-mighty dick head betawarz speaks:

The intention was to convert everything, of course. Naturally, beginning with pure function pointers, and calling required functions, provided lockdown implementations long before the public had them. Converting them one by one to C++ was the next step in the process. Don't try to read between the lines - there's no conspiracy.
July 5, 2007, 6:12 AM

Search