SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 13/06/2017, 10:34 AM   #1
VVWVV
Big Clucker
 
Join Date: Jun 2015
Posts: 141
Reputation: 70
Default TDW RScan - Simple scanner

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
VVWVV is offline   Reply With Quote
Old 13/06/2017, 10:44 AM   #2
Eoussama
High-roller
 
Eoussama's Avatar
 
Join Date: Jul 2016
Location: Kingdom of Morocco // Tangier
Posts: 1,076
Reputation: 283
Default Re: TDW RScan - Simple scanner

This actually is useful, ty
__________________

|===[Web taxi]===|
List of my work
Github
Pastebin

|===[Interesting topics]===|
Semantic Versioning
Eoussama is offline   Reply With Quote
Old 13/06/2017, 06:26 PM   #3
SimonItaly
Huge Clucker
 
SimonItaly's Avatar
 
Join Date: Mar 2010
Location: 🇪🇺 🇮🇹
Posts: 237
Reputation: 87
Default Re: TDW RScan - Simple scanner

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.
__________________

Last edited by SimonItaly; 15/06/2017 at 02:26 PM. Reason: Update with testing results
SimonItaly is offline   Reply With Quote
Old 19/07/2017, 03:21 PM   #4
Freedom.
Big Clucker
 
Join Date: Oct 2012
Posts: 126
Reputation: 12
Default Re: TDW RScan - Simple scanner

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

recursion detected: function 18720 indirectly calls itself
Freedom. is offline   Reply With Quote
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
police scanner filterscript patpat99 General 4 04/10/2013 10:25 PM
[Tool/Web/Other] PAWN Scanner - Scan PAWN files for information. Slice Tools and Files 10 15/07/2012 07:09 PM
AVG Scanner - Detects SA-MP.exe as malware caion Client Support 7 08/06/2010 01:15 PM


All times are GMT. The time now is 08:12 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.