Psychosanty.com Forum Index Psychosanty.com
Psychosanity
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BUG - Program leaves whitespace in certain functions pls fix

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Psychosanty.com Forum Index -> ExtProtect
View previous topic :: View next topic  
Author Message
PlsFixWhiteSpaceBugASAP
Guest





PostPosted: Mon Jun 21, 2004 4:01:56 PM    Post subject: BUG - Program leaves whitespace in certain functions pls fix Reply with quote

:shock: Code snippet of a protected map (using ur protector):
Code:
call SetPlayerRaceSelectable(Player(10),false)
 call SetPlayerController(Player(10),MAP_CONTROL_USER)
 
 call SetPlayerStartLocation(Player(11),11)
 call SetPlayerColor(Player(11),ConvertPlayerColor(11))
 call SetPlayerRacePreference(Player(11),RACE_PREF_NIGHTELF)
 call SetPlayerRaceSelectable(Player(11),false)
 call SetPlayerController(Player(11),MAP_CONTROL_USER)
endfunction
function O306558 takes nothing returns nothing
 
 call SetPlayerTeam(Player(1),0)
 call SetPlayerTeam(Player(2),0)
 call SetPlayerTeam(Player(3),0)
 call SetPlayerTeam(Player(4),0)
 call SetPlayerTeam(Player(5),0)
 call SetPlayerTeam(Player(6),0)
 call SetPlayerTeam(Player(7),0)
 call SetPlayerTeam(Player(8),0)
 call SetPlayerTeam(Player(9),0)
 call SetPlayerTeam(Player(10),0)
 call SetPlayerTeam(Player(11),0)
 
 call SetPlayerTeam(Player(0),1)
endfunction
function O310632 takes nothing returns nothing
 call SetStartLocPrioCount(0,2)
 call SetStartLocPrio(0,0,2,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrio(0,1,6,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(1,9)
 call SetStartLocPrio(1,0,0,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrio(1,1,2,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrio(1,2,3,MAP_LOC_PRIO_LOW)
 call SetStartLocPrio(1,3,4,MAP_LOC_PRIO_LOW)
 call SetStartLocPrio(1,4,5,MAP_LOC_PRIO_LOW)
 call SetStartLocPrio


so if u could fix the whitespace thing that would b good
and the source code isent compling on my compilter so if u could check that the source on ur website does infact compile that would b good 2
also thx for ur program bc its good.

kthxbye 8)
Back to top
Guest






PostPosted: Mon Jun 21, 2004 4:13:17 PM    Post subject: Reply with quote

also i was wondering if you could release a light version of ExtProtect
-Takes map file
-Obfusciates Jass
-Saves mapfile in same directory as origional w/ a p added on the end before the file extension

This way the user just needs to enter in the map file and click a little button and then a nice protected map pops out. I would do it myself but I'm having trouble compiling the source and am a noob :)

So if you have a min and wanna release a light version :D

thanks for your time!!
Back to top
Extrarius
Site Admin


Joined: 01 Mar 2004
Posts: 20

PostPosted: Thu Jun 24, 2004 12:21:45 AM    Post subject: Reply with quote

Sorry to dissapoint, but basically I'm not adding any new features to ExtProtect(like a command line version) and I'm only fixing bugs that actually have an impact on its usefulness. A few extra whitespace doesn't hurt anybody, and neither does having to click the buttons.

Another bug I know about that I'm probably not going to bother fixing is that if you try to protect a map that is still open in the editor, the program will crash instead of just displaying a message box telling you the map is in use by another program. Again, it doesn't effect the use of the program since you can just close the map in WE and rerun extprotect.


What compiler are you using and what kind of errors are you getting? I use Microsoft Visual C++ 7.0 and I justed tested compiling using the project file in the zip and it successfully compiled and ran.
It should work in 6.0 too since I don't think I use any new features or functions. If you don't have a microsoft compiler, you can download one for free from their website at http://msdn.microsoft.com/visualc/vctoolkit2003/. It includes the compiler from Visual Studio 7.1, but does not have an IDE so you will need to use the command line options. According to MSVC, the current command line options to the compiler are:
Code:
/O2 /Og /Ob1 /Oi /Os /Oy /GL /GA /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /GF /FD /EHsc /ML /GS /Gy /Fo"Release/" /Fd"Release/vc70.pdb" /W3 /nologo /c /Wp64 /Zi /TP

and the commandline to the linker is
Code:
/OUT:"Release/ExtProtect.exe" /INCREMENTAL:NO /NOLOGO /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /MACHINE:IX86   kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Back to top
View user's profile Send private message
Extrarius
Site Admin


Joined: 01 Mar 2004
Posts: 20

PostPosted: Tue Jun 29, 2004 12:39:36 AM    Post subject: Reply with quote

Ok, so I lied:
While such 'fluff features' are not a prority at all, I noticed that after making some changes to fix some bugs for the latest version, fixing the whitespace removal would be trivial. Thus, in the latest version, much more whitespace is removed.
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Jul 11, 2004 7:09:22 PM    Post subject: Reply with quote

omg, thank u!!!!! :P
Back to top
Guest






PostPosted: Sun Jul 11, 2004 7:24:13 PM    Post subject: Reply with quote

can't find the edit button so yes this is a double post :shock:

are u aware of the various ways to enable readonly protection:?: its trivial to remove as it invloves just deleting the lines of code that check if the maps been saved and it might not be around forever as it relys on how the world editor saves maps but it works quite nicly. the point of ur prog is to keep the credit thievs out, i think readonly protection would do that well. even with an exprotected map people can still edit the wc3map jass file quite easily and not to mention rename all the auther fileds n stuff. all exprotect does is make it hard to read the triggers, they are still very readable. so taking that all into consideration you might want to check out the various read only methods out there.

i have a request if u dont mind, i looked thru the source (w/ notepad) to try and find the algorithm that renames the variables and removes the whitespace from the war3map.j file and i couldent find it. could you please just copy and paste the bit of code that does that? i know you updated it so it fixes the whitespaces and im eager to look at it but i dont have the softwhere to read the source stuff.

thanks. 8)
Back to top
Extrarius
Site Admin


Joined: 01 Mar 2004
Posts: 20

PostPosted: Sun Jul 11, 2004 7:59:28 PM    Post subject: Reply with quote

I hate having old versions of the source around, so I'd rather not paste it. You can find hte function on line 108 of ExtProtect CPP, and the signature looks like:

char * ObfuscateJass(char *data, size_t len)

That function renames all variables and removes comments and extra whitespace.
Back to top
View user's profile Send private message
Extrarius
Site Admin


Joined: 01 Mar 2004
Posts: 20

PostPosted: Mon Jul 12, 2004 10:31:52 PM    Post subject: Reply with quote

A big problem with 'read-only' protections is that it takes about 0.001% of the work to break them as compared to breaking what I have now. Of course, there are unprotectors that work on TFT now, so I'm working on improving my current methods even more.
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Jul 16, 2004 2:49:40 PM    Post subject: Reply with quote

so true, well thanks for a great program and all of your help!
:D
Back to top
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Psychosanty.com Forum Index -> ExtProtect All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group