[Include] TDW RScan - Simple scanner
#1

TDW RScan
Description
This is a simple recursive scanner to detect recursive functions in scripts.
Functions
  • RScan_Run(address = 0)
  • addressofex()
Dependencies
amx_assembly
Example
PHP Code:
forward public func1();
forward public func2();
main() {
    
RScan_Run();
    goto 
___avoid_recursion;
    
func1();
___avoid_recursion:
}
func1() {
    
func2();
}
func2() {
    
func1();

Output:


Download
github
Reply
#2

This actually is useful, ty
Reply
#3

I've been looking for something like that for ages. Literally.
I'll give it a try, thank you.

__________________________________________________

Edit after some messing with this:

First of all, when I tried compiling I got these warnings


Apparently my compiler doesn't like your indentation, so I changed lines 150-153 with the following:


Then I've tried to run it, but I got this runtime error:


So I changed this costant to '40':


Anyway, I didn't thought running this script on a 198'124 lines modular gamemode would have been a resource killer:


So I've stopped waiting after 10 minutes because my i7-4600U laptop was frying


I don't know if it's feasible to run the scanner on very large script like this, but I'll give it a try on my desktop sometime soon.
Anyway I've tested with some minor scripts and it works, even if it shows function names only for 'public' functions.
Reply
#4

Perfect I was looking for. It wrote something like that.

recursion detected: function 18720 indirectly calls itself
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)