Raised This Month: $ Target: $400
 0% 

[TOOLS] PySMX: Python SourcePawn Plug-in Reader and Abstract Machine


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
theY4Kman
Join Date: Jun 2007
Location: Yak
Old 07-11-2012 , 06:46   [TOOLS] PySMX: Python SourcePawn Plug-in Reader and Abstract Machine
Reply With Quote #1

I've written a little Python module which ports a tiny fraction of the decompiler packaged in the sourcemod source. I wrote it to extract the `myinfo` struct from compiled plug-ins for a plug-in auto-updater. Maybe you can find it useful as well.

You can find it at https://github.com/theY4Kman/pysmx. To use it:
Code:
import smx
with open('myplugin.smx', 'rb') as fp:
    plugin = smx.SourcePawnPlugin(fp)
    print plugin.myinfo
UPDATE (7/19/2012): the abstract machine runs plug-ins that are a tad more complicated. 77/176 opcodes complete. Managed Python stack. Can match actual instructions executed to .asm files (spcomp -a). PySMX's PrintToServer matches SourceMod's (except 'L', 'N', 'T', 't').

UPDATE (7/15/2012): PySMX now includes a very basic abstract machine, and can execute the test plug-in provided with it. The new features can be found in the racecondition branch.
__________________
http://y4kstudios.com
Is that loud enough? Oh, while I have you, check out Viper.

Last edited by theY4Kman; 07-19-2012 at 22:06. Reason: Improved abstract machine
theY4Kman is offline
Send a message via ICQ to theY4Kman Send a message via AIM to theY4Kman Send a message via MSN to theY4Kman Send a message via Yahoo to theY4Kman Send a message via Skype™ to theY4Kman
 



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 22:51.


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