Am Mittwoch, 7. September 2016, 22:56:16 schrieb Mohamed Ibrahim: > I have built a custom struct in C to load all necessary information from > executing the nasl script , like script version , name , tags , > references....etc. > > i wanted to load all these information in my custom struct , because i am > developing a wrapper in golang around the openvas-nasl library , > > the problem , i am facing now , is that when i write for example "fprintf" > in script_version function in file nasl_scanner_glue.c , the fprintf is not > executed at all nothing is printed , even , when i debug , line by line , > the compiler seems to not execute the function call "fprintf" inside the > script_version call. > > > my question , why is this happening ? and what is the best way to fill my > struct with all necessary information about the running script to take > these values in my golang program.
I am not familiar with golang (yet), but the scanner does redirect the stderr to show up in the openvassd log files. Another option might be that the output is not flushed. You can append a "fflush(stderr);" command after the printf() to be sure it is flushed. -- Dr. Jan-Oliver Wagner | +49-541-335084-0 | http://www.greenbone.net/ Greenbone Networks GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 202460 Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner _______________________________________________ Openvas-devel mailing list [email protected] https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-devel
