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 | |
/* Realizo la conexión a la base de datos, primero el servidor, luego el usuario, | |
la contraseña y por ultimo el nombre de la base de datos. */ | |
$conexion = new mysqli('localhost', 'usuario_ejemplo', 'password_ejemplo', 'db_ejemplo'); | |
/* Acá valido que la conexión se haya realizado, si no se realizo correctamente se imprime | |
el mensaje con el numero del error y la descripción de este. */ | |
if ($conexion->connect_error) { | |
die('Error de conexión ('.$conexion->connect_errno.') '.$conexion->connect_error); | |
} |
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
/* ghosttest.c: GHOST vulnerability tester */ | |
/* Credit: http://www.openwall.com/lists/oss-security/2015/01/27/9 */ | |
#include <netdb.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#define CANARY "in_the_coal_mine" | |
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
#!/bin/bash | |
# Adding php wrapper | |
user="$1" | |
domain="$2" | |
ip="$3" | |
home_dir="$4" | |
docroot="$5" | |
wrapper_script="#!/bin/sh | |
PHPRC=/usr/local/lib |
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
<VirtualHost %ip%:%web_port%> | |
ServerName %domain_idn% | |
%alias_string% | |
ServerAdmin %email% | |
DocumentRoot %docroot% | |
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/ | |
Alias /vstats/ %home%/%user%/web/%domain%/stats/ | |
Alias /error/ %home%/%user%/web/%domain%/document_errors/ | |
SuexecUserGroup %user% %group% |
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
<VirtualHost %ip%:%web_ssl_port%> | |
ServerName %domain_idn% | |
%alias_string% | |
ServerAdmin %email% | |
DocumentRoot %sdocroot% | |
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/ | |
Alias /vstats/ %home%/%user%/web/%domain%/stats/ | |
Alias /error/ %home%/%user%/web/%domain%/document_errors/ | |
SuexecUserGroup %user% %group% |
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 | |
class File{ | |
static function write($ruta, $texto){ | |
$file = fopen($ruta, "a"); | |
fwrite($file, $texto . PHP_EOL); | |
fclose($file); | |
} | |
} |