What kind of script is this?

Discussion in 'JavaScript' started by 313025, Apr 22, 2010.

  1. #1
    on this site http://ileech.biz/ there is a script that compels the user to click on the ad and then not close the pop up for atleast 10sec,before you can download anything.

    I know you can be banned for it and blah blah....but i want to know the script he has used there.
     
    313025, Apr 22, 2010 IP
  2. 313025

    313025 Greenhorn

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    from the source, i see in the head there is this:-

    <script type="text/javascript">
    timer = null;
    ventana = null;
    n = 10;
    aviso = false;
    function fnPopup(){
    	ventana = window.open('popup.html', 'popup', 'scrollbars=1,resizable=1,width=780,height=700,left=150,top=150');
    	$('input[name=btnDescargar]').val('10');
    	$('input[name=btnDescargar]').attr('disabled','disabled');
    	timer = setInterval("empieza_contar()", 1000);
    }
    function empieza_contar(){
    	if(ventana != null){
    		if(ventana.closed){
    			alert('You Close The Popup Before 10 Seconds');
    			clearInterval(timer); n = 10;
    			$('input[name=btnDescargar]').val('Preparar Descarga');
    			$('input[name=btnDescargar]').removeAttr('disabled');
    			return;
    		}
    		if(ventana.frames.length == 3){
    			return false;
    		}else{
    			n = n - 1;
    			$('input[name=btnDescargar]').val(n);
    			if(n == 0){
    				clearInterval(timer);
    				$('input[name=btnDescargar]').remove();
    				$('input[name=B2]').before('<input type="submit" value="Descargar">');
    			}
    		}
    	}
    }
    </script>
    Code (markup):
    Then on the pop up there is this:-

    <frameset frameborder="0" rows="0,*">
        <frameset cols="0,*" frameborder="0">
            <frame scrolling="no" src="vacio1" name="vacio1"/>
            <frame scrolling="no" src="vacio2" name="vacio2"/>
        </frameset>
    
    		
    <frame scrolling='yes'  frameborder="1" bordercolor="#0000FF" resizable=1  location='0' src='content.html' name='popup'/></frameset>
    Code (markup):

    The second part actually contains the ad.

    Could any one plz decode the entire thing?
     
    313025, Apr 22, 2010 IP
  3. nchandrol

    nchandrol Peon

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i got 404 error on the popup
    i think there might be something in popup.html

    although i am not a JS expert but i think that might be the problem
     
    nchandrol, Apr 22, 2010 IP
    gandham likes this.
  4. 313025

    313025 Greenhorn

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #4
    I have got through the most of the part and the code seems to work.i have decoded it to large extent and want to modify it to suit my needs.I need a javascript expert's opinion.This is were i getting stuck.Please help me solve this:-

    This is the part of code:-
    $('input[name=btnDescargar]').val(n);
    			if(n == 0){
    				clearInterval(timer);
    				$('input[name=btnDescargar]').remove();
    				$('input[name=B2]').before('<input type="submit" value="313025">');
    Code (markup):
    For the last line ie. for the value 313025 i want this function to be added:-

    onclick="javascript:togglecomments('abcd')"
    Code (markup):


    When i add it simply in front of it ie:-

    $('input[name=B2]').before('<input type="submit" value="313025" onclick="javascript:togglecomments('abcd')">');
    Code (markup):
    The whole script stops working.

    How can i do that?

    Plz help me out.
     
    313025, Apr 22, 2010 IP