Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Jack

How to lock a cs file?

Recommended Posts

Jack

I know that this question has been asked for several times and yes I did read those topics but I still don't know how to do it. I tried to create a new label with a hex but the file is still decompiling with no problems. So what should I do?

Edited by JACK JONES

Share this post


Link to post
Share on other sites
Michael-Knight1
I know that this question has been asked for several times and yes I did read those topics but I still don't know how to do it. I tried to create a new label with a hex but the file is still decompiling with no problems. So what should I do?

you must create your own opcode to lock the cleo file confused.gif

But Can Be Open , Just when Ignore Unknown

Share this post


Link to post
Share on other sites
Jack

I don't know how to do that. Can you share the knowledge?

Off topic: Are you really MK1 (the one that has those posts full of comedy that make us laugh so hard) or you just using similar name?

 

 

Share this post


Link to post
Share on other sites
Michael-Knight1

 

I don't know how to do that. Can you share the knowledge?

Off topic: Are you really MK1 (the one that has those posts full of comedy that make us laugh so hard) or you just using similar name?

Yes , That's Me But Many Ppl Know Michael Knight From KR 80's lol...

ok simple , Go To This Topic http://www.gtaforums.com/index.php?showtopic=362463

 

don't forgot Download Quick Opcode

Edited by Michael-Knight1

Share this post


Link to post
Share on other sites
Jack

Thanks but that's for San Andreas. I need it for Vice City?

So you are a German. I guess the fellows were right - you are definitly not from America. Okey - tell us something on germany.

Share this post


Link to post
Share on other sites
Michael-Knight1

 

Thanks but that's for San Andreas. I need it for Vice City?

So Just Use Microsoft Visual Studio C++ tounge.gif

 

So you are a German. I guess the fellows were right - you are definitly not from America. Okey - tell us something on germany.

OH rolleyes.gifrolleyes.gif ! All People Know This now tounge.gif

Edited by Michael-Knight1

Share this post


Link to post
Share on other sites
Bad.boy!

@MK Could you write a few sentences in German, about how to use a toilet*?

*About a toilet because there isn't an example of that for you to copy

 

@OP

Ignore him, just put hex between jumps.

 

Something like this:

 

thread "lock":startjump @codehex   BB 01 02 end:CODE// bla bla

 

Edited by Bad.boy!

Share this post


Link to post
Share on other sites
LINK/2012

lol, no need to download new opcodes, just insert a invalid in the hex block

 

hexFFFF01end

 

 

But that thing is so easy to bypass...

Share this post


Link to post
Share on other sites
Jack

Look I know it's gonna sound strange but it's not working. And I already tried it before - I put the invalid hex after jump but my SB decompils with no problem ("ignore unknown" was not checked!). Does this method work only with "high level coding" (or a hard coding) that SilentPL is using in his replies? Because I still didn't learn that sort of coding. Speaking of which - where can I find the tutorial and why is that method better than the easy coding?

 

Edited by JACK JONES

Share this post


Link to post
Share on other sites
LINK/2012

No, this doesn't has nothing to do with high-level, high-level will be translated to low-level by the compiler anyway, it's just clear and easiest to understand, also I don't know why III Coding Community worry too much about high-level, it's so simple.

 

Did you tried my post?

I tried badboy version and decompiled well, I think badboy have some mistake, because 01BB opcode exist tounge.gif

Share this post


Link to post
Share on other sites
Jack

 

Did you tried my post?

Yes I did but the same thing happend.

 

I tried badboy version and decompiled well, I think badboy have some mistake, because 01BB opcode exist

What do you mean - I don't see that opcode in his post?

Share this post


Link to post
Share on other sites
Bad.boy!

Didn't notice, and I just digged trough my old post and came up with a good example:

 

 

Actually, I would encourage people NOT to lock their scripts, it allows others to take a look and learn from it. And even if you lock your script, it can still be stolen.

 

But, there's one simple way, and it's simple to by-pass. Just add new label somewhere, some random hex-code in there and compile. But remember, there should NOT be any jumps to that label, otherwise it'll crash.

Not some random hex, you have to fool Sanny Builder.

 

Here is an example:

 

{$CLEO .cs}0000::STARTjump @ACTUAL_CODEhex   A4 03 09 48 41 48 41 00end:ACTUAL_CODE// Random opcodes to show the result0003: shake_camera 40 0007: [email protected] = 0.0 000D: $TEMPVAR_Z_COORD -= 0.5 jump @START

 

 

It will decompile in this:

 

{$CLEO .cs}//-------------MAIN---------------0000: NOP 0002: jump @HAHA_17 03A4: name_thread 'HAHA' 0728: NOP 0300: unsupported_in_sa 0007: 0.0 = [email protected]([email protected],6i) 0000: NOP 023F: unsupported_in_sa hex00 01 FE FF FF FF

 

 

