OK, got it, that's the magic flag STR_PURIFIED
$ cat /tmp/xxx.nasl
A="haha\\n";
AA=string(A); # Now AA is "purified"
B=AA+""; # B is no more
AAA=string(B); # So we change \n to LF
display("A =",A, "\n");
display("AA =",AA, "\n");
display("AAA=",AAA, "\n");
$ nasl -t localhost /tmp/xxx.nasl
A =haha\n
AA =haha\n
AAA=haha
$
As display() calls string(), this explains why the 1st & 2nd display
are identical.
IMHO, this behaviour is not great.
Following the discussions on the risk factor and the translation
problems, maybe we should launch a TODO list for NASL enhancements in
the next major version?
Renaud?
-
[EMAIL PROTECTED]: general discussions about Nessus.
* To unsubscribe, send a mail to [EMAIL PROTECTED] with
"unsubscribe nessus" in the body.