Se trata de las presentaciones que se usaron en las charlas de DEFCON en formato PDF.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú<html>
<head>
<title>Sitio compromido al maximo</title>
<meta http-equiv="Vary" content="Accept-Encoding" />
<link rel="stylesheet" type="text/css" href="codigo.cgz" />
</head>
<body>
<div id="caja">Caja en el centro con background amarillo y borde negro.</div>
</body>
</html>
<?php
/*
* Returns the most repetead words (llonger than $long)
* given in a string
*@author MadPitbull
*/
function kWords($txt, $lim, $long = 3) {
$e = explode(" ", str_replace(array(",", "."), " ", strtolower($txt)));
$a = array_count_values($e);
arsort($a); array_shift($a);
$p = array_keys($a);
for ($l = 0; $l < count($p); $l++) {
if (strlen($p[$l]) >= $long ) {
$f[] = $p[$l];
}
}
for ($i = 0; $i < $lim; $i++) {
$kW[] = $f[$i];
}
return $kW;
}
$txt = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";
$txt2 = "Silence! Stupid monkey. I kill you. You think you\'r better than my chicken! NO! Stupid monkey. My chicken is better than you! I kill you! Stupid monkey... my chicken is the best!";
$txt3 = "Note that in a multidimensional array, each element may be identified by a _sequence_ of keys, i.e. the keys that lead towards that element. Thus \"preserving keys\" may have different interpretations. Ivan's function for example creates a two-dimensional array preserving the last two keys. Other functions below create a one-dimensional array preserving the last key. For completeness, I will add a function that merges the key sequence by a given separator and a function that preserves the last n keys, where n is arbitrary.";
kWords($txt, 5, 4);
?>
Array
(
[0] => stupid
[1] => monkey
[2] => chicken
[3] => you!
[4] => than
)
Accept-Encoding: gzip
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>
<files *.js.gz>
AddType "text/javascript" .gz
AddEncoding gzip .gz
</files>
<files *.css.gz>
AddType "text/css" .gz
AddEncoding gzip .gz
</files>
RewriteEngine on
#Check to see if browser can accept gzip files.
ReWriteCond %{HTTP:accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Safari
#make sure there's no trailing .gz on the url
ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$
#check to see if a .gz version of the file exists.
RewriteCond %{REQUEST_FILENAME}.gz -f
#All conditions met so add .gz to URL filename (invisibly)
RewriteRule ^(.+) $1.gz [QSA,L]
AddEncoding gzip .gz
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Safari
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# Or, compress certain file types by extension:
<Files *.html>
SetOutputFilter DEFLATE
</Files>