Page 1 of 1

What modules/units are available in Stealth's Pascal Script?

Posted: 17.05.2020 20:51
by Chad Joan
What modules/units are available in Stealth's Pascal Script?

I've been able to put SysUtils without error, ex:
Program MyProgramName;
Uses SysUtils;
But many other things from Pascal examples online are not working. Ex: System.IOUtils, System.Generics.Collections, System.(anything really), IOUtils, Classes, and so on.

Trying to put 'System' or anything within 'System' into my 'Uses' clause causes this error:

Code: Select all

Compiler: [Error] at (3,2): Duplicate identifier 'TComponentStateE'
Trying to put System modules directly into the 'Uses' clause without the 'System' part of the path results in "not found" errors.
For example:

Code: Select all

Program MyProgramName;
Uses IOUtils;
results in
Compiler: [Error] at (3,2): Unit 'IOUtils' not found or contains errors
So I've guessed-and-checked a few of these, but I don't no how to list or enumerate what's available.

Thanks!

Re: What modules/units are available in Stealth's Pascal Scr

Posted: 19.05.2020 20:18
by Vizit0r
because this units are from delphi, most of this classes can be imported with stronh limitations, and some of them can be imported at all.
Pascal Script can't import overloaded methods, dont know about Pointers, etc. etc.

If you really need to use all this - better to use excternal Delphi scripts.

Re: What modules/units are available in Stealth's Pascal Scr

Posted: 20.05.2020 22:32
by Chad Joan
That does make sense as a limitation for sake of security. Thanks for the info!

If I needed to, how would I use external Delphi scripts?

I'm wondering if the stealth_script.pas file in Stealth's root directory would allow me to expose things for my scripts, including .DLLs. Maybe that would be how to use external Delphi scripts, but I am not sure.

Re: What modules/units are available in Stealth's Pascal Scr

Posted: 26.05.2020 6:23
by Vizit0r
http://stealth.od.ua/forum/viewtopic.php?f=6&t=2569

if some question - find me in Discord, that will be much faster.

Re: What modules/units are available in Stealth's Pascal Scr

Posted: 26.05.2020 9:56
by Chad Joan
I think I get it.

I suspected that magic was around here somewhere. That topic / thread looks like very helpful information.

In my other thread, I was contemplating making a daemon or service to use Win32 API if I couldn't do it from Stealth scripts directly. This might be better: just put a .dll and have a script call it and feed it data.

Thanks again!

Re: What modules/units are available in Stealth's Pascal Scr

Posted: 26.05.2020 11:35
by Vizit0r
make this from external script will be much easier for you