wantongtang / nmap-web Goto Github PK
View Code? Open in Web Editor NEWThis project forked from aaryno/nmap-web
web-based tool for running nmap against a host, replete with site-based scan histories
This project forked from aaryno/nmap-web
web-based tool for running nmap against a host, replete with site-based scan histories
Installation instructions: This assumes you have maven, mysql, and nmap command line utility. 1. UPDATE PROPERTIES Update the properties to point to nmap: Update src/main/resources/nmapweb.properties with path to nmap. 2. CREATE DATABASE First, make sure you have a user/pass in your favorite database with the right privileges to create tables. You can create the table using hb2ddl or by utilizing the create_tables.sql script in src/main/resources. Either way, you will need to edit src/main/resources/hibernate.cfg.xml and update the path to the mysql server and the database username and password. 2a. create tables using hbm2ddl: In the src/main/resources/hibernate.cfg.xml file, set the hibernate.hbm2ddl.auto property to "create". Next, execute the maven "clean" target. This has the added benefit of running the unit tests. Once you have created the database, immediately set te property back to "update" or you will lose all database updates every time the program is executed. 2b. use the sql script: In the src/main/resources, use the create_tables.sql script to generate the tables from the nmapscans database (or whatever you decide to name it). 3. BUILD APPLICATION Run the unit tests, build, and deploy locally using Jersey and Grizzly: > mvn clean package install 4. WEB APPLICATION Deploy the grizzly engine using maven: > mvn exec:java It will continue to run until you press Enter key on the console. Once the application is up and running, go to your web browser. The default url is http://localhost:8080/html/index.html. If you changed the port in the nmapweb.properties file it would be reflected here. Enter an arbitrary number of hosts or IP addresses, separated by commas. 5. WEB SERVICE The path to the web services are: SiteScan (single host): http://localhost:8080/nmap/scan/{host} SiteScanHistory (single host): http://localhost:8080/nmap/history/{host} example: http://localhost:8080/nmap/scan/yahoo.com The schema for the SiteScan is mapped by the POJO at aaryn.nmap.summary.SiteScan: String host; String ip; List<String> hostAliases; List<Integer> openPorts; List<Integer> openFilteredPorts; List<Integer> closedPorts; List<Integer> closedFilteredPorts; List<Integer> filteredPorts; List<Integer> unfilteredPorts; The JSON schema for the SiteScanHistory is mapped by the POJO at aaryn.nmap.summary.SiteScanHistory: String[][] portStateArray; int[][] portChangeArray; List<Integer> historicallyOpenPorts; List<Integer> ports; List<Date> scanDates; String ip; List<String> hostnames; Ideally these schemas would be json schemas accessible by service... 6. BONUS - JAVADOC If you want to look at crude javadoc, build the javadoc from maven: > mvn javadoc:javadoc This will build the javadoc at target/site/apidocs/index.html. Enjoy!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.