Fill in login Window by Java Program

Dear gurus,
I am taking a security subject and have the assignment to write program to attack a site with brute force. The password is made up of 3 letters.
My problem is how can I have a java program to try logging in and fill in the user login windows (from Apache).
I can ensure this is an uni assignment, not a message from an hacker (attacker).
Advise of all types are appreciated.
Regards,
Francis

Hi,
you can pass usernam and password in the URL, so you don't have to fill in the login window. E.g.
http://username:[email protected]
(this is not an existing URL, do don't click on it).
Andre

Similar Messages

  • How to reboot windows using java program?

    Hi,
    If I want to reboot the windows by Java Program,How?
    Thank you!

    what about windows server 2003?
    Runtime.getRuntime().exec("shutdown -r
    ");it will work only for windows xp

  • Finding Window's java program path in LabVIEW

    I'm writing some software that depends on various java files being installed correctly into the lib/ext folders and bin folders of the current version of the java runtime installed.  I'd like to be able to check if these files are in place and give an appropriate error message in my LabVIEW code if they are not.  However, the path to these folders may be different on different machines depending on the the version of java installed and the version of windows used (e.g. C:\Program Files (x86)\Java\jre7   vs.  C:\Program Files\Java\jre6).  I'm using the 32 bit version of LabVIEW and the System Exec.vi to make all my calls to java.  Does anyone know of a way directly from LabVIEW or a command in Windows I could use from System Exec.vi to find these paths?  Thank you.
    Solved!
    Go to Solution.

    GollumGTH wrote:
    Yea, this is what I was finding after much googling and playing around...
    So I just have to do the windows command java -version, parse the results for the current java version, use that info to generate a query for the reg command and then parse those results... what could possibly go wrong... 
    There's functions for accessing the registry in Connectivity -> Windows Registry Access
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Getting hold of operating system windows from java program

    I want to make a java desktop application that is aware of other windows on the desktop. Targetted primarily for windows xp/vista.
    It should be able to "find" the current windows on the desktop (running from other applications) and draw a textual message ontop of them.
    Is this at all possible with java? And if so, can someone give me a point in the direction to take. What i would need first is a way to get hold of the windows, basically their size and x,y values somehow from within the java code...

    I want to make a java desktop application that is aware of other windows on the desktop. Targetted primarily for windows xp/vista.
    It should be able to "find" the current windows on the desktop (running from other applications) and draw a textual message ontop of them.
    Is this at all possible with java? And if so, can someone give me a point in the direction to take. What i would need first is a way to get hold of the windows, basically their size and x,y values somehow from within the java code...

  • How to access a file in Unix server from windows using java

    I want to access a file in unix server from windows using java program.
    I have the following code. I am able to open the url in a web browser.
    String urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    URL url = new URL(urlStr);
    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream)));
    String inputLine;
    while((inputLine=in.readLine()))!=null){
    System.out.println(inputLine);
    in.close();
    I get the following error
    java.io.FileNotFoundException: /javatest/test.csv
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:333)
    at java.net.URL.openStream(URL.java:960)
    at com.test.samples.Test.main(Test.java:45)

    urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    I have given the format of the urlStr that I am using in the code. The actiual values are used in my code. I have tried pasting this url in the browser and it opens the file.

  • Problem while running dos command from java program

    Dear friends,
    I need to terminate a running jar file from my java program which is running in the windows os.
    For that i have an dos command to find process id of java program and kill by using tskill command.
    Command to find process id is,
    wmic /output:ProcessList.txt process where "name='java.exe'" get commandline,processid
    This command gives the ProcessList.txt file and it contains the processid. I have to read this file to find the processid.
    when i execute this command in dos prompt, it gives the processid in the ProcessList.txt file. But when i execute the same command in java program it keeps running mode only.
    Code to run this command is,
    public class KillProcess {
         public static void main(String args[]) {
              KillProcess kProcess = new KillProcess();
              kProcess.getRunningProcess();
              kProcess = new KillProcess();
              kProcess.readProcessFile();
         public void getRunningProcess() {
              String cmd = "wmic /output:ProcessList.txt process where \"name='java.exe'\" get commandline,processid";
              try {
                   Runtime run = Runtime.getRuntime();
                   Process process = run.exec(cmd);
                   int i = process.waitFor();
                   String s = null;
                   if(i==0) {
                        BufferedReader stdInput = new BufferedReader(new
                               InputStreamReader(process.getInputStream()));
                        while ((s = stdInput.readLine()) != null) {
                         System.out.println("--> "+s);
                   } else {
                        BufferedReader stdError = new BufferedReader(new
                               InputStreamReader(process.getErrorStream()));
                        while ((s = stdError.readLine()) != null) {
                         System.out.println("====> "+ s);
                   System.out.println("Running process End....");
              } catch(Exception e) {
                   e.printStackTrace();
         public String readProcessFile() {
              System.out.println("Read Process File...");
              File file = null;
              FileInputStream fis = null;
              BufferedReader br = null;
              String pixieLoc = "";
              try {
                   file = new File("ProcessList.txt");
                   if (file.exists() && file.length() > 0) {
                        fis = new FileInputStream(file);
                        br = new BufferedReader(new InputStreamReader(fis, "UTF-16"));
                        String line;
                        while((line = br.readLine()) != null)  {
                             System.out.println(line);
                   } else {
                        System.out.println("No such file");
              } catch (Exception e) {
                   e.printStackTrace();
              return pixieLoc;
    }     when i remove the process.waitFor(), then while reading the ProcessList.txt file, it says "No such file".
    if i give process.waitFor(), then it's in running mode and program is not completed.
    Colud anyone please tell me how to handle this situation?
    or Is there anyother way to kill the one running process in windows from java program?
    Thanks in advance,
    Sathish

    Hi masijade,
    The modified code is,
    class StreamGobbler extends Thread
        InputStream is;
        String type;
        StreamGobbler(InputStream is, String type)
            this.is = is;
            this.type = type;
        public void run()
            try
                InputStreamReader isr = new InputStreamReader(is, "UTF-16");
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    System.out.println(type + ">" + line);
                } catch (IOException ioe)
                    ioe.printStackTrace(); 
    public class GoodWindowsExec
        public static void main(String args[])
            try
                String osName = System.getProperty("os.name" );
                String[] cmd = new String[3];
                 if( osName.equals( "Windows 95" ) )
                    cmd[0] = "command.com" ;
                    cmd[1] = "/C" ;
                    cmd[2] = "wmic process where \"name='java.exe'\" get commandline,processid";
                } else {
                    cmd[0] = "cmd.exe" ;
                    cmd[1] = "/C" ;
                    cmd[2] = "wmic process where \"name='java.exe'\" get commandline,processid";
                Runtime rt = Runtime.getRuntime();
                System.out.println("Execing " + cmd[0] + " " + cmd[1]
                                   + " " + cmd[2]);
                Process proc = rt.exec(cmd);
                System.out.println("Executing.......");
                // any error message?
                StreamGobbler errorGobbler = new
                    StreamGobbler(proc.getErrorStream(), "ERROR");           
                          // any output?
              StreamGobbler outputGobbler = new
                    StreamGobbler(proc.getInputStream(), "OUTPUT");
                          // kick them off
                errorGobbler.start();
                outputGobbler.start();
                // any error???
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);       
            } catch (Throwable t)
                t.printStackTrace();
    }when i execute the above code, i got output as,
    Execing cmd.exe /C wmic process where "name='java.exe'" get commandline,processid
    and keeps in running mode only.
    If i execute the same command in dos prompt,
    CommandLine
    ProcessId
    java -classpath ./../lib/StartApp.jar;./../lib; com.abc.middle.startapp.StartAPP  2468
    If i modify the command as,
    cmd.exe /C wmic process where "name='java.exe'" get commandline,processid  > 123.txt
    and keeps in running mode only.
    If i open the file when program in running mode, no contents in that file.
    If i terminte the program and if i open the file, then i find the processid in that file.
    Can you help me to solve this issue?

  • Launch ODBC data source window in Java

    Hi , In windows OS , when config the database data source ,I have to launch the ODBC data source administrator window in the control panel , I think this is a troubled thing .Can I call the window in java program directly ? Thanks.
    Liwei

    I read this recently on this Forum. So, yes .. apparently it can be done.
    <------ Search 'DB' etc - by date and look for something 2 days back. Also if you check the New To.. forum I posted a jdbc.odbc program about 5 days back to test your driver. Good luck (actually this is a bit tricky the first time, so keep at it)

  • To run a java program on windows xp startup

    hi ,
    i have a sample HelloWorld.java program.
    i wrote a batch file to run this program as follows:
    set PATH=%PATH%;C:\Program Files\Java\jre1.6.0\bin;
    cd c:\test
    java HelloWorld
    This program runs when i click on the bat file.
    Next i add this batch file to registry to auto-start on windows startup
    However, on windows startup, i get the following:
    Exception in thread "main" java.lang.NoClassDefFoundError
    Anyone can help me? Thank you in advance!

    Hi Sergi,
    Thanks for the info. I couldn't able to login because of my internet connection.
    Thanks,
    --Srini                                                                                                                                                                                                                           

  • Java program are limited as Administrator after windows 7 update

    I have updated the windows 7.
    The java program(packaged by InstallAnywhere 2008 Enterprise) can be executed when I login the system as ordinary user.
    but the error will occur when I execute the java program as Administrator,please refer to the below error information.
    (The java program can be executed correctly before the windows 7 update, so I think there maybe some new restriction for the java if login as Administrator )
    >>It fails to install with this error msg.
    >>
    >>java.lang.NoClassDefFoundError: Could not initialize class ZeroGah
    >> at com.zerog.ia.installer.LifeCycleManager.a(DashoA8113)
    >> at com.zerog.ia.installer.LifeCycleManager.g(DashoA8113)
    >> at com.zerog.ia.installer.LifeCycleManager.h(DashoA8113)
    >> at com.zerog.ia.installer.LifeCycleManager.a(DashoA8113)
    >> at com.zerog.ia.installer.Main.main(DashoA8113)
    >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    >> at java.lang.reflect.Method.invoke(Unknown Source)
    >> at com.zerog.lax.LAX.launch(DashoA8113)
    >> at com.zerog.lax.LAX.main(DashoA8113)
    *************************************************************************************************

    The only thing that I can see here is that some installer is failing; this is not the place to ask for support with that installer.

  • Is there any way to call java program whenever i login to R3 System.?

    Hi Experts
    Is there any way to call java program whenever i login to R3 System.
    Means Whenever the user login to R3 system i should trigger one java program.. Is there any way
    Please help me
    Thanks & Regards
    Ravi Shankar B

    If you want to access to the Windows Taskbar, you should call some Win32 APIs and JNI. Refer to Win32 references.

  • Java program for installing font on windows

    Hi,
    I want to write a java program that installs required fonts on windows machine. On my machine windows is installed on "C:\WINDOWS" directory.
    So, naturally "c:\WINDOWS\Fonts" directory I want to paste my font files.
    I am writing file handling code for the same. But, how to know dynamically the location of windows installation directory?
    I tried using System.getProperty("windir"), but it is not working?
    Can somebody help me?
    regards,
    Anand

    1) Use VB
    2) Who said that such a property exists?
    3) In Java 1.5, use System.getEnv()

  • Starting a java program on a ordinary windows computer (without JDK)

    I have made an ordinary java program which reads from a specified text file, changes it a bit and then creates a new file with the new text. This works good when I use a computer with an JDK installed, but I must be able to run this program on a Windows 2000 computer (without any "extras" installed, only the programs that are included in Windows 2000). The reason for this is that I'm not allowed to install programs on this computer. Can anyone help me?

    You neither need to
    1- have a JRE installed on the computer (Java Runtime Environment)
    The Java Virtual Machine to convert the compiled byte code into the necessary instructions for the computer it is running on... W/O it...can't run it.
    2- create a native executable...there are packages etc for which this is true. If you can install NOTHING on the computer... you would either
    A- Find one of the packages that creates .exe files from java or class files
    B- Bundle the JRE with it... it doesn't need to be 'installed' persay-- unpack the directories and create a batch file that calls <path-to-java>/java <path-to-program>myclass
    C- Write it in C or C++
    That is not an inclusive list of possibilities... Java's portability comes with the price-tag of needing something that can run it... once you have that something (and the JRE is fairly ubiquitous, or at least, easy to get if not present generally) ... you can run the program.
    ~Dave

  • Using a java program to fill in forms using information from a spreadsheet

    I had an idea to "automate" some data entry at work and need to know if my idea is feasible with Java. Here is the back story:
    I work on a research project and we have all of our contact data in an Excel spreadsheet (I know access may be better for this but for "political reasons" I just set it up in Excel). Every day we need to pay participants and this is done through a third party website. When the participant is new to this website we need to fill in all their personal information via a form on the webpage. Since we already have all their information stored in a spreadsheet, I was thinking we could create a little program that pulls the data from the excel sheet and inserts it into the form fields.
    Can this be done with a simple java program?
    Thank you for any help!

    peroija wrote:
    Can this be done with a simple java program?No.
    Can this be done with a java program?Yes. You could certainly have your page upload the spreadsheet to your server, and you could certainly have your server program attempt to extract the data from Excel using Apache POI or JExcel or something like that. But you have to be prepared for people to upload the wrong file, or the right file in which the users have chosen unusual date formats, and so on. You could make things easier by distributing a spreadsheet which is locked down so that the users can only enter the information in specific places and specific formats, but it looks like you have missed that opportunity too.

  • Windows task scheduler to run batch file running a java program

    I have created a batch file that runs my SendEmail program. The batch file is in the same directory as the java program. The only line in the batch file is
    java SendEmail
    This works fine from the command prompt but from the windows task scheduler it fails to function. Any help on how I can overcome this problem will be greatly appreciated.
    THanks

    Looks okay. The classpath is set, too, I guess? Btw, try running javaw instead of java. I may err, but I think it can show a console, so you can watch any error messages.

  • How to start java.exe from a java program in windows ?

    Hi,
    I did like to know, if its possible to run java.exe from a java program on windows ? The java.exe should be visible from checking the processes that are currently running using the Task Manager on windows.

    Runtime.getRuntime().exec("java Sample");

Maybe you are looking for

  • Cisco ASA 5505 Password Problem

    I recently ran into a telnet, console, and enable password issue that was unexpected and I am hoping someone can explain what happened.  I had two working Cisco ASA 5505's that were two end-points of a Site-to-Site VPN.  I had used the ASDM file mana

  • Problem with ringtone downloads

    Hi, I purchased a ringtone from the store last night (for the iPhone 4s) but it's still showing up on the downloads page as 'waiting'. It's been over 12 hrs now, I've tried downloading again but that hasn't worked & if there's a way to cancel it I ca

  • Finding and deleting "others"

    Is there anyway I can find out what the "other" is that is taking up a bunch of room on my ipod nano? Because it's taking up more room that it ever has before and I'm tired of not being able to add songs without having to delete songs. Sam

  • Managed Account permissions issues after all third party updates

    I run a lab with 34 student accounts that are "Managed" using 10.5.7. I have given students permission to use specific software and all aspects of the software in Accounts/Parental Controls. When I update Microsoft Office or Adobe CS4, I have to go i

  • How to obtain sql query result in JavaScript

    hello, i want to know if this is possible : i have a Javascript function that make this: var szPLANT = document.getElementById("hid_Plant").value;    var szLINE = document.brs_Line.getSelectedItem();    var cell = document.brs_Cell.getSelectedItem();