Browse code

wrap screnc output in script tags, so that the HTML normalizer will normalize it as javascript, and match some more samples with existing signatures

git-svn: trunk@4214

Török Edvin authored on 2008/10/01 18:56:48
Showing 1 changed files
... ...
@@ -1793,6 +1793,7 @@ int html_screnc_decode(int fd, const char *dirname)
1793 1793
 	screnc_state.length += (base64_chars[tmpstr[4]] << 2) << 24;
1794 1794
 	screnc_state.length += (base64_chars[tmpstr[5]] >> 4) << 24;
1795 1795
 
1796
+	cli_writen(ofd, "<script>",strlen("<script>"));
1796 1797
 	while (screnc_state.length && line) {
1797 1798
 		screnc_decode(ptr, &screnc_state);
1798 1799
 		cli_writen(ofd, ptr, strlen(ptr));
... ...
@@ -1801,6 +1802,7 @@ int html_screnc_decode(int fd, const char *dirname)
1801 1801
 			ptr = line = cli_readchunk(stream_in, NULL, 8192);
1802 1802
 		}
1803 1803
 	}
1804
+	cli_writen(ofd, "</script>",strlen("</script>"));
1804 1805
 	if(screnc_state.length)
1805 1806
 		cli_dbgmsg("html_screnc_decode: missing %u bytes\n",screnc_state.length);
1806 1807
 	retval = TRUE;