Last active
March 5, 2018 16:19
-
-
Save L3houx/7b3580087cc18e90ddcb34b7bc52efe7 to your computer and use it in GitHub Desktop.
Login detection on clear net (proof of concept)
This file contains 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 scrapy | |
class QuotesSpider(scrapy.Spider): | |
name = "login_detection" | |
start_urls = [ | |
'https://pastebin.com/login', | |
'https://pastebin.com', | |
'https://github.com', | |
'https://pastebin.com/ztUQFAzL', | |
'https://outlook.office.com', | |
'http://quotes.toscrape.com/page/1/', | |
'https://www.tecmint.com/terminator-a-linux-terminal-emulator-to-manage-multiple-terminal-windows/', | |
'http://www.infinitelooper.com/?v=e1wqUo8mZmo#/31;294', | |
'https://www.youtube.com/watch?v=9PB30JUOncw&list=RDS-l6a34mwWw&index=20', | |
'https://ringzer0team.com/register' | |
] | |
def parse(self, response): | |
login = False | |
input_types = response.css('input ::attr("type")').extract() | |
if input_types is not None: | |
input_types = list(set(input_types)) | |
print('----------------------------------') | |
print(input_types) | |
print('***********************************') | |
if "password" in input_types : | |
login = True | |
yield{ | |
"URL": response.url, | |
"textarea" : response.css('textarea::text').extract(), #section for pastebin | |
"Input type" : input_types, | |
"Login_input" : login | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment