├── README.md ├── LICENSE ├── .gitignore └── GetExpiredDomains.py /README.md: -------------------------------------------------------------------------------- 1 | # GetExpiredDomains 2 | 3 | Author: 3gstudent 4 | 5 | License: BSD 3-Clause 6 | 7 | Search for available domain from [expireddomains.net](https://www.expireddomains.net/) 8 | 9 | Use GetExpiredDomains.py to get all the 550 results. 10 | 11 | Note: 12 | 13 | Unregistered users can only get 550 results. 14 | 15 | 16 | ### Why write it: 17 | 18 | In my test,[CatMyFish.py](https://github.com/Mr-Un1k0d3r/CatMyFish) can't get all the results from expireddomains.net. 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2018, 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask stuff: 58 | instance/ 59 | .webassets-cache 60 | 61 | # Scrapy stuff: 62 | .scrapy 63 | 64 | # Sphinx documentation 65 | docs/_build/ 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | # Jupyter Notebook 71 | .ipynb_checkpoints 72 | 73 | # pyenv 74 | .python-version 75 | 76 | # celery beat schedule file 77 | celerybeat-schedule 78 | 79 | # SageMath parsed files 80 | *.sage.py 81 | 82 | # dotenv 83 | .env 84 | 85 | # virtualenv 86 | .venv 87 | venv/ 88 | ENV/ 89 | 90 | # Spyder project settings 91 | .spyderproject 92 | .spyproject 93 | 94 | # Rope project settings 95 | .ropeproject 96 | 97 | # mkdocs documentation 98 | /site 99 | 100 | # mypy 101 | .mypy_cache/ 102 | -------------------------------------------------------------------------------- /GetExpiredDomains.py: -------------------------------------------------------------------------------- 1 | # 2 | # GetExpiredDomains 3 | # Search for available domain from expireddomains.net 4 | # By: 3gstudent 5 | # License: BSD 3-Clause 6 | 7 | import urllib 8 | import urllib2 9 | import sys 10 | from bs4 import BeautifulSoup 11 | 12 | def GetResults(loop,key): 13 | for i in range(1,loop): 14 | print "[+]Page %d" %(i+1) 15 | url = "https://www.expireddomains.net/domain-name-search/?start=" + str(25*i) + "&q="+ key 16 | #print url 17 | req = urllib2.Request(url) 18 | #req.add_header("User-Agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36") 19 | res_data = urllib2.urlopen(req) 20 | html = BeautifulSoup(res_data.read(), "html.parser") 21 | 22 | tds = html.findAll("td", {"class": "field_domain"}) 23 | for td in tds: 24 | print td.findAll("a")[0]["title"] 25 | 26 | def SearchExpireddomains(key): 27 | url = "https://www.expireddomains.net/domain-name-search/?q=" + key 28 | req = urllib2.Request(url) 29 | #req.add_header("User-Agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36") 30 | res_data = urllib2.urlopen(req) 31 | html = BeautifulSoup(res_data.read(), "html.parser") 32 | Result = html.select('strong')[0].text.replace(',', '') 33 | print "[*]Total results: %s" % Result 34 | 35 | if int(Result) <25: 36 | return 37 | elif int(Result) > 550: 38 | print "[!]Too many results,only get 550 result." 39 | print "[*]21 requests will be sent." 40 | 41 | print "[+]Page 1" 42 | tds = html.findAll("td", {"class": "field_domain"}) 43 | for td in tds: 44 | print td.findAll("a")[0]["title"] 45 | GetResults(21,key) 46 | 47 | else: 48 | print "[*]%d requests will be sent." % (int(Result)/25+1) 49 | 50 | print "[+]Page 1" 51 | tds = html.findAll("td", {"class": "field_domain"}) 52 | for td in tds: 53 | print td.findAll("a")[0]["title"] 54 | GetResults(int(Result)/25+1,key) 55 | 56 | if __name__ == "__main__": 57 | print "GetExpiredDomains - Search for available domain from expireddomains.net" 58 | print "Author: 3gstudent\n" 59 | 60 | if len(sys.argv)!=2: 61 | print ('Usage:') 62 | print (' GetExpiredDomains.py ') 63 | sys.exit(0) 64 | SearchExpireddomains(sys.argv[1]) 65 | print "[*]All Done" 66 | --------------------------------------------------------------------------------