Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, i want to use an application of vulnerability scanner like nessus or metasploit, into my web application, someone told me that you can use it like a web services;
what do you think ?
Posted

1 solution

You cannot directly use some arbitrary application as a Web application; it's always better to use some API.

However, if this is a console-only application, you can start it using System.Diagnostic.Process.Start, redirect StandardOutput and, just in case, StandardError streams and later present this text information on your Web page. The redirection code sample is shown here: https://msdn.microsoft.com/en-us/library/system.diagnostics.process.standardoutput%28v=vs.110%29.aspx[^].

[EDIT]

With Java, there are the similar ways to redirect redirectOutput and redirectError. See, for example:
http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html#redirectOutput(java.lang.ProcessBuilder.Redirect)[^],
http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html#redirectError(java.lang.ProcessBuilder.Redirect)[^],
http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html[^].

—SA
 
Share this answer
 
v2
Comments
M-osab 23-Apr-15 10:48am    
thanks but I am working with JEE not .NeT
Sergey Alexandrovich Kryukov 23-Apr-15 11:32am    
And where in your question did you specify it? :-)
Please see my update to the question, after [EDIT].
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900