Reputation: 427
I've done my research on this an still cant find any solution. the closest i have seen so far is Any ideas on how to integrate with nmap programmatically? . I am a php programmer and i'm currently building a network management system, I intend to embedd nmap and WinPcap to my php application, such that i can scan my network using both software using my application and have the information in my application application's database. can anyone shed some light on this? thank you.
Upvotes: 1
Views: 768
Reputation: 5995
Nmap doesn't currently have a defined IPC or RPC interface. Its API is defined by its command-line arguments and its XML output (the best, most complete machine-readable output option). To see how an application can use this "API," you can look at some existing applications that integrate with Nmap:
In addition to all these, there are a few thousand "scan with Nmap from PHP" pages and questions on the Internet that can help with issues surrounding request timeouts, etc. Most of all, I must warn you not to accept arbitrary user input to the scan arguments, since it is trivial to trick Nmap into executing any OS commands (which is why Nmap should never be installed setuid).
Upvotes: 1