Raised This Month: $32 Target: $400
 8% 

Lysis: An experimental .smx decompiler


Post New Thread Reply   
 
Thread Tools Display Modes
sahapro33
Member
Join Date: Mar 2014
Old 03-06-2016 , 13:18   Re: Lysis: An experimental .smx decompiler
Reply With Quote #271

Decompile this test plug-in!
Attached Files
File Type: smx test.smx (3.4 KB, 217 views)
sahapro33 is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-06-2016 , 15:11   Re: Lysis: An experimental .smx decompiler
Reply With Quote #272

Quote:
Originally Posted by sahapro33 View Post
Decompile this test plug-in!
So what exactly did you do to get an opcode "stackadjust"?
PHP Code:
/* ERROR PREPROCESSING! java.lang.Exception: Unrecognized opcode: stackadjust */
 
function "bh" (number 1
Edit: stackadjust was nuked from SM 1.8

Last edited by WildCard65; 03-06-2016 at 15:21.
WildCard65 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 03-06-2016 , 16:13   Re: Lysis: An experimental .smx decompiler
Reply With Quote #273

This shit is pointless, there are only three ways it can go:
  1. Lysis is updated to handle decompiling the modifications made to the plugin.
  2. SourceMod is updated to reject loading plugins where modifications have been made to break Lysis.
  3. Both of the above.
Eventually they will converge, and all plugin binaries will either be fully decompilable by Lysis or not load.
__________________
asherkin is offline
SourceSamil
Junior Member
Join Date: Feb 2016
Old 03-07-2016 , 02:57   Re: Lysis: An experimental .smx decompiler
Reply With Quote #274

Decompile that's pls
Attached Files
File Type: smx global.smx (396.2 KB, 200 views)
SourceSamil is offline
sahapro33
Member
Join Date: Mar 2014
Old 03-07-2016 , 05:58   Re: Lysis: An experimental .smx decompiler
Reply With Quote #275

Quote:
Originally Posted by WildCard65 View Post
So what exactly did you do to get an opcode "stackadjust"?
PHP Code:
/* ERROR PREPROCESSING! java.lang.Exception: Unrecognized opcode: stackadjust */
 
function "bh" (number 1
Edit: stackadjust was nuked from SM 1.8
PHP Code:
public OnPluginStart() GroupId:CreateAdmGroup(""); 
sahapro33 is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-07-2016 , 07:26   Re: Lysis: An experimental .smx decompiler
Reply With Quote #276

Quote:
Originally Posted by SourceSamil View Post
Decompile that's pls
PHP Code:
// Bad section size for section .tags. Trying to repair.
// Unknown section ".".
// Recovered name of previous section as ".___.natives".
// Unknown section "".
// Recovered name of previous section as "_dbg.info".
// Missing section ".dbg.info".
// Missing section ".dbg.natives".
// Section "_dbg.info" is probably (0.857143) missing section ".dbg.info".
// Section ".___.natives" is probably (0.600000) missing section ".dbg.natives". 
WildCard65 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-07-2016 , 08:12   Re: Lysis: An experimental .smx decompiler
Reply With Quote #277

Quote:
Originally Posted by sahapro33 View Post
Decompile this test plug-in!
PHP Code:
public bh()
{
    if (
GetRandomInt(56) == 4)
    {
        
CreateAdmGroup("ddd");
    }
    return 
0;

Quote:
Originally Posted by SourceSamil View Post
Decompile that's pls
That runs into an infinite loop because i didn't get to finish |break| and |continue| support in loops yet i guess. That's why some of the switches get so insanely large too, because they include the same blocks multiple times. I'll see if i get time to tackle them again anytime soon..

EDIT: Well, i took the time now. Here's what it might look like.
Attached Files
File Type: zip global.zip (221.2 KB, 192 views)
__________________

Last edited by Peace-Maker; 03-07-2016 at 11:37.
Peace-Maker is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 03-10-2016 , 07:18   Re: Lysis: An experimental .smx decompiler
Reply With Quote #278

Quote:
Originally Posted by asherkin View Post
This shit is pointless, there are only three ways it can go:
  1. Lysis is updated to handle decompiling the modifications made to the plugin.
  2. SourceMod is updated to reject loading plugins where modifications have been made to break Lysis.
  3. Both of the above.
Eventually they will converge, and all plugin binaries will either be fully decompilable by Lysis or not load.
Why not just have all compiled plugins also contain a compressed copy of the plaintext SP, as well as checksums for the SP and binary data?
You can build in legacy support for this by having old plugins run through lysis and be repacked in this manner as they are first loaded.

If the plugin isn't correct, don't allow it to run.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 03-11-2016 , 06:42   Re: Lysis: An experimental .smx decompiler
Reply With Quote #279

Quote:
Originally Posted by friagram View Post
Why not just have all compiled plugins also contain a compressed copy of the plaintext SP, as well as checksums for the SP and binary data?
You can build in legacy support for this by having old plugins run through lysis and be repacked in this manner as they are first loaded.

If the plugin isn't correct, don't allow it to run.
1) Server gets compromised
2) Private plugins in the form of binaries are acquired
3) Profit.


now they have to decompile & actually do work to "steal" a binary
__________________
ImACow is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 03-11-2016 , 22:09   Re: Lysis: An experimental .smx decompiler
Reply With Quote #280

Quote:
Originally Posted by ImACow View Post
1) Server gets compromised
2) Private plugins in the form of binaries are acquired
3) Profit.


now they have to decompile & actually do work to "steal" a binary
2 won't happen without 1. This is in no way a good reason for why this shouldn't be done.
__________________
Dr. McKay is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode