---
# System prepended metadata

title: Web Page Hash and Web Page Screenshot

---

# Web Page Hash and Web Page Screenshot

To ingest url into a program that generate a final url web-page hash, web-page screenshot and store the redirect urls.

Tried Selenium and requests libraries to find an optimal solution. Unluckily, the requests python library is fast but doesn't support screenshot taking support. Therefore, I considered Selenium.

Here is a POC code;

```python=
# Import libraries
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import os
import hashlib


# Open the given URL
url = "https://t.co/jN1RvKT13I"


# Firefox webdriver
driver = webdriver.Firefox()
driver.get(url)


url_list = []
url_list.append(url)
# Check and store redirected urls
while url != driver.current_url:
    url_list.append(driver.current_url)
    url = driver.current_url
    
final_url = driver.current_url


# Take screenshot
driver.get_screenshot_as_file("final_url.png")
# DOM+Source page detials
html_page = driver.page_source
driver.close()


# To store list of urls in a file
# with open("url_list.txt", "w") as f:
#    for url in url_list:
#        f.write(url + "\n")


# Store the HTML page of the final URL in a file
with open("index.html", "w") as f:
    f.write(html_page)


# MD5 hash of the final url web-page
html_hash = hashlib.md5(html_page.encode()).hexdigest()


data_dict = {
    "url_list": url_list,
    "html_hash": html_hash
}

print(data_dict)

```


### Output:
```
{'url_list': ['https://t.co/jN1RvKT13I', 'https://stalkphish.io/'], 'html_hash': 'da92c8d1ae686651b2a80f89cf1b8fa2'}
```

##### Screenshot (png)
![](https://i.imgur.com/8NdcmZk.png)


#### Source Code
```htmlembedded=
<html lang="en"><head><meta name="description" content="Stalkphish.io provides enriched data about phishing URLs and brand impersonation. The data is made available through a REST API.">
    <link rel="canonical" href="https://stalkphish.io/">



<meta name="robots" content="index">
<meta http-equiv="content-language" content="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" initial-scale="1" maximum-scale="1">
<meta name="keywords" content="osint,cti,cyber,intelligence,api,enrichment,phishing,scam,brand,impersonation,url,uri,threat,cyber,web,scanner,analyze,race,takedown,rest-api,feed,rest,no-code,cybersecurity,phight,anti-phishing,phishingkit,z0n51,wells,bank,Phishing protection,Anti-phishing software,Phishing detection,Phishing prevention,Phishing security,Phishing awareness,Phishing mitigation,High-performance phishing protection,Optimized anti-phishing tools,Advanced phishing detection software">
<meta name="author" content="stalkphish.io">
<meta name="twitter:image:alt" content="Stalkphish.io provides enriched data about phishing URLs and brand impersonation. The data is made available through a REST API.">

<meta property="og:title" content="Fight phishing and brand impersonation | StalkPhish.io">
<meta property="og:type" content="website">
<meta property="og:image" content="/static/pics/stalkphish-phishing_fight-og.jpeg">
<meta property="og:image:secure_url" content="/static/pics/stalkphish-phishing_fight-og.jpeg">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
<meta property="og:image:alt" content="Stalkphish.io - fight against phishing and brand impersonation">

<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:creator" content="@stalkphish_io">
<meta property="twitter:domain" content="https://stalkphish.io">
<meta property="twitter:site" content="@stalkphish_io">
<meta property="twitter:title" content="StalkPhish.io | fight phishing and brand impersonation">
<meta property="twitter:image" content="/static/pics/stalkphish-phishing_fight-og.jpeg">


<link rel="icon" href="/static/pics/favicon.ico">


<!-- JS -->
<script src="/static/js/jquery-3.5.1.min.js"></script>
<script src="/static/js/popper.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
<!-- <script src="/static/js/all.js"></script> -->

<!-- CSS -->
<link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/static/css/swagger-ui.css">
<link rel="stylesheet" type="text/css" href="/static/css/stalkphish.css">
<link rel="stylesheet" type="text/css" href="/static/css/all.css">

  <title>
      
Phishing/brand impersonation detection feed

  </title>

      </head><body><nav class="navbar sticky-top navbar-expand-md navbar-dark bg-dark">
        <a class="navbar-brand" href="/"><img src="/static/pics/stalkphishio-300.png" alt="StalkPhish App" width="200"></a>

        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSP">
          <span class="navbar-toggler-icon"></span>
        </button>

        <!-- Navbar links -->
        <div class="collapse navbar-collapse" id="navbarSP">
            <ul class="navbar-nav">
              <!--  -->
              <li class="nav-item  active "><a class="nav-link" href="/"> Home</a></li>
              <li class="nav-item"><a class="nav-link" href="https://www.stalkphish.com/blog-feed/" target="_blank"> Blog</a></li>
              
              <!-- Dropdown button -->
              <li class="nav-item dropdown "><a class="nav-link dropdown-toggle" href="#" id="navbardb" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> Documentation</a>
                <div class="dropdown-menu" aria-labelledby="navbardb">
                  <a class="dropdown-item" href="/documentation/api/"> API documentation</a>
                  <a class="dropdown-item" href="/documentation/data"> DATA documentation</a>
                  <a class="dropdown-item" href="https://stalkphish.com/2022/09/05/use-case-hunting-for-phishing/" target="_blank"> Use case</a>
                  <a class="dropdown-item" href="/faq"> FAQ</a>
                </div>
              </li><li class="nav-item "><a class="nav-link" href="/pricing/"> Pricing</a></li>
              
              <li class="nav-item "><a class="nav-link" href="/about/"> About</a></li>
              <!--  -->
            </ul>

            <!-- right align -->
            <ul class="navbar-nav ml-auto">
              
              
               <li class="nav-item "><a class="nav-link" href="/accounts/login/"> Login</a></li>
               <li class="nav-item "><a class="nav-link" href="/accounts/register/"> Register</a></li>
              
            </ul>
        </div>
      </nav>
    <div class="container">

        
        



        
<div class="container-fluid">
<div class="col-md-12 my-5 py-4">
<div class="row">
  <div class="col-8">
    <p class="h2 font-weight-light">Detect faster, protect harder</p>
    <p class="h1">Your everyday phishing/brand impersonation detection feed</p>

            <p style="margin-left:40px;margin-bottom:0px">⇨ Easy to integrate</p>
            <p style="margin-left:40px;margin-bottom:0px">⇨ Actionable data</p>
            <p style="margin-left:40px;margin-bottom:0px">⇨ Designed for threat intelligence</p>
  </div>

  <div class="col-4 text-center"><img src="/static/pics/stalkphish-process.png" alt="Stalkphish.io Process"></div>
</div>



</div>


<!-- <div id="carousel" class="carousel slide" data-ride="carousel" style="width: 1000px; height:200px;"> -->
<div id="carousel" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
    <li data-target="#carousel" data-slide-to="0" class="active"></li>
    <li data-target="#carousel" data-slide-to="1"></li>
    <li data-target="#carousel" data-slide-to="2"></li>
    <li data-target="#carousel" data-slide-to="3"></li>
  </ol>
  <div class="carousel-inner">
        <div class="carousel-item active">
      <img class="d-block w-100" src="/static/pics/stalkphishio-carousel2.png" alt="Third slide">
      <div class="carousel-caption d-none d-md-block">
          <h5>Retrieve informations</h5>
          <p>using our REST API</p>
        </div>
    </div>
    <div class="carousel-item">
      <img class="d-block w-100" src="/static/pics/stalkphishio-carousel0.png" alt="First slide">
      <div class="carousel-caption d-none d-md-block">
          <h5>Take the scale of the threat </h5>
          <p>using your company name</p>
        </div>
    </div>
    <div class="carousel-item">
      <img class="d-block w-100" src="/static/pics/stalkphishio-carousel1.png" alt="Second slide">
      <div class="carousel-caption d-none d-md-block">
          <h5>Refine your searches</h5>
          <p>using specific search strings</p>
        </div>
    </div>
    <div class="carousel-item">
      <img class="d-block w-100" src="/static/pics/stalkphishio-carousel3.png" alt="Third slide">
      <div class="carousel-caption d-none d-md-block">
          <h5>Launch your takedown process</h5>
          <p>using hoster/registrar informations</p>
        </div>
    </div>
  </div>
  <a class="carousel-control-prev" href="#carousel" role="button" data-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="carousel-control-next" href="#carousel" role="button" data-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>
</div>


<div class="row my-5 pt-5">
    <div class="col-lg-4 mb-5">
        <h4>Actionable feed</h4>
        <hr class="mt-0">
        <div class="pl-0 border-0">
            Use enriched data from Stalkphish.io to enriched your knowledge and existing framework.
            <br>
        </div>
    </div>
    <div class="col-lg-4 mb-5">
        <h4>Enrich data</h4>
        <hr class="mt-0">
        <div class="pl-0 border-0">
            Enrich your own data/knowledge with data retrieved from our API.
            <br>
        </div>
    </div>
    <div class="col-lg-4 mb-5">
        <h4>Learn about threat</h4>
        <hr class="mt-0">
        <div class="pl-0 border-0">
            Learn how works and what phishing kits impersonating your brand do.
            <br>

        </div>
    </div>
    <div class="col-lg-4 mb-5">
        <h4>Follow campaigns</h4>
        <hr class="mt-0">
        <div class="pl-0 border-0">
            Follow campaigns which try to lure your customers.
            <br>

        </div>
    </div>
    <div class="col-lg-4 mb-5">
        <h4> Takedown bad sites</h4>
        <hr class="mt-0">
        <div class="pl-0 border-0">
            Launch your takedown process with informations retrieved.
            <br>

        </div>
    </div>
    <div class="col-lg-4 mb-5">
        <h4>Monitor actors</h4>
        <hr class="mt-0">
        <div class="pl-0 border-0">
            Monitor the activity of threat actors and their infrastructure.
            <br>

        </div>
    </div>
</div>

<div class="col-md-12 text-center my-5 py-4">
   <p class="h5">Give a test to our data:</p>

   <a href="/accounts/register/" class="btn btn-lg btn-success" role="button" aria-pressed="true">Register for free</a>
   <p class="h6 font-weight-light">No credit card needed</p>
   </div>

    </div>



    <footer class="bg-dark navbar-static-bottom">
      <div class="container py-2 my-1">
          <div class="row">
              <div class="col-lg-6 d-flex justify-content-center justify-content-lg-start">
                        
        <a class="d-flex flex-row align-items-center " href="/" style="text-decoration: none;">
            <img src="/static/pics/stalkphishio-300.png" alt="StalkPhish - phishing and brand impersonation detection" height="40px">
        </a>

              </div>
                <div class="col-lg-6 small text-uppercase font-weight-bold d-flex flex-column flex-sm-row justify-content-center justify-content-lg-end align-items-center mt-3 mt-lg-0">

                    <a class="text-white text-nowrap my-2 my-sm-0" href="/legal-notice">
                        Legal Notice
                    </a>
                    <span class="mx-3 text-white d-none d-sm-inline">•</span>
                    <a class="text-white text-nowrap my-2 my-sm-0" href="/privacy-policy">
                        Privacy policy
                    </a>
                    <span class="mx-3 text-white d-none d-sm-inline">•</span>
                    <a class="text-white text-nowrap my-2 my-sm-0" href="/about">
                        Contact
                    </a>
                  </div>
              </div>
                <div class="row mt-5">
                    <div class="col-md-12">
                        <p class="text-justify text-white-50 font-weight-light">
                            Stalkphish.io is a phishing and identity theft detection solution that enables companies to maximize their daily detection and facilitate investigations with minimal effort.
                        </p>
                    </div>
                </div>
                <div class="row mt-4">
                    <div class="col-md-12 d-flex flex-column flex-sm-row justify-content-center">
                        <span class="text-muted">©<a href="https://stalkphish.com/" style="color:#b0b0b0">StalkPhish</a> 2021-2022, All rights reserved - v1.223</span>
                        
                    </div>
                </div>
      </div>

    <script type="application/ld+json">
        {
            "@context": "http://schema.org",
            "@type": "WebApplication",
            "@id": "Stalkphish.io",
            "applicationCategory": "BusinessApplication",
            "name": "Stalkphish.io provides enriched data about phishing URLs and brand impersonation. The data is made available through a REST API.",
            "operatingSystem": "all",
            "browserRequirements": "Requires Javascript and HTML5 support",
            "url": "https://stalkphish.io",
            "screenshot": "https://stalkphishhome.files.wordpress.com/2021/06/stalkphishio-front.png",
                        
            "creator": {
              "@type":"Organization",
              "@id":"#organization",
              "url":"https://www.stalkphish.com",
              "name":"Stalkphish",
              "logo":{
                "@type":"ImageObject",
                "url":"https://stalkphishhome.files.wordpress.com/2021/03/stalkphish-incl-200x60-txt-white.png",
                "width":"200px",
                "height":"60px"
              }
            }
        }
    </script>

    </footer>
</body></html>
```

