<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Eliseo Ortiz WebLog</title>
	<atom:link href="http://www.eliseoov.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.eliseoov.org</link>
	<description>Blog de Eliseo Ortiz Valdez</description>
	<lastBuildDate>Mon, 03 May 2010 13:24:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Configuración básica SE Linux parte I</title>
		<link>http://www.eliseoov.org/?p=94</link>
		<comments>http://www.eliseoov.org/?p=94#comments</comments>
		<pubDate>Sat, 10 Apr 2010 23:06:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[seguridad]]></category>
		<category><![CDATA[SE Linux]]></category>
		<category><![CDATA[Seguridad en SO]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=94</guid>
		<description><![CDATA[Security Enhance Linux, un proyecto impulsado por la NSA de los EUA, basado en previas investigaciones  background, tiene como objetivo proveer de la funcionalidad necesaria en seguridad para sistemas operativos. En este blog iré posteando las configuraciones más comunes, con una sinopsis sencilla para cada comando. Puesto que si no se tiene bien configurado <a href="http://www.eliseoov.org/?p=94" class="more-link">Más &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Security Enhance Linux, un proyecto impulsado por la NSA de los EUA, basado en previas investigaciones <a href="http://www.nsa.gov/research/selinux/background.shtml" alt="previas investigaciones del SE Linux"> background</a>, tiene como objetivo proveer de la funcionalidad necesaria en seguridad para sistemas operativos. En este blog iré posteando las configuraciones más comunes, con una sinopsis sencilla para cada comando. Puesto que si no se tiene bien configurado el SE Linux es preferible deshabilitarlo o bien ponerlo en moodo permisivo.</p>
<p>+Permitir httpd conexión al puerto 3306<br />
setsebool -P httpd_can_network_connect=1</p>
<p>+permitir lectura de directorios por vsfptd<br />
setsebook -P ftp_home_dir=1</p>
<p>+cambiar el contexto de un directorio movido a /var/www/html<br />
 chcon -R -t httpd_sys_content_t carpeta/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=94</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Breve tutorial para uso de la API Flickr en aplicaciones con PHP.</title>
		<link>http://www.eliseoov.org/?p=82</link>
		<comments>http://www.eliseoov.org/?p=82#comments</comments>
		<pubDate>Wed, 17 Mar 2010 16:31:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Código]]></category>
		<category><![CDATA[flickr API]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web develop]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=82</guid>
		<description><![CDATA[Introducción.
Este tutorial tiene como objetivo proveer de los pasos necesarios para empezar a desarrollar aplicaciones utilizando API de flickr para PHP. Aunque la utilización de esta API es relativamente sencilla, hay poca información desde que se crean las claves necesarias para autenticación, al realizar una petición REST. De esto tratará este breve tutorial. Para este <a href="http://www.eliseoov.org/?p=82" class="more-link">Más &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Introducción.<br />
Este tutorial tiene como objetivo proveer de los pasos necesarios para empezar a desarrollar aplicaciones utilizando API de flickr para PHP. Aunque la utilización de esta API es relativamente sencilla, hay poca información desde que se crean las claves necesarias para autenticación, al realizar una petición REST. De esto tratará este breve tutorial. Para este caso utilizaremos la API PHP, no por que sea la mejor si no por que esta fue la que probé.</p>
<p>Requerimientos.<br />
Tiempo para jugar, ganas para jugar.<br />
Para este tutorial necesitaremos PHP 5.x, haber bajado la librería PHP desde: http://sourceforge.net/projects/phlickr/<br />
Descomprimir la librería en el directorio de documentos html del servidor HTTP en uso.<br />
<span id="more-82"></span></p>
<p>Autenticación.<br />
Antes de poder hacer uso de la API PHP será necesario  obtener  dos clave válida para la API(API key  &#038; API  secret), en esta liga: http://www.flickr.com/services/apps/create/apply  (solo por confirmar, es obviamente necesario tener una cuenta flickr)<br />
Posteriormente necesitamos crear un controlador de autenticación para generar un token, sin estos no podremos realizar peticiones REST. Para más información de como generar dichas claves podemos remitirnos a la siguiente liga: http://www.flickr.com/services/api/auth.howto.web.html . Sin embargo en la librería que hemos bajado se encuentra una herramienta para generar un archivo que contendrá las claves necesarias. Dicha herramienta se encuentra en la ruta: flickr/Tools, donde flickr es el directorio descomprimido de la librería PHP de la API. El script se llama GetToken.php. A continuación el código:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p82code4'); return false;">Ver código</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p824"><td class="code" id="p82code4"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/local/bin/php -q
</span><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">include_once</span> <span style="color: #0000ff;">'../Phlickr/Api.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * I wrote this script because it's a real pain in the ass to generate the
 * authorization tokens. Hopefully this will make it a little easier.
 *
 * @version $Id$
 * @author  Andrew Morton &lt;drewish@katherinehouse.com&gt;
 * @license http://opensource.org/licenses/lgpl-license.php
 *          GNU Lesser General Public License, Version 2.1
 */</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;This script will help you retrieve a Flickr authorization token.<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Prevent PHP from enforcing a time limit on this script</span>
<a href="http://www.php.net/set_time_limit"><span style="color: #990000;">set_time_limit</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Get the user's API key and secret.</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'API Key: '</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$api_key</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/fgets"><span style="color: #990000;">fgets</span></a><span style="color: #009900;">&#40;</span>STDIN<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'API Secret: '</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$api_secret</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/fgets"><span style="color: #990000;">fgets</span></a><span style="color: #009900;">&#40;</span>STDIN<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Create an API object, then request a frob.</span>
<span style="color: #000088;">$api</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Phlickr_Api<span style="color: #009900;">&#40;</span><span style="color: #000088;">$api_key</span><span style="color: #339933;">,</span> <span style="color: #000088;">$api_secret</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$frob</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$api</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">requestFrob</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Got a frob: <span style="color: #006699; font-weight: bold;">$frob</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Find out the desired permissions.</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'Permissions (read, write, or delete): '</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$perms</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/fgets"><span style="color: #990000;">fgets</span></a><span style="color: #009900;">&#40;</span>STDIN<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Build the authentication URL.</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$api</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">buildAuthUrl</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$perms</span><span style="color: #339933;">,</span> <span style="color: #000088;">$frob</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Open the following URL in your browser and and authorize:<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #006699; font-weight: bold;">$url</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Press return when you're finished...<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/fgets"><span style="color: #990000;">fgets</span></a><span style="color: #009900;">&#40;</span>STDIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// After they've granted permission, convert the frob to a token.</span>
<span style="color: #000088;">$token</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$api</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setAuthTokenFromFrob</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$frob</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Print out the token.</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Auth token: <span style="color: #006699; font-weight: bold;">$token</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Optionally, create a config file.</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'Save these settings? (y/N): '</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$saveit</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strtolower"><span style="color: #990000;">strtolower</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/fgets"><span style="color: #990000;">fgets</span></a><span style="color: #009900;">&#40;</span>STDIN<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$saveit</span><span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'y'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'Filename: '</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/fgets"><span style="color: #990000;">fgets</span></a><span style="color: #009900;">&#40;</span>STDIN<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Saving settings to '<span style="color: #006699; font-weight: bold;">$filename</span>'<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$api</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">saveAs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Use this with Phlickr_Api::createFrom() to create an object.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Es necesario antes de correr el script, tener nuestras claves API que fueron generadas perviamente, pues el script pedirá estas para la generación del token. Como se ve en el código, el script nos pedirá si queremos salvar las configuraciones en un archivo, una vez que ingresemos el nombre este script generará un archivo similar a este:</p>
<p>      api_key=0123456789abcdef0123456789abcedf<br />
     api_secret=abcedf0123456789<br />
     api_token=123-abcdef0123456789<br />
     cache_file= cache.tmp</p>
<p>Ejecución<br />
Una vez obtenido las claves necesarias el scrtip, es tiempo de realizar una petición a flickr.</p>
<p>Nota.- Antes de comenzar recomiendo analizar las rutas del require_once que se encuentran en el archivo Api.php, pues es posible que sean necesarias algunas adecuaciones.<br />
Ahora realizaremos una petición a flickr, utilizando el método de búsqueda (flickr.photos.search) , dándole como parámetro una palabra clave.</p>
<p>Para saber cuales son y que variables necesita pasar como argumento cada método haremos uso de la página: http://www.flickr.com/services/api/, donde se encuentran todos los métodos disponibles. En este caso sería bueno dar un vistazo a la liga correspondiente a nuestro método: http://www.flickr.com/services/api/flickr.photos.search.html. Tenemos que tener en cuenta, que este método solo devolverá imágenes disponibles para el usuario que se encuentra realizando la petición, para que sea posible obtener información a cerca de fotos privadas es necesario realizar la autenticación correspondiente.</p>
<p>El argumento obligatorio es la clave &#8220;API key&#8221;, sin embargo en nuestra aplicación utilizaremos la función executeMethod, y como ya hemos creado el objeto Phlickr_Api  en la variable $api, no será necesario ingresar el argumento API key, para la petición.</p>
<p>La petición devolverá un documento XML como el siguiente:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p82code5'); return false;">Ver código</a> XML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p825"><td class="code" id="p82code5"><pre class="xml" style="font-family:monospace;">&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;photos</span> <span style="color: #000066;">page</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">pages</span>=<span style="color: #ff0000;">&quot;89&quot;</span> <span style="color: #000066;">perpage</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">total</span>=<span style="color: #ff0000;">&quot;881&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;photo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;2636&quot;</span> <span style="color: #000066;">owner</span>=<span style="color: #ff0000;">&quot;47058503995@N01&quot;</span> </span>
<span style="color: #009900;">		<span style="color: #000066;">secret</span>=<span style="color: #ff0000;">&quot;a123456&quot;</span> <span style="color: #000066;">server</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;test_04&quot;</span></span>
<span style="color: #009900;">		<span style="color: #000066;">ispublic</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">isfriend</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">isfamily</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;photo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;2635&quot;</span> <span style="color: #000066;">owner</span>=<span style="color: #ff0000;">&quot;47058503995@N01&quot;</span></span>
<span style="color: #009900;">		<span style="color: #000066;">secret</span>=<span style="color: #ff0000;">&quot;b123456&quot;</span> <span style="color: #000066;">server</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;test_03&quot;</span></span>
<span style="color: #009900;">		<span style="color: #000066;">ispublic</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">isfriend</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">isfamily</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/photos<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>En nuestra aplicación seleccionamos los elementos que nos interesa y generamos las ligas href de cada imágen y la liga de la página que corresponde a la foto.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p82code6'); return false;">Ver código</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p826"><td class="code" id="p82code6"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'../includes/services/flickr/Phlickr/Api.php'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$api</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Phlickr_Api<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'a192837oiabcccffccca'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'6363636adaeadaead3'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'734344534343dabb4-767564537272ceb4'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$request</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
		        <span style="color: #0000ff;">'tags'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'nazca'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'per_page'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'10'</span>
		    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$responseXML</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$api</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">executeMethod</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'flickr.photos.search'</span><span style="color: #339933;">,</span><span style="color: #000088;">$request</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dom</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DomDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$up</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> site_Photos<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dom</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">loadXML</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$responseXML</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">//echo $dom-&gt;saveXML(); //dump dom into a string</span>
			<span style="color: #000088;">$photos</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dom</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;photo&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$photos</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$photo</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$photo_id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$photo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000088;">$photo_owner</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$photo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;owner&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000088;">$photo_title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$photo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #666666; font-style: italic;">/*
					   Esta es la notación para obtener la página que corresponde a la foto
					   http://www.flickr.com/[owner]/[idPhoto]
					*/</span>
					<span style="color: #000088;">$photo_page</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://www.flickr.com/photos/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$photo_owner</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$photo_id</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #666666; font-style: italic;">/*
					  	Este es la notación requerida para obtener la imagen en tamaño pequeño (s) o mediano (m), para visualización
						http://farm[numberFarm].static.flickr.com/[numberServer]/[idPhoto]_[secret]_[size(s|m)].jpg
					*/</span>
					<span style="color: #000088;">$farm</span> <span style="color: #339933;">=</span>   <span style="color: #000088;">$photo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;farm&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000088;">$secret</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$photo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;secret&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000088;">$server</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$photo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;server&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000088;">$image_src</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://farm&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$farm</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;.static.flickr.com/&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$server</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$photo_id</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;_&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$secret</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;_s.jpg&quot;</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;ID: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$photo_id</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Owner:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$photo_owner</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Title:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$photo_title</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; PHOTO PAGE:&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$photo_page</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;IMG SRC:&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$image_src</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=82</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Libro “Integrando AJAX &amp; PHP” a la venta</title>
		<link>http://www.eliseoov.org/?p=67</link>
		<comments>http://www.eliseoov.org/?p=67#comments</comments>
		<pubDate>Wed, 17 Mar 2010 16:16:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[documento]]></category>
		<category><![CDATA[tutoriales]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ria]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=67</guid>
		<description><![CDATA[El objetivo de dicha edición es:
Proveer las herramientas necesarias para que el profesional desarrolle o integre aplicaciones web de segunda generación, conocidas como web 2.0. Con ayuda de lenguaje de programación PHP en la parte de servidor y AJAX em la generación de Aplicaciones Ricas para la Internet (RIA).
Ver Publicación

]]></description>
			<content:encoded><![CDATA[<p>El objetivo de dicha edición es:<br />
Proveer las herramientas necesarias para que el profesional desarrolle o integre aplicaciones web de segunda generación, conocidas como web 2.0. Con ayuda de lenguaje de programación PHP en la parte de servidor y AJAX em la generación de Aplicaciones Ricas para la Internet (RIA).</p>
<p><a href="http://www.lulu.com/content/e-book/integrando-ajax-php/8118405" alt="Integrando PHP &#038; AJAX publication">Ver Publicación</a></p>
<p><a href="http://www.lulu.com/commerce/index.php?fBuyContent=8118405"><img src="http://www.lulu.com/services/buy_now_buttons/images/book_blue.gif" border="0" alt="Support independent publishing: Buy this e-book on Lulu."></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=67</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saber Información de los usuarios a través de un web service</title>
		<link>http://www.eliseoov.org/?p=75</link>
		<comments>http://www.eliseoov.org/?p=75#comments</comments>
		<pubDate>Fri, 29 Jan 2010 17:00:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Código]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[maxmind]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=75</guid>
		<description><![CDATA[La empresa MaxMind tiene disponible APIS para poder obtener información del País, ciudad, Región, Latitud y Longitud de los visitantes. A través de la IP.
La empresa cuenta con dos versiones, la gratuita, que es la que usamos en el ejemplo posterior y la de paga, donde esta última ofrece una exactitud mayor, además de estar actualizada <a href="http://www.eliseoov.org/?p=75" class="more-link">Más &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>La empresa <a href="http://www.maxmind.com/">MaxMind</a> tiene disponible APIS para poder obtener información del País, ciudad, Región, Latitud y Longitud de los visitantes. A través de la IP.<br />
La empresa cuenta con dos versiones, la gratuita, que es la que usamos en el ejemplo posterior y la de paga, donde esta última ofrece una exactitud mayor, además de estar actualizada en su base de datos cada semana.<br />
Dichas APIS se encuentran disponibles para los siguientes lenguajes de programación: (C, Perl, PHP, Java, Python, C#, Ruby, MS COM, VB.NET, Pascal, JavaScript. Para nuestro ejemplo utilizaremos JavaScript</p>
<p>Ejemplo del código:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p75code8'); return false;">Ver código</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p758"><td class="code" id="p75code8"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://j.maxmind.com/app/geoip.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">&gt;</span>Código del País<span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>geoip_country_code<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">&gt;</span>Nombre del País<span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>geoip_country_name<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">&gt;</span>Ciudad<span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>geoip_city<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">&gt;</span>Region<span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>geoip_region<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">&gt;</span>Nombre de la Region<span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>geoip_region_name<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">&gt;</span>Latitud<span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>geoip_latitude<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">&gt;</span>Longitud<span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>geoip_longitude<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">&gt;</span>Código Postal<span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>geoip_postal_code<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=75</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Obteniendo código JSON a partir de una tabla en MySQL.</title>
		<link>http://www.eliseoov.org/?p=65</link>
		<comments>http://www.eliseoov.org/?p=65#comments</comments>
		<pubDate>Tue, 15 Dec 2009 16:00:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Código]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=65</guid>
		<description><![CDATA[Es posible que dentro de nuestras aplicaciones PHP tendamos que requerir datos a partir de tablas en formato JSON. Para el intercambio de información o bien para aplicaciones específicas que necesiten analizar datos en este formato.
JSON (JavaScript Object Notation) es un formato para intercambio de datos ligero. Fácil
de lectura y escritura para los humanos y <a href="http://www.eliseoov.org/?p=65" class="more-link">Más &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Es posible que dentro de nuestras aplicaciones PHP tendamos que requerir datos a partir de tablas en formato JSON. Para el intercambio de información o bien para aplicaciones específicas que necesiten analizar datos en este formato.</p>
<p>JSON (JavaScript Object Notation) es un formato para intercambio de datos ligero. Fácil<br />
de lectura y escritura para los humanos y fácil para las máquinas analizar y generar.<br />
Aunque JSON es un formato de texto es completamente independiente de cualquier<br />
lenguaje sin embargo usa convenciones que son familiar a programadores de lenguajes<br />
provenientes de la familia del lenguaje de programación C, incluyendo C++, C#, java,<br />
JavaScript, Perl, Python y mpara intercambio de datos.<br />
<span id="more-65"></span><br />
A continuación una función en PHP que nos devuelve automáticamente los datos contenidos en una tabla en formato JSON. En este caso para el acceso a la Base de datos nos encontramos utilizando código del programa: ezSQL_mysql por: Justin vincent (http://php.justinvincent.com)</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p65code10'); return false;">Ver código</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6510"><td class="code" id="p65code10"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span>  get_Json_From_Table<span style="color: #009900;">&#40;</span><span style="color: #000088;">$table_name</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
 <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$mydb</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$table_name</span> WHERE id_expe='<span style="color: #006699; font-weight: bold;">$number_Expe</span>'&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mydb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>query<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$mydb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_results<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$query2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = '<span style="color: #006699; font-weight: bold;">$table_name</span>'&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$data2</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$mydb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_results<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$name_colum</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data2</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$col</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$name_column</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$col</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>COLUMN_NAME<span style="color: #339933;">;</span>
			<span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$number_column</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$name_column</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$string</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$string</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;{label: <span style="color: #000099; font-weight: bold;">\&quot;</span>datos_&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$table_name</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>, items: [&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$col</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #000088;">$number_column</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>  <span style="color: #000088;">$string</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;{&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$name_column</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;: <span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span> <span style="color: #000088;">$col</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #000088;">$name_column</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>,&quot;</span><span style="color: #339933;">;</span>  <span style="color: #009900;">&#125;</span>
				<span style="color: #000088;">$string</span> <span style="color: #339933;">.=</span>  <span style="color: #000088;">$name_column</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;: <span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span> <span style="color: #000088;">$col</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #000088;">$name_column</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>,&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$j</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$j</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$number_column</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$string</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$name_column</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;: <span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$col</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #000088;">$name_column</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">;</span>
					<span style="color: #000088;">$string</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;},&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$string</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;]}&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$string</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=65</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trucos de compilación con GCC Parte I</title>
		<link>http://www.eliseoov.org/?p=56</link>
		<comments>http://www.eliseoov.org/?p=56#comments</comments>
		<pubDate>Mon, 19 Oct 2009 15:49:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tutoriales]]></category>
		<category><![CDATA[asm]]></category>
		<category><![CDATA[shellcode]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=56</guid>
		<description><![CDATA[En un post anterior mostramos como obtener el bytecode a partir de un código en C.
Ahora mostraremos diversas cualidades de GCC que explotaremos para generar el código máquina, código objeto y código ejecutable.
El programa que se utilizaré para los fines prácticos es el siguiente, que llamaremos shellcode.c:

?Ver código C#include 
&#160;
int main&#40;void&#41;&#123;
char *arg&#91;2&#93;;
arg&#91;0&#93; = &#34;/bin/sh&#34;;
arg&#91;1&#93; = <a href="http://www.eliseoov.org/?p=56" class="more-link">Más &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>En un post anterior mostramos como obtener el bytecode a partir de un código en C.<br />
Ahora mostraremos diversas cualidades de GCC que explotaremos para generar el código máquina, código objeto y código ejecutable.</p>
<p>El programa que se utilizaré para los fines prácticos es el siguiente, que llamaremos shellcode.c:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p56code13'); return false;">Ver código</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5613"><td class="code" id="p56code13"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include </span>
&nbsp;
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #993333;">char</span> <span style="color: #339933;">*</span>arg<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
arg<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/bin/sh&quot;</span><span style="color: #339933;">;</span>
arg<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> NULL<span style="color: #339933;">;</span>
execve<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;/bin/sh&quot;</span><span style="color: #339933;">,</span> arg<span style="color: #339933;">,</span> NULL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Para compilar el código anterior basta con realizar lo siguiente:<br />
$gcc -o shellcode -ggdb -static shellcode.c</p>
<p>La bandera -ggdb produce información de depuración usada por GDB.</p>
<p>Si deseamos el código ensamblador ejecutamos las siguientes directrices con gcc:<br />
$gcc -S -o shellcode.s shellcode.c</p>
<p>Para obtener el “código binario” a partir del código ensamblador:<br />
Para caso de FreeBSD:<br />
$nasm -f aoutb shellcode.asm<br />
Para el caso de linux:<br />
$nasm -f elf shellcode.asm<br />
Para el caso de Mac OS X:<br />
$as -o shellcode.o shellcode.s</p>
<p>Del código binario a código ejecutable:<br />
Para el caso de linux:<br />
$ld -s -o shellcode shellcode.o<br />
Para el caso de Mac OS X:<br />
$gcc -o shellcode shellcode.o</p>
<p>Para observar el código máquina y ensamblador de un ejecutable:<br />
$objdump -d shellcode</p>
<p>Para el caso de Mac OS X será necesario tener instalado binutils, si este no se encuentra instalado,<br />
es posible utilizar darwin port para esto, ejecutando lo siguiente:<br />
$sudo port install binutils</p>
<p>A continuación la salida del comando anterior ejecutado:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p56code14'); return false;">Ver código</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5614"><td class="code" id="p56code14"><pre class="asm" style="font-family:monospace;">shellcode<span style="color: #339933;">:</span>     file format elf32<span style="color: #339933;">-</span>i386
&nbsp;
Disassembly of section <span style="color: #339933;">.</span>init<span style="color: #339933;">:</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">08048250</span> &amp;lt<span style="color: #666666; font-style: italic;">;_init&amp;gt;:</span>
 <span style="color: #0000ff;">8048250</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">55</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span>
 <span style="color: #0000ff;">8048251</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">89</span> e5                   <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebp</span>
 <span style="color: #0000ff;">8048253</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> ec <span style="color: #0000ff;">08</span>                <span style="color: #00007f; font-weight: bold;">sub</span>    $<span style="color: #0000ff;">0x8</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 <span style="color: #0000ff;">8048256</span><span style="color: #339933;">:</span>       e8 <span style="color: #0000ff;">79</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>          <span style="color: #00007f; font-weight: bold;">call</span>   80482d4 
 804825b<span style="color: #339933;">:</span>       e8 <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">01</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>          <span style="color: #00007f; font-weight: bold;">call</span>   <span style="color: #0000ff;">8048360</span> 
 <span style="color: #0000ff;">8048260</span><span style="color: #339933;">:</span>       e8 eb <span style="color: #0000ff;">01</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>          <span style="color: #00007f; font-weight: bold;">call</span>   <span style="color: #0000ff;">8048450</span> &amp;lt<span style="color: #666666; font-style: italic;">;__do_global_ctors_aux&amp;gt;</span>
 <span style="color: #0000ff;">8048265</span><span style="color: #339933;">:</span>       c9                      <span style="color: #00007f; font-weight: bold;">leave</span>
 <span style="color: #0000ff;">8048266</span><span style="color: #339933;">:</span>       c3                      <span style="color: #00007f; font-weight: bold;">ret</span>
Disassembly of section <span style="color: #339933;">.</span>plt<span style="color: #339933;">:</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">08048268</span> &amp;lt<span style="color: #666666; font-style: italic;">;__gmon_start__@plt-0x10&amp;gt;:</span>
 <span style="color: #0000ff;">8048268</span><span style="color: #339933;">:</span>       ff <span style="color: #0000ff;">35</span> <span style="color: #0000ff;">90</span> <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>       pushl  <span style="color: #0000ff;">0x8049590</span>
 804826e<span style="color: #339933;">:</span>       ff <span style="color: #0000ff;">25</span> <span style="color: #0000ff;">94</span> <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>       <span style="color: #00007f; font-weight: bold;">jmp</span>    <span style="color: #339933;">*</span><span style="color: #0000ff;">0x8049594</span>
 <span style="color: #0000ff;">8048274</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>                   <span style="color: #00007f; font-weight: bold;">add</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">al</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">eax</span><span style="color: #009900; font-weight: bold;">&#41;</span>
        <span style="color: #339933;">...</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">08048278</span> &amp;lt<span style="color: #666666; font-style: italic;">;__gmon_start__@plt&amp;gt;:</span>
 <span style="color: #0000ff;">8048278</span><span style="color: #339933;">:</span>       ff <span style="color: #0000ff;">25</span> <span style="color: #0000ff;">98</span> <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>       <span style="color: #00007f; font-weight: bold;">jmp</span>    <span style="color: #339933;">*</span><span style="color: #0000ff;">0x8049598</span>
<span style="color: #adadad; font-style: italic;">0482</span>7e<span style="color: #339933;">:</span>       <span style="color: #0000ff;">68</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>          <span style="color: #00007f; font-weight: bold;">push</span>   $<span style="color: #0000ff;">0x0</span>
 <span style="color: #0000ff;">8048283</span><span style="color: #339933;">:</span>       e9 e0 ff ff ff          <span style="color: #00007f; font-weight: bold;">jmp</span>    <span style="color: #0000ff;">8048268</span> &amp;lt<span style="color: #666666; font-style: italic;">;_init+0x18&amp;gt;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">08048288</span> &amp;lt<span style="color: #666666; font-style: italic;">;__libc_start_main@plt&amp;gt;:</span>
 <span style="color: #0000ff;">8048288</span><span style="color: #339933;">:</span>       ff <span style="color: #0000ff;">25</span> 9c <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>       <span style="color: #00007f; font-weight: bold;">jmp</span>    <span style="color: #339933;">*</span><span style="color: #0000ff;">0x804959c</span>
 804828e<span style="color: #339933;">:</span>       <span style="color: #0000ff;">68</span> <span style="color: #0000ff;">08</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>          <span style="color: #00007f; font-weight: bold;">push</span>   $<span style="color: #0000ff;">0x8</span>
 <span style="color: #0000ff;">8048293</span><span style="color: #339933;">:</span>       e9 d0 ff ff ff          <span style="color: #00007f; font-weight: bold;">jmp</span>    <span style="color: #0000ff;">8048268</span> &amp;lt<span style="color: #666666; font-style: italic;">;_init+0x18&amp;gt;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">08048298</span> <span style="color: #339933;">:</span>
 <span style="color: #0000ff;">8048298</span><span style="color: #339933;">:</span>       ff <span style="color: #0000ff;">25</span> a0 <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>       <span style="color: #00007f; font-weight: bold;">jmp</span>    <span style="color: #339933;">*</span><span style="color: #0000ff;">0x80495a0</span>
 804829e<span style="color: #339933;">:</span>       <span style="color: #0000ff;">68</span> <span style="color: #0000ff;">10</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>          <span style="color: #00007f; font-weight: bold;">push</span>   $<span style="color: #0000ff;">0x10</span>
 80482a3<span style="color: #339933;">:</span>       e9 c0 ff ff ff          <span style="color: #00007f; font-weight: bold;">jmp</span>    <span style="color: #0000ff;">8048268</span> &amp;lt<span style="color: #666666; font-style: italic;">;_init+0x18&amp;gt;</span>
Disassembly of section <span style="color: #339933;">.</span>text<span style="color: #339933;">:</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">080482b0</span> &amp;lt<span style="color: #666666; font-style: italic;">;_start&amp;gt;:</span>
 80482b0<span style="color: #339933;">:</span>       <span style="color: #0000ff;">31</span> ed                   <span style="color: #00007f; font-weight: bold;">xor</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebp</span>
 80482b2<span style="color: #339933;">:</span>       5e                      <span style="color: #00007f; font-weight: bold;">pop</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">esi</span>
 80482b3<span style="color: #339933;">:</span>       <span style="color: #0000ff;">89</span> e1                   <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ecx</span>
 80482b5<span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> e4 f0                <span style="color: #00007f; font-weight: bold;">and</span>    $<span style="color: #0000ff;">0xfffffff0</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 80482b8<span style="color: #339933;">:</span>       <span style="color: #0000ff;">50</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">eax</span>
 80482b9<span style="color: #339933;">:</span>       <span style="color: #0000ff;">54</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">esp</span>
 80482ba<span style="color: #339933;">:</span>       <span style="color: #0000ff;">52</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">edx</span>
<span style="color: #adadad; font-style: italic;">8048</span>2bb<span style="color: #339933;">:</span>       <span style="color: #0000ff;">68</span> d0 <span style="color: #0000ff;">83</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>          <span style="color: #00007f; font-weight: bold;">push</span>   $<span style="color: #0000ff;">0x80483d0</span>
 80482c0<span style="color: #339933;">:</span>       <span style="color: #0000ff;">68</span> e0 <span style="color: #0000ff;">83</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>          <span style="color: #00007f; font-weight: bold;">push</span>   $<span style="color: #0000ff;">0x80483e0</span>
 80482c5<span style="color: #339933;">:</span>       <span style="color: #0000ff;">51</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">ecx</span>
 80482c6<span style="color: #339933;">:</span>       <span style="color: #0000ff;">56</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">esi</span>
 80482c7<span style="color: #339933;">:</span>       <span style="color: #0000ff;">68</span> <span style="color: #0000ff;">84</span> <span style="color: #0000ff;">83</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>          <span style="color: #00007f; font-weight: bold;">push</span>   $<span style="color: #0000ff;">0x8048384</span>
 80482cc<span style="color: #339933;">:</span>       e8 b7 ff ff ff          <span style="color: #00007f; font-weight: bold;">call</span>   <span style="color: #0000ff;">8048288</span> &amp;lt<span style="color: #666666; font-style: italic;">;__libc_start_main@plt&amp;gt;</span>
 80482d1<span style="color: #339933;">:</span>       f4                      <span style="color: #00007f; font-weight: bold;">hlt</span>
 80482d2<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80482d3<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">080482d4</span> <span style="color: #339933;">:</span>
 80482d4<span style="color: #339933;">:</span>       <span style="color: #0000ff;">55</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span>
 80482d5<span style="color: #339933;">:</span>       <span style="color: #0000ff;">89</span> e5                   <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebp</span>
 80482d7<span style="color: #339933;">:</span>       <span style="color: #0000ff;">53</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">ebx</span>
 80482d8<span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> ec <span style="color: #0000ff;">04</span>                <span style="color: #00007f; font-weight: bold;">sub</span>    $<span style="color: #0000ff;">0x4</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 80482db<span style="color: #339933;">:</span>       e8 <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>          <span style="color: #00007f; font-weight: bold;">call</span>   <span style="color: #0000ff;">80482e0</span> 
 <span style="color: #0000ff;">80482e0</span><span style="color: #339933;">:</span>       5b                      <span style="color: #00007f; font-weight: bold;">pop</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">ebx</span>
 <span style="color: #0000ff;">80482e1</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">81</span> c3 ac <span style="color: #0000ff;">12</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>       <span style="color: #00007f; font-weight: bold;">add</span>    $<span style="color: #0000ff;">0x12ac</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebx</span>
 <span style="color: #0000ff;">80482e7</span><span style="color: #339933;">:</span>       8b <span style="color: #0000ff;">93</span> fc ff ff ff       <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #0000ff;">0xfffffffc</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">ebx</span><span style="color: #009900; font-weight: bold;">&#41;</span><span style="color: #339933;">,%</span><span style="color: #00007f;">edx</span>
 80482ed<span style="color: #339933;">:</span>       <span style="color: #0000ff;">85</span> d2                   <span style="color: #00007f; font-weight: bold;">test</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">edx</span><span style="color: #339933;">,%</span><span style="color: #00007f;">edx</span>
 80482ef<span style="color: #339933;">:</span>       <span style="color: #0000ff;">74</span> <span style="color: #0000ff;">05</span>                   <span style="color: #00007f; font-weight: bold;">je</span>     80482f6 
 80482f1<span style="color: #339933;">:</span>       e8 <span style="color: #0000ff;">82</span> ff ff ff          <span style="color: #00007f; font-weight: bold;">call</span>   <span style="color: #0000ff;">8048278</span> &amp;lt<span style="color: #666666; font-style: italic;">;__gmon_start__@plt&amp;gt;</span>
 80482f6<span style="color: #339933;">:</span>       <span style="color: #0000ff;">58</span>                      <span style="color: #00007f; font-weight: bold;">pop</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">eax</span>
 80482f7<span style="color: #339933;">:</span>       5b                      <span style="color: #00007f; font-weight: bold;">pop</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">ebx</span>
<span style="color: #adadad; font-style: italic;">8048</span>2f8<span style="color: #339933;">:</span>       c9                      <span style="color: #00007f; font-weight: bold;">leave</span>
 80482f9<span style="color: #339933;">:</span>       c3                      <span style="color: #00007f; font-weight: bold;">ret</span>
 80482fa<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80482fb<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80482fc<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80482fd<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80482fe<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80482ff<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">08048300</span> &amp;lt<span style="color: #666666; font-style: italic;">;__do_global_dtors_aux&amp;gt;:</span>
 <span style="color: #0000ff;">8048300</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">55</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span>
 <span style="color: #0000ff;">8048301</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">89</span> e5                   <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebp</span>
 <span style="color: #0000ff;">8048303</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">53</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">ebx</span>
 <span style="color: #0000ff;">8048304</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> ec <span style="color: #0000ff;">04</span>                <span style="color: #00007f; font-weight: bold;">sub</span>    $<span style="color: #0000ff;">0x4</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 <span style="color: #0000ff;">8048307</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">80</span> 3d ac <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span> <span style="color: #0000ff;">00</span>    cmpb   $<span style="color: #0000ff;">0x0</span><span style="color: #339933;">,</span><span style="color: #0000ff;">0x80495ac</span>
 804830e<span style="color: #339933;">:</span>       <span style="color: #0000ff;">75</span> <span style="color: #0000ff;">3f</span>                   <span style="color: #00007f; font-weight: bold;">jne</span>    <span style="color: #0000ff;">804834f</span> &amp;lt<span style="color: #666666; font-style: italic;">;__do_global_dtors_aux+0x4f&amp;gt;</span>
 <span style="color: #0000ff;">8048310</span><span style="color: #339933;">:</span>       b8 b8 <span style="color: #0000ff;">94</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>          <span style="color: #00007f; font-weight: bold;">mov</span>    $<span style="color: #0000ff;">0x80494b8</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 <span style="color: #0000ff;">8048315</span><span style="color: #339933;">:</span>       2d b4 <span style="color: #0000ff;">94</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>          <span style="color: #00007f; font-weight: bold;">sub</span>    $<span style="color: #0000ff;">0x80494b4</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 804831a<span style="color: #339933;">:</span>       c1 f8 <span style="color: #0000ff;">02</span>                <span style="color: #00007f; font-weight: bold;">sar</span>    $<span style="color: #0000ff;">0x2</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 804831d<span style="color: #339933;">:</span>       8d <span style="color: #0000ff;">58</span> ff                <span style="color: #00007f; font-weight: bold;">lea</span>    <span style="color: #0000ff;">0xffffffff</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">eax</span><span style="color: #009900; font-weight: bold;">&#41;</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebx</span>
 <span style="color: #0000ff;">8048320</span><span style="color: #339933;">:</span>       a1 a8 <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>          <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #0000ff;">0x80495a8</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 <span style="color: #0000ff;">8048325</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">39</span> c3                   <span style="color: #00007f; font-weight: bold;">cmp</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">eax</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebx</span>
 <span style="color: #0000ff;">8048327</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">76</span> <span style="color: #0000ff;">1f</span>                   <span style="color: #00007f; font-weight: bold;">jbe</span>    <span style="color: #0000ff;">8048348</span> &amp;lt<span style="color: #666666; font-style: italic;">;__do_global_dtors_aux+0x48&amp;gt;</span>
 <span style="color: #0000ff;">8048329</span><span style="color: #339933;">:</span>       8d b4 <span style="color: #0000ff;">26</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>    <span style="color: #00007f; font-weight: bold;">lea</span>    <span style="color: #0000ff;">0x0</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">esi</span><span style="color: #009900; font-weight: bold;">&#41;</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esi</span>
<span style="color: #adadad; font-style: italic;">8048</span><span style="color: #0000ff;">330</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> c0 <span style="color: #0000ff;">01</span>                <span style="color: #00007f; font-weight: bold;">add</span>    $<span style="color: #0000ff;">0x1</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 <span style="color: #0000ff;">8048333</span><span style="color: #339933;">:</span>       a3 a8 <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>          <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">eax</span><span style="color: #339933;">,</span><span style="color: #0000ff;">0x80495a8</span>
 <span style="color: #0000ff;">8048338</span><span style="color: #339933;">:</span>       ff <span style="color: #0000ff;">14</span> <span style="color: #0000ff;">85</span> b4 <span style="color: #0000ff;">94</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>    <span style="color: #00007f; font-weight: bold;">call</span>   <span style="color: #339933;">*</span><span style="color: #0000ff;">0x80494b4</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span><span style="color: #339933;">,</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#41;</span>
 <span style="color: #0000ff;">804833f</span><span style="color: #339933;">:</span>       a1 a8 <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>          <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #0000ff;">0x80495a8</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 <span style="color: #0000ff;">8048344</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">39</span> c3                   <span style="color: #00007f; font-weight: bold;">cmp</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">eax</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebx</span>
 <span style="color: #0000ff;">8048346</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">77</span> e8                   <span style="color: #00007f; font-weight: bold;">ja</span>     <span style="color: #0000ff;">8048330</span> &amp;lt<span style="color: #666666; font-style: italic;">;__do_global_dtors_aux+0x30&amp;gt;</span>
 <span style="color: #0000ff;">8048348</span><span style="color: #339933;">:</span>       c6 <span style="color: #0000ff;">05</span> ac <span style="color: #0000ff;">95</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span> <span style="color: #0000ff;">01</span>    movb   $<span style="color: #0000ff;">0x1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">0x80495ac</span>
 <span style="color: #0000ff;">804834f</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> c4 <span style="color: #0000ff;">04</span>                <span style="color: #00007f; font-weight: bold;">add</span>    $<span style="color: #0000ff;">0x4</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 <span style="color: #0000ff;">8048352</span><span style="color: #339933;">:</span>       5b                      <span style="color: #00007f; font-weight: bold;">pop</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">ebx</span>
 <span style="color: #0000ff;">8048353</span><span style="color: #339933;">:</span>       5d                      <span style="color: #00007f; font-weight: bold;">pop</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span>
 <span style="color: #0000ff;">8048354</span><span style="color: #339933;">:</span>       c3                      <span style="color: #00007f; font-weight: bold;">ret</span>
 <span style="color: #0000ff;">8048355</span><span style="color: #339933;">:</span>       8d <span style="color: #0000ff;">74</span> <span style="color: #0000ff;">26</span> <span style="color: #0000ff;">00</span>             <span style="color: #00007f; font-weight: bold;">lea</span>    <span style="color: #0000ff;">0x0</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">esi</span><span style="color: #009900; font-weight: bold;">&#41;</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esi</span>
 <span style="color: #0000ff;">8048359</span><span style="color: #339933;">:</span>       8d bc <span style="color: #0000ff;">27</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>    <span style="color: #00007f; font-weight: bold;">lea</span>    <span style="color: #0000ff;">0x0</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">edi</span><span style="color: #009900; font-weight: bold;">&#41;</span><span style="color: #339933;">,%</span><span style="color: #00007f;">edi</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">08048360</span> <span style="color: #339933;">:</span>
 <span style="color: #0000ff;">8048360</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">55</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span>
 <span style="color: #0000ff;">8048361</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">89</span> e5                   <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebp</span>
 <span style="color: #0000ff;">8048363</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> ec <span style="color: #0000ff;">08</span>                <span style="color: #00007f; font-weight: bold;">sub</span>    $<span style="color: #0000ff;">0x8</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 <span style="color: #0000ff;">8048366</span><span style="color: #339933;">:</span>       a1 bc <span style="color: #0000ff;">94</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>          <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #0000ff;">0x80494bc</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 804836b<span style="color: #339933;">:</span>       <span style="color: #0000ff;">85</span> c0                   <span style="color: #00007f; font-weight: bold;">test</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">eax</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 804836d<span style="color: #339933;">:</span>       <span style="color: #0000ff;">74</span> <span style="color: #0000ff;">12</span>                   <span style="color: #00007f; font-weight: bold;">je</span>     <span style="color: #0000ff;">8048381</span> 
 <span style="color: #0000ff;">804836f</span><span style="color: #339933;">:</span>       b8 <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>          <span style="color: #00007f; font-weight: bold;">mov</span>    $<span style="color: #0000ff;">0x0</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 <span style="color: #0000ff;">8048374</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">85</span> c0                   <span style="color: #00007f; font-weight: bold;">test</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">eax</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 <span style="color: #0000ff;">8048376</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">74</span> <span style="color: #0000ff;">09</span>                   <span style="color: #00007f; font-weight: bold;">je</span>     <span style="color: #0000ff;">8048381</span> 
<span style="color: #adadad; font-style: italic;">8048</span><span style="color: #0000ff;">378</span><span style="color: #339933;">:</span>       c7 <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">24</span> bc <span style="color: #0000ff;">94</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>    movl   $<span style="color: #0000ff;">0x80494bc</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #009900; font-weight: bold;">&#41;</span>
 <span style="color: #0000ff;">804837f</span><span style="color: #339933;">:</span>       ff d0                   <span style="color: #00007f; font-weight: bold;">call</span>   <span style="color: #339933;">*%</span><span style="color: #00007f;">eax</span>
 <span style="color: #0000ff;">8048381</span><span style="color: #339933;">:</span>       c9                      <span style="color: #00007f; font-weight: bold;">leave</span>
 <span style="color: #0000ff;">8048382</span><span style="color: #339933;">:</span>       c3                      <span style="color: #00007f; font-weight: bold;">ret</span>
 <span style="color: #0000ff;">8048383</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">08048384</span> <span style="color: #339933;">:</span>
 <span style="color: #0000ff;">8048384</span><span style="color: #339933;">:</span>       8d 4c <span style="color: #0000ff;">24</span> <span style="color: #0000ff;">04</span>             <span style="color: #00007f; font-weight: bold;">lea</span>    <span style="color: #0000ff;">0x4</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #009900; font-weight: bold;">&#41;</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ecx</span>
 <span style="color: #0000ff;">8048388</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> e4 f0                <span style="color: #00007f; font-weight: bold;">and</span>    $<span style="color: #0000ff;">0xfffffff0</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 804838b<span style="color: #339933;">:</span>       ff <span style="color: #0000ff;">71</span> fc                pushl  <span style="color: #0000ff;">0xfffffffc</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">ecx</span><span style="color: #009900; font-weight: bold;">&#41;</span>
 804838e<span style="color: #339933;">:</span>       <span style="color: #0000ff;">55</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span>
 <span style="color: #0000ff;">804838f</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">89</span> e5                   <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #339933;">,%</span><span style="color: #00007f;">ebp</span>
 <span style="color: #0000ff;">8048391</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">51</span>                      <span style="color: #00007f; font-weight: bold;">push</span>   <span style="color: #339933;">%</span><span style="color: #00007f;">ecx</span>
 <span style="color: #0000ff;">8048392</span><span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> ec <span style="color: #0000ff;">24</span>                <span style="color: #00007f; font-weight: bold;">sub</span>    $<span style="color: #0000ff;">0x24</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 <span style="color: #0000ff;">8048395</span><span style="color: #339933;">:</span>       c7 <span style="color: #0000ff;">45</span> f4 a0 <span style="color: #0000ff;">84</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>    movl   $<span style="color: #0000ff;">0x80484a0</span><span style="color: #339933;">,</span><span style="color: #0000ff;">0xfffffff4</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span><span style="color: #009900; font-weight: bold;">&#41;</span>
 804839c<span style="color: #339933;">:</span>       c7 <span style="color: #0000ff;">45</span> f8 <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>    movl   $<span style="color: #0000ff;">0x0</span><span style="color: #339933;">,</span><span style="color: #0000ff;">0xfffffff8</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span><span style="color: #009900; font-weight: bold;">&#41;</span>
 80483a3<span style="color: #339933;">:</span>       c7 <span style="color: #0000ff;">44</span> <span style="color: #0000ff;">24</span> <span style="color: #0000ff;">08</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span> <span style="color: #0000ff;">00</span>    movl   $<span style="color: #0000ff;">0x0</span><span style="color: #339933;">,</span><span style="color: #0000ff;">0x8</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #009900; font-weight: bold;">&#41;</span>
 80483aa<span style="color: #339933;">:</span>       <span style="color: #0000ff;">00</span>
 80483ab<span style="color: #339933;">:</span>       8d <span style="color: #0000ff;">45</span> f4                <span style="color: #00007f; font-weight: bold;">lea</span>    <span style="color: #0000ff;">0xfffffff4</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span><span style="color: #009900; font-weight: bold;">&#41;</span><span style="color: #339933;">,%</span><span style="color: #00007f;">eax</span>
 80483ae<span style="color: #339933;">:</span>       <span style="color: #0000ff;">89</span> <span style="color: #0000ff;">44</span> <span style="color: #0000ff;">24</span> <span style="color: #0000ff;">04</span>             <span style="color: #00007f; font-weight: bold;">mov</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">eax</span><span style="color: #339933;">,</span><span style="color: #0000ff;">0x4</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #009900; font-weight: bold;">&#41;</span>
 80483b2<span style="color: #339933;">:</span>       c7 <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">24</span> a0 <span style="color: #0000ff;">84</span> <span style="color: #0000ff;">04</span> <span style="color: #0000ff;">08</span>    movl   $<span style="color: #0000ff;">0x80484a0</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">esp</span><span style="color: #009900; font-weight: bold;">&#41;</span>
 80483b9<span style="color: #339933;">:</span>       e8 da fe ff ff          <span style="color: #00007f; font-weight: bold;">call</span>   <span style="color: #0000ff;">8048298</span> 
 80483be<span style="color: #339933;">:</span>       <span style="color: #0000ff;">83</span> c4 <span style="color: #0000ff;">24</span>                <span style="color: #00007f; font-weight: bold;">add</span>    $<span style="color: #0000ff;">0x24</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 80483c1<span style="color: #339933;">:</span>       <span style="color: #0000ff;">59</span>                      <span style="color: #00007f; font-weight: bold;">pop</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">ecx</span>
<span style="color: #adadad; font-style: italic;">8048</span>3c2<span style="color: #339933;">:</span>       5d                      <span style="color: #00007f; font-weight: bold;">pop</span>    <span style="color: #339933;">%</span><span style="color: #00007f;">ebp</span>
 80483c3<span style="color: #339933;">:</span>       8d <span style="color: #0000ff;">61</span> fc                <span style="color: #00007f; font-weight: bold;">lea</span>    <span style="color: #0000ff;">0xfffffffc</span><span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #339933;">%</span><span style="color: #00007f;">ecx</span><span style="color: #009900; font-weight: bold;">&#41;</span><span style="color: #339933;">,%</span><span style="color: #00007f;">esp</span>
 80483c6<span style="color: #339933;">:</span>       c3                      <span style="color: #00007f; font-weight: bold;">ret</span>
 80483c7<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80483c8<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80483c9<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80483ca<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80483cb<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80483cc<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80483cd<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80483ce<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
 80483cf<span style="color: #339933;">:</span>       <span style="color: #0000ff;">90</span>                      <span style="color: #00007f; font-weight: bold;">nop</span>
<span style="color: #339933;">....</span></pre></td></tr></table></div>

<p>Fuentes:</p>
<p>http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/</p>
<p>http://developer.apple.com/mac/library/documentation/DeveloperTools/Reference/Assembler/000-Introduction/introduction.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=56</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuración de Interfaces de red virtuales en VMware Fusion</title>
		<link>http://www.eliseoov.org/?p=53</link>
		<comments>http://www.eliseoov.org/?p=53#comments</comments>
		<pubDate>Sat, 17 Oct 2009 15:47:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=53</guid>
		<description><![CDATA[VMware Fusion es un producto de la empresa VMware para virtualizar sistemas operativos en cualquier MAC con procesador Intel.
En ocasiones es necesario cambiar la configuración de interfaces de red, estas propias para cada sistema operativo virtualizado. A continuación la serie de comandos necesarios a ejecutar en una terminal para poder realizar los cambios necesarios.
vim /Library/Application\ <a href="http://www.eliseoov.org/?p=53" class="more-link">Más &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>VMware Fusion es un producto de la empresa VMware para virtualizar sistemas operativos en cualquier MAC con procesador Intel.</p>
<p>En ocasiones es necesario cambiar la configuración de interfaces de red, estas propias para cada sistema operativo virtualizado. A continuación la serie de comandos necesarios a ejecutar en una terminal para poder realizar los cambios necesarios.</p>
<p>vim /Library/Application\ Support/VMware\ Fusion/vmnet1/dhcpd.conf /* editamos dhcod.conf de la interfaz seleccionada realizando los cambios a nuestra conveniencia */</p>
<p>/Library/Application\ Support/VMware\ Fusion/boot.sh –stop</p>
<p>rm /Library/Application\ Support/VMware\ Fusion/locations</p>
<p>/Library/Application\ Support/VMware\ Fusion/vmware-config-net.pl<br />
/*aquí el script realizará las configuraciones necesarias*/</p>
<p>/Library/Application\ Support/VMware\ Fusion/boot.sh –start</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=53</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Obtener un areglo de caracteres, a partir de una cadena de texto.</title>
		<link>http://www.eliseoov.org/?p=61</link>
		<comments>http://www.eliseoov.org/?p=61#comments</comments>
		<pubDate>Sun, 06 Sep 2009 15:00:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Código]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=61</guid>
		<description><![CDATA[El siguiente código es útil cuando se requiere formatear una cadena de caracteres en texto e insertar cada palabra en una celda, dentro de una tabla HTML.

?Ver código PHPfunction get_Rows_Table&#40;$chain&#41;&#123;
$col = array&#40;&#41;;
for&#40;$j=0;strlen&#40;$chain&#41;&#62;0;$j++&#41;&#123;
	/*obteniendo cada columna*/
	$pos = strrpos&#40;$chain,&#34; &#34;,0&#41;;
	$col_chain = substr&#40;$chain,$pos&#41;;
	$col&#91;$j&#93; = $col_chain;
	$chain = mb_substr&#40;$chain,0,$pos&#41;;
&#125;
&#160;
$string=&#34;&#60;tr&#62;&#34;;
for&#40;$i=count&#40;$col&#41;;$i&#62;0;$i--&#41;&#123;
	$string .= &#34;&#60;td style='border:1px solid black;'&#62;&#34;.$col&#91;$i&#93;.&#34;&#60;/td&#62;&#34;;
&#125;
$string .=&#34;&#60;/tr&#62;&#34;;
return $string;
&#125;

Para usar esta función solo basta <a href="http://www.eliseoov.org/?p=61" class="more-link">Más &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>El siguiente código es útil cuando se requiere formatear una cadena de caracteres en texto e insertar cada palabra en una celda, dentro de una tabla HTML.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p61code17'); return false;">Ver código</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6117"><td class="code" id="p61code17"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> get_Rows_Table<span style="color: #009900;">&#40;</span><span style="color: #000088;">$chain</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$col</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$j</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>strlen<span style="color: #009900;">&#40;</span><span style="color: #000088;">$chain</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$j</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">/*obteniendo cada columna*/</span>
	<span style="color: #000088;">$pos</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strrpos"><span style="color: #990000;">strrpos</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$chain</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$col_chain</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$chain</span><span style="color: #339933;">,</span><span style="color: #000088;">$pos</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$col</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$j</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$col_chain</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$chain</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mb_substr"><span style="color: #990000;">mb_substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$chain</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$pos</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$string</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;tr&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$col</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$string</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;td style='border:1px solid black;'&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$col</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/td&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$string</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$string</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Para usar esta función solo basta con realizar lo siguiente:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p61code18'); return false;">Ver código</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6118"><td class="code" id="p61code18"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cadena_texto</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in leo non ante mollis hendrerit&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;table&gt;&lt;tbody&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ouput</span> <span style="color: #339933;">.=</span>  get_Rows_Table<span style="color: #009900;">&#40;</span><span style="color: #000088;">$output</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=61</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diez mejores prácticas de seguridad para cómputo personal.</title>
		<link>http://www.eliseoov.org/?p=50</link>
		<comments>http://www.eliseoov.org/?p=50#comments</comments>
		<pubDate>Wed, 19 Aug 2009 15:46:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=50</guid>
		<description><![CDATA[Documento en inglés donde mostramos diez mejores prácticas para evitar amenazas de seguridad en computadores personales.
10 Best Sec Practices 	
]]></description>
			<content:encoded><![CDATA[<p>Documento en inglés donde mostramos diez mejores prácticas para evitar amenazas de seguridad en computadores personales.</p>
<p><a title="View 10 Best Sec Practices on Scribd" href="http://www.scribd.com/doc/18833542/10-Best-Sec-Practices" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;">10 Best Sec Practices</a> <object id="doc_546322167954307" name="doc_546322167954307" height="500" width="100%" type="application/x-shockwave-flash" data="http://d1.scribdassets.com/ScribdViewer.swf" style="outline:none;" ><param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf"><param name="wmode" value="opaque"><param name="bgcolor" value="#ffffff"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="FlashVars" value="document_id=18833542&#038;access_key=key-gysg7oyd32lq7kekreh&#038;page=1&#038;viewMode=list"><embed id="doc_546322167954307" name="doc_546322167954307" src="http://d1.scribdassets.com/ScribdViewer.swf?document_id=18833542&#038;access_key=key-gysg7oyd32lq7kekreh&#038;page=1&#038;viewMode=list" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="500" width="100%" wmode="opaque" bgcolor="#ffffff"></embed></object>	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=50</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seguridad Básica para redes 802.11</title>
		<link>http://www.eliseoov.org/?p=47</link>
		<comments>http://www.eliseoov.org/?p=47#comments</comments>
		<pubDate>Wed, 19 Aug 2009 15:44:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[documento]]></category>

		<guid isPermaLink="false">http://www.eliseoov.org/?p=47</guid>
		<description><![CDATA[El siguiente documento se encuentra basado en la recomendación que proporciona la NSA para asegurar redes que se encuentren dentro del estándar IEEE 802.11.
Seguridad Básica para 802.11  	
]]></description>
			<content:encoded><![CDATA[<p>El siguiente documento se encuentra basado en la recomendación que proporciona la NSA para asegurar redes que se encuentren dentro del estándar IEEE 802.11.</p>
<p><a title="View Seguridad Básica para 802.11  on Scribd" href="http://www.scribd.com/doc/18789435/Seguridad-Basica-para-80211-" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;">Seguridad Básica para 802.11 </a> <object id="doc_577180845468175" name="doc_577180845468175" height="500" width="100%" type="application/x-shockwave-flash" data="http://d1.scribdassets.com/ScribdViewer.swf" style="outline:none;" ><param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf"><param name="wmode" value="opaque"><param name="bgcolor" value="#ffffff"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="FlashVars" value="document_id=18789435&#038;access_key=key-c2xvv60bdl23y8b6fuo&#038;page=1&#038;viewMode=list"><embed id="doc_577180845468175" name="doc_577180845468175" src="http://d1.scribdassets.com/ScribdViewer.swf?document_id=18789435&#038;access_key=key-c2xvv60bdl23y8b6fuo&#038;page=1&#038;viewMode=list" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="500" width="100%" wmode="opaque" bgcolor="#ffffff"></embed></object>	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eliseoov.org/?feed=rss2&amp;p=47</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
