getfield
2 Topicsset TOKEN [getfield [HTTP::uri]
I have two rules that work on there own, not sure how to combine them into one. when HTTP_REQUEST { set HOST [string tolower [HTTP::host]] set TOKEN [getfield [HTTP::uri] "/?r=" 2] HTTP::respond 302 Location "https://www2.google.com/gui/reloan/getstarted?code=$TOKEN" Connection Close } when HTTP_REQUEST { set HOST [string tolower [HTTP::host]] set TOKEN [getfield [HTTP::uri] "/" 2] HTTP::respond 302 Location "https://www1.google.com/ShortUrlLanding/?lmco=$TOKEN" Connection Close }Solved902Views0likes7CommentsBetter option for multiple delimiters
I'm thinking there has to be a smarter way to accomplish what I'm doing here. I need to break out each value in the SSL Subject_dn, maybe a regex or ?? this is getting me what I need, but pretty sure there is a better way to accomplish this... any ideas appreciated. if {[SSL::cert count ] > 0}{ set subject_dn [X509::subject [SSL::cert 0]] log local0. "this is the SSL Subject $subject_dn" set cn [getfield $subject_dn "," 1 ] set ou [getfield $subject_dn "," 2 ] set o [getfield $subject_dn "," 3 ] log local0. "CN=$cn, OU=$ou, O=$o" set cn2 [ getfield $cn "=" 2 ] set ou2 [ getfield $ou "=" 2 ] set o2 [ getfield $o "=" 2 ] log local0. "$cn2 $ou2 $o2"499Views0likes5Comments