Re: Sistema de Autentificacion
| From: | Emanuel Arguinarena | Date: | Tue, 15 Jun 2004 19:21:32 +0000 |
| Subject: | Re: Sistema de Autentificacion | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-49411@lists.php.net to get a copy of this message | ||
pero esa funcion de PECL, no te retorna el numero de
MAC del servidor, donde se corre el script PHP????
en ese caso no sirve, porque necesitariamos el numero
de MAc la placa del cliente.
Estube pensando y en java quizas se puede hacer, el
problema esta en que cuando ejecuten el applet, va a
aparecer el cartelityo de seguridad!!! Y sin
certificacion. (exepto que pagues)
La idea seria, ejecutar el applet, y que este guarde
el numero de MAC en una cookie, despues la consultas y
listo.
Mira este link, que muestra una forma no muy "bonita"
de como obtener el numero MAC, abria que extenderlo
para linux (pero lo veo poco viable,porque creo que
necesitas ser root)
http://forums.devshed.com/showpost.php?s=03fef1aa4e0b82d2f72095ac2baa3fd8&p=646216&postcount=5
Salute, si encuentro algo mas lo mando
--- Vicente <cppvic@yahoo.es> escribió: > informacion
escribió:
>
> i> La pregunta es clara, existe algun dato que sea
> unico en cada computadora y
> i> yo pueda obtener desde un navegador.
>
> Si lo que quieres es dar acceso a determinados
> usuarios en particular
> que ya conoces, una manera en extremo sencilla es
> añadiendo una cadena
> "hjh43hjds8" a la configuración del navegador en
> donde aparece su
> identificación. En Windows está en el registro.
> Esto puede ser filtrado por las variables de entorno
> de apache
> directamente, de manera que puedes filtrar visitas
> sin un sistema de
> login.
>
> La opción de usar la dirección de MAC es mucho mejor
> y también es
> viable pero según como, Por ejemplo esta función de
> abajo hace una
> consulta de shell con 'which arp' así que depende
> del entorno en donde
> se aplica; intranet, etc..
>
> Una opción mejor copn esto es pegarle un ojo a las
> librerías de PECL
>
http://pecl.php.net/packages.php?catpid=16&catname=Networking
>
>
> en la de netools tienes una función que de te
> devuelve el MAC address.
>
>
> salud,
>
>
>
> -----------------
>
> <?php
>
> function returnMacAddress() {
> // This code is under the GNU Public Licence
> // Written by michael_stankiewicz {don't spam} at
> yahoo {no spam} dot com
> // Tested only on linux, please report bugs
>
> // WARNING: the commands 'which' and 'arp' should
> be executable
> // by the apache user; on most linux boxes the
> default configuration
> // should work fine
>
> // Get the arp executable path
> $location =
which arp;
>
> // Execute the arp command and store the output in
> $arpTable
> $arpTable = $location;
>
> // Split the output so every line is an entry of
> the $arpSplitted array
> $arpSplitted = split("\n",$arpTable);
>
> // Get the remote ip address (the ip address of
> the client, the browser)
> $remoteIp = $GLOBALS['REMOTE_ADDR'];
>
> // Cicle the array to find the match with the
> remote ip address
> foreach ($arpSplitted as $value) {
> // Split every arp line, this is done in case
> the format of the arp
> // command output is a bit different than
> expected
> $valueSplitted = split(" ",$value);
>
> foreach ($valueSplitted as $spLine) {
> if ( preg_match("/$remoteIp/",$spLine) ) {
> $ipFound = true;
> }
>
> // The ip address has been found, now
> rescan all the string
> // to get the mac address
>
> if ($ipFound) {
> // Rescan all the string, in case the
> mac address, in the string
> // returned by arp, comes before the ip
> address (you know, Murphy's laws)
> reset($valueSplitted);
>
> foreach ($valueSplitted as $spLine) {
> if (
>
preg_match("/[0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-]".
> "[0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f]/i",$spLine)) {
> return $spLine;
> }
> }
> }
>
> $ipFound = false;
> }
> }
>
> return false;
> }
>
> ?>
>
> --
> Salud,
>
> --
> PHP Spanish Localization Talk Mailing List
> (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
------------
Contanos cómo usás el correo electrónico,
qué pensás del spam y de los virus.
Encuesta de Correo Yahoo!
Participá en
http://ar.surveys.yahoo.com/ar_mailpr2