Skip to content

Conversation

@Scags
Copy link
Owner

@Scags Scags commented Aug 10, 2023

Refactors and fixes pretty much everything so that it's more stable. The big differences being

  • Minimal Python 2 support;
    A lot of scripts are now fully reliant on python 3 features (f-strings, ordered dicts, etc.), so if you running a super old IDA version then it might be time to update;
  • Some script renamings;
    findmyfunc, getfuncoffset, and structaligner were kinda silly names so those have been renamed to sigfind, distfromfunc, structfiller respectively;
  • Basic 64-bit support;
    Although some of the scripts are intended for 32-bit, they may now support 64-bit. These worked under minimal 64-bit test cases, so YMMV;

Full changelog:

distfromfunc.py

  • Renamed from getfuncoffset.py;
  • No major changes;

gamedata_checker.py

  • Properly catch the awful vdfparse exception and print it out so that it doesn't take up the entire screen;
  • Format the output better;
  • Signature validation accounts for all executable segments rather than just .text;

isgoodsig.py

  • Signature validation accounts for all executable segments rather than just .text;

makesig.py

  • makesig() now provides formatted output containing mask, raw bytes, regular signature, and SourceMod signature;
  • Minor refactoring and optimization of the makesig() function;
  • Support for wildcarding 64-bit offsets;
  • pyperclip usage for copying the SM sig straight to the clipboard;

makesigfromhere.py

  • See makesig.py;
  • Provides signature offset from start of the function;

nameresetter.py

  • Minor optimizations;

netprop_importer.py

  • Completely rewritten and refactored to be cleaner;
  • Foregoes inner class objects for now and opts for just assigning a member name, needs to be touched on again later;
  • Sped up heavily with a convenient call to idaapi.begin_type_updating();

sigfind.py

  • Renamed from findmyfunc.py;
  • No major changes;

sigsmasher.py

  • makesig() + is_good_sig() optimized to use a trie to speed up signature validation;

structfiller.py

  • Renamed from structaligner.py;
  • Sped up heavily with a convenient call to idaapi.begin_type_updating();

symbolsmasher.py

  • No major changes for now;

vtable_io.py

  • Completely rewritten and refactored to be cleaner;
  • Now properly parses typeinfo objects to discover virtual tables, rather than parsing names of IDA labels;
  • Perfected overload discovery method to properly comprehend inherited overloads (this is no longer a problem);
  • Improves name translation between Windows and Linux;
  • Improved UI options and features for running the script;
  • About as perfect as you can get it. In TF2, I only found 2 functions and 1 vtable that were incorrect (out of 15000+);

vtable_structs.py

  • Completely rewritten and refactored to be cleaner;
  • Utilizes vtable_io's vtable discovery method to properly find and parse vtables;
  • Assigns the proper type to a structure member, so pseudocode will usually have the proper syntax for invocation of the function;
  • Needs to be touched on again at some points. IDA is capable of ignoring vtable struct member references in pseudocode and opts to directly invoke the function with the header parsing feature. This is surely recreatable from the API side, but needs more research and work;

Misc. additions

  • IDA waitbox API has been wrapped in a more feasible class that cleans up its usage. Seen in applicable scripts;
  • Larger scripts are in try/except blocks to prevent any major problems alongside instructions to file a bug report;

@Scags Scags marked this pull request as ready for review August 16, 2023 22:24
@Scags Scags merged commit 1dbf407 into master Aug 16, 2023
@Scags Scags deleted the refactor branch August 16, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants