I install GVM-9 with openvas-scannner is v5.1.3,and src/utils.c has the following code:
auth_send (int soc, char *data)
{
unsigned int sent = 0;
gsize length;
if (soc < 0)
return;
/* Convert to UTF-8 before sending to Manager. */
data = g_convert (data, -1, “UTF-8”, “ISO_8859-1”, NULL, &length, NULL);
while (sent < length)
{
int n = nsend (soc, data + sent, length - sent, 0);
if (n < 0)
{
if ((errno != ENOMEM) && (errno != ENOBUFS))
{
g_free (data);
return;
}
}
else
sent += n;
}
g_free (data);
}
I have edit my NVTs use UTF-8,because I want to surpport Chinese in my NVTs(like script_name and script_summary), what should I do?
i have deleted your last “who can help me” posting for now. It is seen as bad netiquette to push a thread like this within a few hours without a response. Please have some patience and if some one knows an answer you should get an answer.
Don’t use UTF-8 encoding for your VT. For the time being (as long as old scanner protocol OTP is supported), the encoding to be used for VTs is ISO-8859-1 .
Thanks,cfi. Because OTP is not encoding-safe, so VTs should use ISO-8859-1.Now, we can support chinese in VTs, We want to see the VTs information displayed in Chinese through gsad. What should we do?
Thanks Jan. You said otp is a very old internal protocol between manager and scanner and It doesn’t solve the coding problem.I want to know why the otp protocol cann’t solve the coding problem in design.Can you tell me more about it? Thanks a lot!
I want to know whether the current GVM version supports UTF-8 coding. I wrote a third-party NASL in Chinese, which is displayed in garbled code on the page. I want to know whether there are any methods to solve it at present
NASL still doesn’t support UTF-8 and still requires ISO-8559-1 encoding because the openvas-scanner expects this encoding. All other components should use UTF-8.
I have queried the data in redis and can display Chinese normally. The problem is that after OpenVAS scanner reads the redis data, the resulting data is not normally encoded in UTF-8. Gvmd supports UTF-8 encoding. When my newly created NASL file is read to the database by gvmd, it will be garbled
Because I’m from NASL_ Debugsecurity_ The Chinese returned in the message method is in fprintf (stdout, “”% s \ \ n ", DUP) of OpenVAS scanner; I want to know how OpenVAS returns data to gvmd in the next step. Is there any coding problem in this process