What Input parameters are available during a Pre Execution pattern script

Patrick Oudshoo
Tera Contributor

Hi all,

Does anybody know what Input parameters are available during a Pre Execution script?

I would like to know the IP Address (hostIP) before the execution of the Pattern and based on this IP make the Pattern execute specific steps.

The Pre Execution script 'Lightweight Process Info' is for example check 2 input parameters; 'pre_exe_computer' and 'pre_exe_pid'.

Anyway to get a hold on the hostIP in the Pre Execution?

Cheers, Patrick

1 ACCEPTED SOLUTION

So not sure if this something good but I was able to get below to work. 

 

var test = g_probe.getEccQueueRecord();
gs.info('PD: JSON == '+test.source);

View solution in original post

8 REPLIES 8

Well now we have the full use case Ill see what I can dig up. What version on you on?

So not sure if this something good but I was able to get below to work. 

 

var test = g_probe.getEccQueueRecord();
gs.info('PD: JSON == '+test.source);

Hi Patrick,

This is PERFECT!
Never thought about using the g_probe object, but it works perfectly.

Now using: var managementIpAddress = g_probe.getParameter("source");

Thanks once more!

Cheers, Patrick

 

davidthom_
Tera Contributor

Hi everyone,

I have the exact same request. The solution proposed here is perfect, except for a few cases where the CredentialLess pattern is launched just after the Shazzam. In this case, the g_probe.getParameter("source") value contains "See payload" (the value obtained from the Shazzam sensor because Shazzam can be common to multiple IP address discoveries)
Would we have a way to retrieve the contextual values relating to the pre execution script, in particular the IP address?

This value is somehow passed to the pattern for execution.

Cheers, David

 

 

davidthom__0-1705672017833.png

 

davidthom__1-1705672049675.png