Skip to content

Commit 20c2e05

Browse files
committed
New minor release 0.11.7
2 parents ac20318 + 790f260 commit 20c2e05

File tree

9 files changed

+62
-45
lines changed

9 files changed

+62
-45
lines changed

CHANGELOG

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,24 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [0.11.7] - 2022-09-18
88
### Added
9-
- Test cases for plugins creation and running
9+
- DuckDuckGo plugin
10+
11+
### Changed
12+
- `--debugging` CLI parameter is now `--debug`
13+
14+
### Fixed
15+
- False negatives due to whitespaces in subdomain extracted text (e.g. "\n some.subdomain.com \n")
16+
- Subdomain selectors for Yahoo, Ask, Baidu and StartPage
17+
- WebCrawler query parameters
18+
- Baidu requests delay to avoid anti-bot checks
19+
20+
### Removed
21+
- WebCrawler plugin because of `403: Forbidden` HTTP error
22+
- StartPage and Exaled plugin because of CAPTCHA
23+
- Teoma plugin since it now redirects to Ask
24+
1025

1126
## [0.9.2] - 2019-08-01
1227
### Added

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM python:3.7.4-alpine3.10
22

33
RUN apk --no-cache add libxml2 libxml2-dev libxslt-dev gcc musl-dev wget ca-certificates
44

5-
ARG YASS_VERSION="0.9.2"
5+
ARG YASS_VERSION="0.11.7"
66

77
WORKDIR /yass
88
RUN wget "https://github.com/mrnfrancesco/yass/archive/v${YASS_VERSION}.zip" -O yass.zip && \

README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ YASS - Yet Another Subdomainer Software
1010
:alt: Code Climate
1111
.. image:: https://img.shields.io/badge/python-3.7-blue.svg
1212
:target: https://www.python.org/downloads/release/python-374/
13-
.. image:: https://img.shields.io/badge/release-v0.9.2-green.svg
14-
:target: https://github.com/mrnfrancesco/yass/releases/tag/v0.9.2
13+
.. image:: https://img.shields.io/badge/release-v0.11.7-green.svg
14+
:target: https://github.com/mrnfrancesco/yass/releases/tag/v0.11.7
1515

1616
YASS is a plugin-powered search engine based subdomainer.
1717
Its goal is to give you a tool to query whatever search engine you like and parse HTML response writing *less than 10 lines of code*.
@@ -29,7 +29,7 @@ USAGE
2929

3030
Output arguments:
3131
-g, --grepable output results in grepable format (default: False)
32-
-d, --debugging set output format to a more verbose one, for debugging
32+
-d, --debug set output format to a more verbose one, for debugging
3333
purpose (default: False)
3434
-l {debug,info,warning,error,critical}, --level {debug,info,warning,error,critical}
3535
set output verbosity (default: info)
@@ -48,7 +48,7 @@ Example output
4848

4949
________________________________________________
5050

51-
YASS - Yet Another Subdomainer Software (v0.9.2)
51+
YASS - Yet Another Subdomainer Software (v0.11.7)
5252
by Francesco Marano (@mrnfrancesco)
5353
________________________________________________
5454

@@ -146,4 +146,4 @@ Or you can use Docker:
146146
$ docker run --rm -ti mrnfrancesco/yass:latest /bin/sh
147147

