http://paulmcpd.blogspot.com/2009/02/how-to-write-remote-access-tools-in.html
http://paulmcpd.blogspot.com/2009/02/execute-external-program-from-java.html
http://paulmcpd.blogspot.com/2009/02/command-execution.html
http://paulmcpd.blogspot.com/2009/02/process-class-in-java.html
Robots:
http://paulmcpd.blogspot.com/2008/03/java-remote-desktopcapture.html
http://www.developer.com/java/other/article.php/2212401
Tuesday, June 23, 2009
Friday, June 19, 2009
Reverse RAT
Web Browser Source Code:
public FrWebBrowser() {
initComponents();
try{
tpOutput.setPage("http://www.google.com.my");
}catch(Exception e){
}
}
Modify the constructor as shown above. You should have a
JTextPane called tpOutput.
Desktop Capture Source Code:
private void btnCaptureActionPerformed(java.awt.event.ActionEvent evt) {
String userHome = System.getProperty("user.home") + "\\";
captureScreen(userHome + "desktop.jpg");
}
public void captureScreen(String fileName){
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
try{
BufferedImage image = new Robot().createScreenCapture(new Rectangle(screenSize));
ImageIO.write(image, "jpg", new File(fileName));
//ImageIO.write(image, "png", new File(fileName));
}catch(Exception e){
JOptionPane.showMessageDialog(null, "captureScreen: " + e.toString());
}
}
FTP Source code :
Modify the sendFile ( ) method to upload desktop.jpg:
private void sendFile() {
String ftpHost = "*************"; //get this from me
String ftpUserName = "student";
String ftpPassword = "********"; //get this from me
String ftpRemoteDirectory = "public_html";
String userHome = System.getProperty("user.home") + "\\";
String fileToTransmit = userHome + "desktop.jpg";
FTPClient ftp = new FTPClient();
try{
ftp.connect(ftpHost);
ftp.login(ftpUserName, ftpPassword);
ftp.changeWorkingDirectory(ftpRemoteDirectory);
File f = new File(fileToTransmit);
ftp.setFileType(FTP.BINARY_FILE_TYPE);
ftp.storeFile(f.getName(),new FileInputStream(f));
ftp.disconnect();
}catch(Exception e){
JOptionPane.showMessageDialog(null, e.toString());
}
}
For FTP, you should have a button event handler that calls
sendFile( ) above.
Now, go back to your Web Browser form and modify the constructor:
public FrWebBrowser() {
initComponents();
try{
tpOutput.setPage("********"); //get this from me
}catch(Exception e){
}
}
To test the program, one person will run the FTP and click Capture Desktop
followed by Send File.
Another person will run Web Browser to see the first person's desktop.
You can also test it alone, just click Capture Desktop, Send File, then Open the Web
Browser.
Monday, June 15, 2009
Java Screencam
http://wuetender-junger-mann.de/wordpress/?p=585 wrote:
A Screen Camera in Java
July 12, 2008, 23:48
Today I wrote a little class that allows to repeatedly capture the screen content and write the result to a flash file. It created a flash video with one frame per second (this is a bit crude) with one frame per screen shot taken. It is based on JavaSWF2 a nice wrapper around the SWF file format. To run you need to get the JavaSWF2 jarfile. Then you go:
camera = new ScreenCamera(new File("test.swf"));
doStuff();
camera.takeScreenShot();
doMoreStuff();
camera.takeScreenShot();
camera.close();
It might be useful for testing and creating tutorials.
JavaSWF2 is a set of Java packages that enable the parsing, manipulation and generation of the Macromedia Flash(TM) file format known as SWF ("swiff").
JavaSWF2 is available as Java source code under the JavaSWF2-BSD License - which is a BSD License that is compatible with the GPL.
Subscribe to:
Posts (Atom)