Skip to content

Instantly share code, notes, and snippets.

@YukariChiba
Created December 21, 2021 17:48
Show Gist options
  • Select an option

  • Save YukariChiba/ad80ce9f72d85290fea5702741975d5f to your computer and use it in GitHub Desktop.

Select an option

Save YukariChiba/ad80ce9f72d85290fea5702741975d5f to your computer and use it in GitHub Desktop.
国际会议扫描器,助力搜索全球水会
import requests as rq
import bs4
def main():
for char1 in range(ord('a'), ord('z')+1):
for char2 in range(ord('a'), ord('z')+1):
for char3 in range(ord('a'), ord('z')+1):
domain = "ic{}{}{}.org".format(
chr(char1), chr(char2), chr(char3))
print("Trying {}".format(domain))
try:
r = rq.get("http://{}".format(domain), timeout=5)
if r.status_code == 200:
h = bs4.BeautifulSoup(r.text, features="lxml")
print(h.title.text.strip())
fo = open('result.txt', 'a+')
fo.write("{}: {}\n".format(domain, h.title.text.strip()))
fo.close()
except:
pass
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment