Closed fromjklee closed 3 years ago
I haven't tested this, but have you tried two backslashes or a forward slash? SwUpgradeFilename "cisco\\cm-v2.0.0.bin"; or SwUpgradeFilename "cisco/cm-v2.0.0.bin";
Thanks for your guide quickly! I also tested it to use two backslashes. However, It was translated into two blank spaces. There is no problem for a forward slash.
bump. for paths there may be a way of getting around using backslashes. I'm trying to encode SIP passwords, (which I don't have control to put rules in). unfortunately the encoding id replacing the backslash with a space.
it would be awesome to be able to escape the backslash or something.
I've tried changing the lexer rule docsis_lex.l:127
from
*str++ = ' ';
to
*str++ = '\\';
no luck as of yet. but it's possible I'm not compiling things right. (my c++ skills are more than a little rusty) I traced it out in gdb and added a breakpoint to the flex file, and it told me the source file is newer than the binary.
if that turns out not to be the problem. then it looks like the only other place handling backslashes is docsis_yy.c:976
any hints would be greatly appreciated. Once I have it working I'll make a pull request
edit Gahaha! it actually did work. turns out I was using the wrong binary. gotta check that I didn't break other escaped chars and I'll make a pull request soon
edit related. decoding Strings with escaped double quotes does not re-escape them. which makes parsing the decoded output pretty treacherous. I'm relying on the newline following the string as a sentinel. because docsis disallows \n in strings. there may be an update to the pull request if I feel like figuring out how that works
I am now using docsis version 0.9.9-dev. It doesn't support a backslash() is using directory delimiter for Windows tftp server. For example, I would like to use as below, Main { SwUpgradeFilename "cisco\cm-v2.0.0.bin"; }
However, the backslash has translated a blank space. The following is result. Main { SwUpgradeFilename "cisco cm-v2.0.0.bin"; }
Is there any idea to use it for Windows tftp server?