Forum Discussion
BlurredVision_1
Jan 30, 2008Nimbostratus
Sorted: the Content-Type check was what it needed.
I inadvertently grabbed the iRule I was playing with from Joe's original blog post, and not from the wiki. Writing iRules for 16 hours will do that to you..
Looks like the wiki listed iRule could do with some credit card number logic touch ups to cover more than VISA/MASTERCARD/AMEX/DISCOVER. It still misses Diners Club Cards:
IssuerIdentifierCard Number Length
Diner's Club/Carte Blanche 300xxx-305xxx14
36xxxx 14
38xxxx14
American Express 34xxxx15
37xxxx 15
VISA 4xxxxx 13, 16
MasterCard 51xxxx-55xxxx 16
Discover 6011xx16
I have modified the regex to match 13 digit Visa cards (which apparently exist?!?!) but I can't get it to match Diners cards (the 300-305 and 36,38 prefixes)
set card_indices [regexp -all -inline -indices {(?:3[00-05]\d{11})|(?:3[6|8]\d{11})|(?:3[4|7]\d{13})|(?:4\d{12})|(?:4\d{15})|(?:5[1-5]\d{14})|(?:6011\d{12})} [HTTP::payload]]