Closed sudofez closed 6 years ago
DPIRuleRetrieve(int id, string sid) accepts an integer which matches the ID field of the DPIRuleTransport object not the identifier. The ID is a unique ID; the identifier is the rule number displayed in the GUI. So for instance if you want to call DPIRuleRetrieve for the rule identifier 1000456 in your example, you would call DPIRuleRetrieve(1, $SID).
Hopefully that helps.
Ah, I understand. $_.ID works! I stopped reading the properties as soon as I saw "identifier". Thanks for your help.
I'm trying to return the values of a specific rule and noticed I wasn't getting the values I expected. Can you please help?
Code executed:
Results:
I have also tried using the following with DPIRuleRetrieveByName but I get the same incorrect result:
$DSM.DPIRuleRetrieveByName("Calendar Remote Code Execution Vulnerability", $SID)
If I loop through the rules list and print out the result equal to the identifier I get the right values: