Created
March 9, 2022 17:38
-
-
Save SofianeHamlaoui/c28fb906c6a9f4b98d464e4113e61ca9 to your computer and use it in GitHub Desktop.
Python script to download from prnt.sc worst screenshot tool used by the worst people in this univers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import requests | |
from bs4 import BeautifulSoup as BS | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 OPR/63.0.3368.71' | |
} | |
with open('links.txt') as f: | |
Lines = f.readlines() | |
count = 0 | |
for line in Lines: | |
count += 1 | |
print("Downloading : " + line.strip()) | |
with requests.Session() as s: | |
url = line.strip() # in case you want to change it. | |
r = s.get(url, headers=headers) | |
soup = BS(r.content, 'html.parser') | |
img_url = soup.find('img', {'id': 'screenshot-image'})['src'] | |
r = s.get(img_url, headers=headers) | |
with open("temp"+str(count)+".png", 'wb') as f: | |
f.write(r.content) |
Author
SofianeHamlaoui
commented
Mar 9, 2022
grep -rnw ContiLeaks -h -e 'http://prntscr.com' | awk -F "http://" '{print $NF}' > screenshots
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment