- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2020 02:32 AM
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
Solved! Go to Solution.
- Labels:
-
Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2020 09:37 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2020 07:26 AM
Well now we have the full use case Ill see what I can dig up. What version on you on?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2020 09:37 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2020 11:44 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2024 09:20 AM
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