Brocade Virtual ADX OpenScript API Guide (Supporting ADX v Bedienungsanleitung Seite 128

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 132
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 127
116 Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
9
Example
In the following example, the script changes the maximum match size during payload matching
from the default value of 1024 to 512.
OS_PAYLOAD_INSPECT::disable ()
Disables payload inspection for the current transaction.
Context
This function can be called from any event.
Usage
This API is used for disabling payload inspection within a transaction. For example, a payload
inspection for an HTTP transaction can be disabled in a matched event handler.
Example
use OS_HTTP_RESPONSE;
use OS_PAYLOAD_INSPECT;
sub HTTP_RESPONSE {
if (OS_HTTP_RESPONSE::content_type =~ /text/) {
OS_PAYLOAD_INSPECT::match_size(512);
OS_PAYLOAD_INSPECT::substitute(
‘credit*card=[0-9]{32}’,‘#### ####’,
‘SSN=[0-9]{9}’,‘###-##-####’);
}
}
use OS_HTTP_RESPONSE;
use OS_PAYLOAD_INSPECT;
sub HTTP_RESPONSE {
if (OS_HTTP_RESPONSE::content_type =~ /text/) {
OS_PAYLOAD_INSPECT::substitute(
‘credit*card=[0-9]{32}’,‘#### ####’,
‘SSN=[0-9]{9}’,‘###-##-####’
);
}else {
OS_PAYLOAD_INSPECT::disable();
}
}
Seitenansicht 127
1 2 ... 123 124 125 126 127 128 129 130 131 132

Kommentare zu diesen Handbüchern

Keine Kommentare