But the best thing to do is to report the mod stealers and keep your files open. Looking at examples can help people.

Share this post


Link to post
Share on other sites
Jack

I red that topic before I even start mine and it didn't help me either. I compiled your whole code as a new scrypt for SA and the SB is decompiling. I'm doing something wrong. What does this mean: "// Random opcodes to show the result"? Should I somehow convert that hex value into the 4byte and store it into a variable or what?

 

Share this post


Link to post
Share on other sites
Bad.boy!

No, that was just to show the result. You just have to insert hex between every jump.

 

Like this:

 

{$CLEO .cs}0000::STARTjump @ACTUAL_CODEhex  A4 03 09 48 41 48 41 00end:ACTUAL_CODE0003: shake_camera 400007: [email protected] = 0.0000D: $TEMPVAR_Z_COORD -= 0.5jump @NEXThex  A4 03 09 48end:NEXT0687: clear_actor $PLAYER_ACTOR task 0689: set_car [email protected] remove_componentA 1 visible_effect_flag 0 068D: get_camera_position_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 0698: set_car [email protected] repair_componentB 4 if0686:   car [email protected] attached jf @NEXT2hex    D2 06 09 6Fend:NEXT2068E: get_camera_target_point_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 0698: set_car [email protected] repair_componentB 4 jump @ACTUAL_CODE

 

 

If someone tries to open your script with "ignore unknown" they'll see this:

 

{$CLEO .cs}//-------------MAIN---------------0000: NOP 0002: jump @HAHA_17 03A4: name_thread 'HAHA' 0728: NOP 0300: unsupported_in_sa 0007: 0.0 = [email protected]([email protected],6i) 0000: NOP 023F: unsupported_in_sa hex00 01 CC FF FF FFend03A4: name_thread 'H‡' hex03 5F 2C 01end0698: set_car [email protected] repair_componentB 4 00D6: if 0686:   car [email protected] attached 004D: jump_if_false @HAHA_104 06D2: 'oŽ$(,˜' = -1744753662 // @v = string 0306: unsupported_in_sa 021F: unsupported_in_sa 0404: unsupported_in_sa 0002: jump @HAHA_17 

 

 

As some people might have noticed I always enter a opcode and a string. Sanny Builder will think that the next 8 bytes will be text, but it is code so SB get's confused. But after a few opcodes it'll read normal again and you have to put new hex, as you can see in the above example.

Share this post


Link to post
Share on other sites
Jack

I understand what you did - you converted the opcodes that SB cannot recognize to hex and puted them between jumps in order to prevent normal decompiling. But it ain't gonna work again. I compiled that code you gave me but still nothing (I had to change the local variables because the SB didn't wanna compile the number higher then 33).

 

Edited by JACK JONES

Share this post


Link to post
Share on other sites
Ashwin.Star

i know some Good Tricks

Check your inbox wink.gif

Share this post


Link to post
Share on other sites
aStiffSausage
i know some Good Tricks

Check your inbox wink.gif

Sweet! wow.gif

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Oh yeah, you only gave those tips for him, and not for public where even more people could learn from...

Share this post


Link to post
Share on other sites
Ashwin.Star

first thing is Script can't be Locked,

they can only be encrypted so that Game can understand it but not the Decompiler,

Secondly, no matter How hard a Modder try t encrypt his Code,

others can still Read it after Spending a little to MORE time,

 

Let me Share some info

 

Here is my first script that i had Tried to LOCK (U KNO WT I MIN)

http://ashwin.dmon.com/external/BLOWALL.cs

it simply Change 'BIGBANG' to 'BLOWALL' (VC Cheat)

& Explode all vehicles Except your

 

spend some Minutes by Decompiling,

tell me if u like the Trick & want to know

PM me if you already know,

Share this post


Link to post
Share on other sites
Wesser

I wouldn't say it on public cause I'm in favour of Open Sourcing, but the XOR encryption/decryption is just right for you. It inverts each byte bits according to a magic keyword which nobody knows. Ofcourse, you need to build an ASI plugin to decrypt the encripted scripts before the game parse them. Follow this video for more information.

 

It may be a feature of NSB. I'll think about it.

Edited by Wesser

Share this post


Link to post
Share on other sites
Bad.boy!

@Wesser

I won't do that if I were you. Encrypting a cleo file is overkill. If someone wants to copy and publish it on another site, they will. If someone wants to edit it a bit to make it look like they made it, they won't get past the corrupt hex. Also if you give someone the possibility to easily lock their mods, they will. Even for the most simple mods they'll encrypt it. In that way no one can learn from mods anymore. And how did you want to do it anyway, it'll take one asi per mod/author. Or you do it in one asi, so that you have to write the password somewhere.

 

@Ashwin

 

I tried badboy version and decompiled well, I think badboy have some mistake, because 01BB opcode exist

What do you mean - I don't see that opcode in his post?

If he can't see opcodes in hex, it'll be impossible to make your script. And he asked how to lock it, not how to unlock it.

 

@JACK JONES

 

I compiled that code you gave me but still nothing (I had to change the local variables because the SB didn't wanna compile the number higher then 33).

 

Could you post the decompiled code? Or is compiling the problem?

 

@People who are still reading

 

This is a spoiler! Don't scroll down if your planning to decompile Ashwin's code. (scroll down fast)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0000:

05DF: write_memory 6849967 size 1 value 88 virtual_protect 0

05DF: write_memory 6849968 size 1 value 92 virtual_protect 0

05DF: write_memory 6849969 size 1 value 103 virtual_protect 0

05DF: write_memory 6849970 size 1 value 69 virtual_protect 0

 

:NONAME_92

0001: wait 0 ms

00D6: if

00E0: player $PLAYER_CHAR driving

004D: jump_if_false @NONAME_92

03C1: [email protected] = player $PLAYER_CHAR car

 

:NONAME_120

00D6: if

00E0: player $PLAYER_CHAR driving

004D: jump_if_false @NONAME_181

0001: wait 0 ms

00D6: if

05EE: key_pressed 76

004D: jump_if_false @NONAME_120

03F5: set_vehicle [email protected] apply_damage_rules 0

0001: wait 5000 ms

03F5: set_vehicle [email protected] apply_damage_rules 1

0002: jump @NONAME_120

 

:NONAME_181

01C3: remove_references_to_car [email protected] // Like turning a car into any random car

0002: jump @NONAME_92

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

END

Share this post


Link to post
Share on other sites
Jack

First I want to thank you all for helping me.

 

Could you post the decompiled code? Or is compiling the problem?

Now I compiled it for VC (unlike the last time when I compiled it for SA) and here it is:

 

// This file was decompiled using vicescm.ini published by GtaForums.com on 27.7.07{$VERSION 2.2.0000}{$CLEO .cs}//-------------MAIN---------------0000: jump @NONAME_17 hexA4 03 09 48 41 48 41 00end:NONAME_17Camera.Shake(40)[email protected] = 0.0 // floating-point values $TEMPVAR_Z_COORD -= 0.5 // floating-point values jump @NONAME_52 hexA4 03 09 48end:NONAME_520687: 0689: 068D: 0698: if 0686: jf @NONAME_77 hexD2 06 09 6Fend:NONAME_77068E: 0698: jump @NONAME_17

 

I had no problems with compiling ([email protected], [email protected], [email protected] are also compiled which is unknown to my coding experience).

Problems: Besides the game crashing the code decompils without any error massages but it's not like your decompiled code Bad.boy! - I mean you wrote in a hex block this: "D2 06 09 6F" so I kind of expected 06D2 opcode in a decompiled text but as you can see it isn't there. Other thing is that the opcode names are still vissible - I don't want to see them after decompiling. And yes I understand that my scrypts are not so great as I think but I still want to lock them because they are mine. And if some newby wants to open and edit my cs files then he should talk to me first.

 

 

Share this post


Link to post
Share on other sites
Bad.boy!

That code was just an example. The opcodes I use were there to show the result. If you run it, it'll crash. You need to insert hex between your code. And it didn't work out well for VC because the scripts are different than SA. You could try Ashwin's method.

Share this post


Link to post
Share on other sites
Jack

Thanks I'll try. Can anyone tell me how can I convert easy code to hard code.

Edited by JACK JONES

Share this post


Link to post
Share on other sites
LINK/2012

What is easy code and hard code? Do you mean low-level and high-level? Ah, high-level is meant to be the "easy code" here tounge.gif

 

Nothing to tell, just do some code in high-level and decompile, see how it is going to be...

 

like a simple loop:

 

:MyLoopwait 0jump @MyLoop

 

 

while true  wait 0end

 

 

Look at sanny help, there's a doc about the high-level statements.

 

 

 

Share this post


Link to post
Share on other sites
Jack

SB always decompils this:

 

:MyLoopwait 0jump @MyLoop

 

Is there a way I could force SB to decompils from the upper code to this:

 

while true  wait 0end

 

Share this post


Link to post
Share on other sites
Ashwin.Star

@B.B

<<--- removed --->>

 

@Topic

making a tutorial about Small tricks that can stop newbie to misuse our Script,

JJ, you know where it will be

Share this post


Link to post
Share on other sites
Jack

Yes I do and thanks.

Share this post


Link to post
Share on other sites
LINK/2012

 

Is there a way I could force SB to decompils from the upper code to this:

No, Sanny don't support high-level decompilation.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.