Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Net;
- using System.IO;
- using System.Net.Sockets;
- namespace cl0ckw0rkRAT
- {
- class Program
- {
- static void Main(string[] args)
- {
- Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- IPEndPoint ipep = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 31337);
- socket.Bind(ipep);
- socket.Listen(10);
- Socket ClientSocket = socket.Accept();
- Console.WriteLine("Client Connected\r\n");
- byte[] buffer = new byte[64];
- int recBytes = ClientSocket.Receive(buffer);
- Console.WriteLine(recBytes.ToString() + " Bytes empfangen\r\n");
- Console.WriteLine(ASCIIEncoding.ASCII.GetString(buffer, 0, recBytes) + "\r\n");
- Console.Read();
- socket.Close();
- }
- }
- }
Add Comment
Please, Sign In to add comment