Jump to content

How to: Make NMap Java GUI ;o)


Psyphon

Recommended Posts

OK ok ok ... it interested me, and people were saying it can't be done or do it some other way... and did someone even mention BATCH FILES??!! OMG LOL - noobs noobs noobs noobs noobs! But then again I am more l337 than you. Hahaha.

Anyway, it wasn't working because programs run sequentially, you need to object orientate your code! That is why Java is called an Object Orientated Language.

You need to make threads! Anyway I knocked the code up for you, gave me something to do while waiting for the kettle to boil.

/**
 * 
 * @author PSYPHON, i.psy.phon@gmail.com
 * 
 */

public class NMapLauncher {
    
    static Thread NMapThead;
    
    public static void main ( String [] args )
    {    
        System.out.println("Starting NMapLauncher...");
    
        NMapThead = new NMapThread();
        NMapThead.start();
        
    }
    
}

/**
 * 
 * @author PSYPHON, i.psy.phon@gmail.com
 * 
 */

public class NMapThread extends Thread {
    
    public NMapThread()
    {
        System.out.println("NMapThread object created...");
    }
    
    public void run()
    {
        System.out.println("NMapThread run launched...");
        
        try 
        {      

        System.out.println("Running thread...");
             
                Process p = Runtime.getRuntime().exec("cmd /c start nmap -v -sS 10.0.0.*");
                p.waitFor();

        } catch (Exception e) { System.err.println("Oops, I fooked up! o.0 "); }
        
    }

}

Link to comment
Share on other sites

Where is the GUI?

This was a topical reply to the user "Pizza" - hence the title. There is no GUI components, make them yourself - I'm not spoon feeding anyone. Understand what is being said in colloquial terms before you go and make a smart-ass comment.

Link to comment
Share on other sites

This was a topical reply to the user "Pizza" - hence the title. There is no GUI components, make them yourself - I'm not spoon feeding anyone. Understand what is being said in colloquial terms before you go and make a smart-ass comment.

Wow. Must be one of K1U's friends.

Link to comment
Share on other sites

You people suck.  :shock:

Someone asked a question... and I out of the goodness of my heart I answered it and wrote the code for him, and all I get is shit thrown at me? Maybe it is because I typed the word "noob" several times? It was a joke, get over it... god damn tetchy geeks.

Link to comment
Share on other sites

god damn tetchy geeks.

I wrote a rant here, but frankly I can't be fucked any more. Throw all the fancy words, insults and put downs all you like, but you're nothing to anyone who gives a shit unless you prove it. Maybe I'm not "someone" but I'll damn well try where I can. I'm sick of "I know all and you're shit on my shoe" fuckers coming in here telling us what's what.

Give it a fucking rest, for fuck's sake.

Link to comment
Share on other sites

Where is the GUI?

This was a topical reply to the user "Pizza" - hence the title. There is no GUI components, make them yourself - I'm not spoon feeding anyone. Understand what is being said in colloquial terms before you go and make a smart-ass comment.

Replies usually go at the end of the thread they start in.  You're not spoon feeding me, as many people probably can vouch for me, I can probably code circles around you.  Basically all you did was create a thread that executes NMap, nothing special.

Anyway, it wasn't working because programs run sequentially, you need to object orientate your code! That is why Java is called an Object Orientated Language.

Object oriented has nothing do with the program running sequentially.  Object oriented code runs sequentially.  You can use threads in prodecural languages, so OOP has nothing to do with it.

#include <windows.h>

void DoNmap(void* pData)
{
    system("nmap .........");
}

int main(int argc, char** argv)
{
    _beginthread(DoNmap, 0, NULL);
   return 0;
}

Very simple C example of the same app in a procedural manner.

Link to comment
Share on other sites

Usually when you write a GUI (which means a GRAPHICAL USER INTERFACE), it implies that there is a graphical button/text driven interface for a backend (NMAP in this case) that is usually a console/shell application.  When you have written a GUI (which has already been released by the wonderful creators of NMAP under the guise of Zenmap), it should have a Graphical User Interface.  Your application sadly does not have any of this wonderful graphical stuff.  Yes, you do make a thread.  Yes, you do run NMAP.  But where is the GUI?  Most GUIs have many lines of code that enable the user to easily interact with a program.  That, sadly, does not appear to be the case with this "GUI", as there is no GUI to be seen.  I do hope others will not take this advice on how to make a GUI, and try to make a GUI with it, as there are many topics left out.  Mostly the whole GUI part of it.  Maybe you should work on the tutorial more, and this will help.

Link to comment
Share on other sites

Usually when you write a GUI (which means a GRAPHICAL USER INTERFACE), it implies that there is a graphical button/text driven interface for a backend (NMAP in this case) that is usually a console/shell application.  When you have written a GUI (which has already been released by the wonderful creators of NMAP under the guise of Zenmap), it should have a Graphical User Interface.  Your application sadly does not have any of this wonderful graphical stuff.  Yes, you do make a thread.  Yes, you do run NMAP.  But where is the GUI?  Most GUIs have many lines of code that enable the user to easily interact with a program.  That, sadly, does not appear to be the case with this "GUI", as there is no GUI to be seen.  I do hope others will not take this advice on how to make a GUI, and try to make a GUI with it, as there are many topics left out.  Mostly the whole GUI part of it.  Maybe you should work on the tutorial more, and this will help.

QFE!

You did title your thread "How to: Make NMap Java GUI" and then you say you are not here to spoon feed people so you left eh GUI part out? I mean, if it says "How to: Make NMap Java GUI" people expect that part to made, and to hell with the rest of what you showed, you didnt even post what your subject claimed, so dont expect people to not jump on your shit when every comment you make is some smart as whip about how elite you are and how others are not.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...