Forum Discussion
AngryCat_52750
Dec 12, 2013Nimbostratus
findstr help
I am trying to phrase txt xml for a username and password.. i am getting the username fine but the password is tripping me up..
the txt looks like this -
<CustID>CaptAmerica</CustId>
</CustId>
<CustPswd>
<EncryptionTypeCd>NONE</EncryptionTypeCd>
<Password>test123</Password>
</CustPassword>
the iRule looks like this -
when HTTP_REQUEST_DATA {
set username [findstr [HTTP::payload] "CustId>" 15 "&"]
set password [findstr [HTTP::payload] ";Password>" 6 "&"]
log local0. "Username - $username , Pwd - $password"
}
the log msg comes out like this - Username - Username - CaptAmerica, Pwd - gt;test123
Any ideas??
- Kevin_StewartEmployee
Not sure what your skip count numbers are supposed to indicate, but try this:
set username [findstr [HTTP::payload] "CustID>" 10 "&"] set password [findstr [HTTP::payload] ";Password>" 13 "&"]
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects