Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- - Socket Server PHP
- */
- set_time_limit (0);
- if(!empty($_GET['port']) && is_numeric($_GET['port'])) {
- $port = $_GET['port'];
- } else {
- $port = 2017; // port lu atau bisa lewat parameter get port
- }
- $sock = socket_create(AF_INET, SOCK_STREAM, 0);
- socket_bind($sock, 0, $port) or die('lnct_error: Failed to bind port');
- socket_listen($sock);
- while ($client = socket_accept($sock)) {
- $response = "HTTP/1.0 200 OK\r\n";
- $response .= "Server: P4kL0nc4t-SSWP\r\n";
- $response .= "Content-Type: text/html\r\n\r\n";
- $response .= "<html><h1>Hacked by P4kL0nc4t</h1><hr>Obsidian Cyber Team</html>";
- socket_write($client, $response);
- socket_close($client);
- }
- socket_close($sock);
- ?>
Add Comment
Please, Sign In to add comment