MCPcopy Create free account
hub / github.com/0linlin0/CyberBox / upload

Method upload

Skay_Exp/src/tools/nc/NetcatUDPClient.java:66–73  ·  view source on GitHub ↗

In upload mode, client reads data from its standard input device and writes it to the socket. @throws Exception

(int port)

Source from the content-addressed store, hash-verified

64 * @throws Exception
65 */
66 @SuppressWarnings("Duplicates")
67 private static void upload(int port) throws Exception {
68 Scanner input = new Scanner(System.in);
69 while (input.hasNextLine()) {
70 byte[] sendData = input.nextLine().getBytes();
71 clientSocket.send(new DatagramPacket(sendData, sendData.length, ipAddress, port));
72 }
73 }
74
75 /**
76 * Starts execution of the program, requiring a host name and port number as an argument.

Callers 1

startMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected