Forum Discussion
STREAM::expression with special characters
- Sep 11, 2017
I found correct strings for replacement:
set find "initNewTransfer\\x28t, n\\)" set replace "this.initNewTransfer\x28t, n\), INJECTED-CODE"
Is there any better solution?
I found correct strings for replacement:
set find "initNewTransfer\\x28t, n\\)"
set replace "this.initNewTransfer\x28t, n\), INJECTED-CODE"
Is there any better solution?
- cjuniorSep 11, 2017Nacreous
I honestly don't know why the first parenthesis causes disruption for the logic. This way, sometimes I workaround using hexa chars like you did, and in some cases I just ignore that char using a dot. Plus, I prevent command substitution with {}:
set find {this\.initNewTransfer.t, n/),} set replace "this.initNewTransfer(t, n), INJECTED-CODE,"
Just keep in mind the "find" is the regexp and "replace" a simple text.
Regards.
- martin_58353Sep 13, 2017Cirrus
As I wrote, solution of this is:
set find "initNewTransfer\\x28t, n\\)" set replace "this.initNewTransfer\x28t, n\), INJECTED-CODE"
The first bracked "(" is possible replace with \x28 or \050 (is the same char code with octal). But first bracket is not possible define with escape sequence (double backslash) like "\(", it is not working.
The second bracket ")" is possible define with hex or oct code, but also escape sequence is correct "\)".
I don't know if it's a feature or bug (I tested it with 15.1, 12.x and 13.1 sw version).
Recent Discussions
Related Content
* 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