148148
/yass # yass --version
149-
YASS v0.9.2
149+
YASS v0.11.7

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build Status](https://travis-ci.org/mrnfrancesco/yass.svg?branch=master)](https://travis-ci.org/mrnfrancesco/yass)
44
[![Code Climate](https://codeclimate.com/github/mrnfrancesco/yass/badges/gpa.svg)](https://codeclimate.com/github/mrnfrancesco/yass)
55
[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-374/)
6-
[![Release](https://img.shields.io/badge/release-v0.9.2-green.svg)](https://github.com/mrnfrancesco/yass/releases/tag/v0.9.2)
6+
[![Release](https://img.shields.io/badge/release-v0.11.7-green.svg)](https://github.com/mrnfrancesco/yass/releases/tag/v0.11.7)
77

88
YASS is a plugin-powered search engine based subdomainer.
99
Its goal is to give you a tool to query whatever search engine you like and parse HTML response writing *less than 10 lines of code*.
@@ -20,7 +20,7 @@ Its goal is to give you a tool to query whatever search engine you like and pars
2020

2121
Output arguments:
2222
-g, --grepable output results in grepable format (default: False)
23-
-d, --debugging set output format to a more verbose one, for debugging
23+
-d, --debug set output format to a more verbose one, for debugging
2424
purpose (default: False)
2525
-l {debug,info,warning,error,critical}, --level {debug,info,warning,error,critical}
2626
set output verbosity (default: info)
@@ -40,7 +40,7 @@ $ yass microsoft.com
4040

4141
________________________________________________
4242

43-
YASS - Yet Another Subdomainer Software (v0.9.2)
43+
YASS - Yet Another Subdomainer Software (v0.11.7)
4444
by Francesco Marano (@mrnfrancesco)
4545
________________________________________________
4646

@@ -141,5 +141,5 @@ $ docker build -t mrnfrancesco/yass:latest .
141141
$ docker run --rm -ti mrnfrancesco/yass:latest /bin/sh
142142

143143
/yass # yass --version
144-
YASS v0.9.2
144+
YASS v0.11.7
145145
```

bin/yass

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def parse(arguments=None):
6363
output = parser.add_argument_group('Output arguments')
6464
output.add_argument('-g', '--grepable', help="output results in grepable format (default: %(default)s)",
6565
default=False, action="store_true")
66-
output.add_argument('-d', '--debugging', default=False, action="store_true",
66+
output.add_argument('-d', '--debug', default=False, action="store_true",
6767
help="set output format to a more verbose one, for debugging purpose (default: %(default)s)")
6868
output.add_argument('-l', '--level', help="set output verbosity (default: %(default)s)",
6969
choices=['debug', 'info', 'warning', 'error', 'critical'], default='info')
@@ -99,13 +99,13 @@ def banner():
9999

100100

101101
if __name__ == '__main__':
102-
if len(sys.argv) is 1:
102+
if len(sys.argv) == 1:
103103
sys.argv.append('--usage')
104104

105105
options = parse(arguments=None) # Use sys.argv[1:] as default arguments
106106
if options.grepable:
107107
options.level = None
108-
logger_config(options.colored, options.debugging, options.level)
108+
logger_config(options.colored, options.debug, options.level)
109109

110110
if not options.grepable:
111111
print(banner())

yass/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__lname__ = "yass"
22
__uname__ = "YASS"
33
__acronym__ = "Yet Another Subdomainer Software"
4-
__version__ = "0.8.0"
4+
__version__ = "0.11.7"
55
__author__ = "Francesco Marano (@mrnfrancesco)"
66
__author_email__ = "francesco.mrn24@gmail.com"
77
__source_url__ = "https://github.com/mrnfrancesco/yass"

yass/logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def logger(depth=3):
6969
return caller.f_locals[lname]
7070

7171

72-
def config(colored=True, debugging=False, level='info'):
72+
def config(colored=True, debug=False, level='info'):
7373
level = str(level) # to avoid error if level is None
7474

7575
dictConfig({
@@ -90,7 +90,7 @@ def config(colored=True, debugging=False, level='info'):
9090
},
9191
'handlers': {
9292
'custom': {
93-
'formatter': 'debugging' if debugging else 'default',
93+
'formatter': 'debugging' if debug else 'default',
9494
'class': 'yass.logger._ColorStreamHandler' if colored else 'logging.StreamHandler',
9595
'stream': 'ext://sys.stdout'
9696
}

yass/models.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616

1717
import re
18+
import string
1819
import time
1920
from typing import List, Optional
2021

@@ -122,7 +123,7 @@ def extract(elements) -> List[str]:
122123
:type elements: list[Element]
123124
:return: extracted data
124125
"""
125-
return [element.text_content() for element in elements]
126+
return [element.text_content().translate(str.maketrans('', '', string.whitespace)) for element in elements]
126127

127128
def clean(self, urls: List[str]) -> List[str]:
128129
"""
@@ -132,7 +133,7 @@ def clean(self, urls: List[str]) -> List[str]:
132133
:return: cleaned subdomains URLs
133134
"""
134135
subdomains = []
135-
regexp = re.compile(r'(.+://)?(?P<subdomain>(.+)\.{domain})([/\?].*)?'.format(domain=self.domain))
136+
regexp = re.compile(r'(.+://)?(?P<subdomain>(.+)\.{domain})([/?].*)?'.format(domain=self.domain))
136137
for url in urls:
137138
match = regexp.match(url)
138139
if match and match.group('subdomain'):

yass/plugins.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ class Meta:
2626
class Ask(PluginBase):
2727
class Meta:
2828
search_url = 'https://www.ask.com/web'
29-
subdomains_selector = 'p.PartialSearchResults-item-url'
29+
subdomains_selector = 'div.PartialSearchResults-item-url'
3030

3131

3232
class Baidu(PluginBase):
3333
class Meta:
3434
search_url = 'https://www.baidu.com/s'
3535
query_param = 'wd'
36-
subdomains_selector = 'span.g'
36+
subdomains_selector = 'div.result div.c-row span'
37+
request_delay = 1
3738

3839

3940
class Bing(PluginBase):
@@ -42,43 +43,43 @@ class Meta:
4243
subdomains_selector = '#b_results li.b_algo cite'
4344

4445

45-
# Anti-bot tricks make yass fails with Google
46-
#
46+
class DuckDuckGo(PluginBase):
47+
class Meta:
48+
search_url = 'https://html.duckduckgo.com/html/'
49+
subdomains_selector = 'a.result__url'
50+
51+
52+
# Blocked by CAPTCHA
4753
# class Google(PluginBase):
4854
# class Meta:
4955
# search_url = 'https://www.google.com/search'
5056
# subdomains_selector = '#search div.g cite'
5157
# request_delay = 1
5258

5359

54-
class StartPage(PluginBase):
55-
class Meta:
56-
search_url = 'https://startpage.com/do/search'
57-
subdomains_selector = 'span.search-item__url'
60+
# Blocked by CAPTCHA
61+
# class StartPage(PluginBase):
62+
# class Meta:
63+
# search_url = 'https://startpage.com/do/search'
64+
# subdomains_selector = 'a.w-gl__result-url'
5865

5966

60-
class WebCrawler(PluginBase):
61-
class Meta:
62-
search_url = 'https://www.webcrawler.com/serp'
63-
subdomains_selector = 'div.resultDisplayUrl'
64-
include_param = ''
65-
exclude_param = '-'
67+
# Blocked by "403: Forbidden" HTTP error
68+
# class WebCrawler(PluginBase):
69+
# class Meta:
70+
# search_url = 'https://www.webcrawler.com/serp'
71+
# subdomains_selector = 'div.resultDisplayUrl'
6672

6773

6874
class Yahoo(PluginBase):
6975
class Meta:
7076
search_url = 'https://search.yahoo.com/search'
7177
query_param = 'p'
72-
subdomains_selector = 'span.fz-ms.fw-m.fc-12th.wr-bw.lh-17'
78+
subdomains_selector = 'ol.searchCenterMiddle li div > span'
7379

7480

75-
class Teoma(PluginBase):
76-
class Meta:
77-
search_url = 'https://www.teoma.com/web'
78-
subdomains_selector = '.algo-display-url'
79-
80-
81-
class Exalead(PluginBase):
82-
class Meta:
83-
search_url = 'https://www.exalead.com/search/web/results'
84-
subdomains_selector = 'li.media a.ellipsis'
81+
# Blocked by CAPTCHA
82+
# class Exalead(PluginBase):
83+
# class Meta:
84+
# search_url = 'https://www.exalead.com/search/web/results'
85+
# subdomains_selector = 'li.media a.ellipsis'

0 commit comments

Comments
 (0)