Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Project

Options
  • 24-10-2005 4:52pm
    #1
    Closed Accounts Posts: 73 ✭✭


    Hey im basically doing a project which involves creating a scanning a network,fingerprinting all the pcs and creatring a network map.The way im going about it is creating a java gui which a user will use to input commands into nmap,the network will then be scanned and and a network map will be created,the problem is how the hell will I put the copmmands from the java gui into nmap??Any help at all will be greatly appriciated..


Comments

  • Closed Accounts Posts: 920 ✭✭✭elvis2002


    i dont know anything about nmap but you could try as an alternative to use SNMP to do such as thing.


  • Registered Users Posts: 7,500 ✭✭✭BrokenArrows


    dont know anyhting about nmap either or how to accomplish this in java but in c/c++ you can call the system function to execute commands.

    eg.

    system("cd \abc\xyz");
    system("dir");

    those two lines would print out the dir etc.

    If nmap was command line you could do something like this but i dont know the java code for the system function.


  • Registered Users Posts: 6,762 ✭✭✭WizZard


    Look at nmapfe, it's a front-end GUI for nmap.


  • Closed Accounts Posts: 1,502 ✭✭✭MrPinK


    Running command line stuff from java is pretty simple
    Process p = Runtime.getRuntime().exec(yourCommand);
    
    // read command's output (which is your input) 
    InputStream Reader in = new InputStreamReader(p.getInputStream());
    BufferedReader input = new BufferedReader(in);
    
    // do whatever you want with the output
    while ((line = input.readLine()) != null)
        System.out.println(line);
    


Advertisement