diff --git a/.gitignore b/.gitignore index 24d177f..24a2bd7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ test/ .vscode/ .idea -geckodriver.log \ No newline at end of file +geckodriver.log +*.iml +target \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 44837a9..0000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# findsth -**findsth** explore a new way to explore the internet. The unit in findsth is domain, **findsth** create urls use domain and different top domains. - -## Usage -python findsth.py [domains] - -#### For Example: -```python -python findsth.py find -``` - diff --git a/docs/find_net.png b/docs/find_net.png deleted file mode 100644 index fbc030f..0000000 Binary files a/docs/find_net.png and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index dbd5ee5..0000000 --- a/docs/index.html +++ /dev/null @@ -1,2 +0,0 @@ -

With findsth find Wonderful website


- diff --git "a/docs/\345\256\211\350\243\205selenium\347\232\204chrome\346\217\222\344\273\266.md" "b/docs/\345\256\211\350\243\205selenium\347\232\204chrome\346\217\222\344\273\266.md" deleted file mode 100644 index 0341613..0000000 --- "a/docs/\345\256\211\350\243\205selenium\347\232\204chrome\346\217\222\344\273\266.md" +++ /dev/null @@ -1,7 +0,0 @@ -# 安装selenium的chrome插件 - -1. [下载](https://sites.google.com/a/chromium.org/chromedriver/downloads) -2. 将下载地址配置到PATH - -## 网址 --[入门教程](https://testerhome.com/topics/18640) diff --git a/findsth.py b/findsth.py deleted file mode 100644 index 35890c8..0000000 --- a/findsth.py +++ /dev/null @@ -1,56 +0,0 @@ -import webbrowser -import sys -import requests -import logging -import time -from multiprocessing.dummy import Pool as ThreadPool - -protocol='http' -topDomainName=['.com','.cn','.net','.de','.fi','.co.jp', '.ru','.me', '.edu', '.af', '.ag', '.ai', '.ar', '.au', '.bd', '.bh', '.bn', '.bo', '.br', '.bz', '.co', '.cu', '.cy', '.do', '.ec', '.eg', '.et', '.fj', '.gh', '.gi', '.gt', '.hk', '.jm', '.kh', '.kw', '.lb', '.ly', '.mm', '.mt', '.mx', '.my', '.na', '.nf', '.ng', '.ni', '.np', '.om', '.pa', '.pe', '.pg', '.ph', '.pk', '.pr', '.py', '.qa', '.sa', '.sb', '.sg', '.sl', '.sv', '.tj', '.tr', '.tw', '.ua', '.uy', '.vc', '.vn'] -argv=sys.argv[1:] -print(argv) -start = time.time() - -logging.basicConfig(level=logging.INFO) -domains = [] -urls=[] -for i in range(len(topDomainName)): - aTop=topDomainName[i] - for j in range(len(argv)): - domainName=argv[j] - url=protocol + '://' + 'www.' + domainName + aTop - logging.info('url is: %s',url) - domains.append(url) - url=protocol + '://' + domainName + aTop - domains.append(url) - -print(domains) - -def con(url): - try: - res = requests.get(url, timeout=10) - code = res.status_code - except requests.exceptions.ReadTimeout: - code = -1 - except requests.exceptions.ConnectionError: - code = -1 - except requests.exceptions.TooManyRedirects: - code = -1 - logging.info('url: %s, code: %d'%(url, code)) - if code == 200: - urls.append(url) - -pool = ThreadPool(10) -pool.map(con, domains) -pool.close() -pool.join() - -availableCount = len(urls) -logging.info('availableCount: %d',availableCount) -for i in range(availableCount): - logging.info('Openning: %s',urls[i]) - webbrowser.open_new_tab(urls[i]) -end = time.time() -logging.info('Costs seconds: %f s', end - start) -#webbrowser.open_new_tab(url) - diff --git a/findsth_open_in_broswer.py b/findsth_open_in_broswer.py deleted file mode 100644 index 453b09b..0000000 --- a/findsth_open_in_broswer.py +++ /dev/null @@ -1,17 +0,0 @@ -from selenium import webdriver - -def open_in_chrome_incognito(url): - chrome_options = webdriver.ChromeOptions() - chrome_options.add_argument("--incognito") - - driver = webdriver.Chrome(chrome_options=chrome_options) - - driver.get(url) - -def main(): - open_in_chrome_incognito("https://www.baidu.com") - open_in_chrome_incognito("https://www.qq.com") - -if __name__ == '__main__': - main() - diff --git a/playground/pom.xml b/playground/pom.xml new file mode 100644 index 0000000..36778a8 --- /dev/null +++ b/playground/pom.xml @@ -0,0 +1,11 @@ + + + 4.0.0 + + com.yitianyigexiangfa.findsth + findsth-playground + 0.1 + + \ No newline at end of file diff --git a/playground/src/main/java/com/yitianyigexiangfa/playground/findsth/Application.java b/playground/src/main/java/com/yitianyigexiangfa/playground/findsth/Application.java new file mode 100644 index 0000000..40b0640 --- /dev/null +++ b/playground/src/main/java/com/yitianyigexiangfa/playground/findsth/Application.java @@ -0,0 +1,8 @@ +package com.yitianyigexiangfa.playground.findsth; + +/** + * @author Bill Lau + * @date 2019-08-01 + */ +public class Application { +} diff --git a/playground/src/main/java/com/yitianyigexiangfa/playground/findsth/thread/FirstThread.java b/playground/src/main/java/com/yitianyigexiangfa/playground/findsth/thread/FirstThread.java new file mode 100644 index 0000000..3440517 --- /dev/null +++ b/playground/src/main/java/com/yitianyigexiangfa/playground/findsth/thread/FirstThread.java @@ -0,0 +1,15 @@ +package com.yitianyigexiangfa.playground.findsth.thread; + +/** + * @author Bill Lau + * @date 2019-08-01 + */ +public class FirstThread extends Thread { + + @Override + public void run() { + System.out.println("Hello, thread!!!"); + } + + +} diff --git a/playground/src/main/java/com/yitianyigexiangfa/playground/findsth/thread/SecondThread.java b/playground/src/main/java/com/yitianyigexiangfa/playground/findsth/thread/SecondThread.java new file mode 100644 index 0000000..f165c83 --- /dev/null +++ b/playground/src/main/java/com/yitianyigexiangfa/playground/findsth/thread/SecondThread.java @@ -0,0 +1,12 @@ +package com.yitianyigexiangfa.playground.findsth.thread; + +/** + * @author Bill Lau + * @date 2019-08-01 + */ +public class SecondThread implements Runnable { + + public void run() { + System.out.println("Hello, Runable"); + } +} diff --git a/silkBag/twisted/chat.py b/silkBag/twisted/chat.py deleted file mode 100644 index 3eebd0d..0000000 --- a/silkBag/twisted/chat.py +++ /dev/null @@ -1,47 +0,0 @@ -from twisted.internet.protocol import Factory -from twisted.protocols.basic import LineReceiver -from twisted.internet import reactor - -class Chat(LineReceiver): - def __init__(self, users): - self.users = users - self.name = None - self.state = "GETNAME" - - def connectionMade(self): - self.sendLine("What's your name?") - - def connectionLost(self, reason): - if self.name in self.users: - del self.users[self.name] - - def lineReceived(self, line): - if self.state == "GETNAME": - self.handle_GETNAME(line) - else: - self.handle_CHAT(line) - - def handle_GETNAME(self, name): - if name in self.users: - self.sendLine("Name taken, please choose another.") - return - self.sendLine("Welcome, %s!" % (name,)) - self.name = name - self.users[name]= self - self.state = "CHAT" - - def handle_CHAT(self, message): - message = "<%s> %s"% (self.name, message) - for name, protocol in self.users.iteritems(): - if protocol != self: - protocol.sendLine(message) - -class ChatFactory(Factory): - def __init__(self): - self.users = {} - - def buildProtocol(self, addr): - return Chat(self.users) - -reactor.listenTCP(8123, ChatFactory()) -reactor.run()