Skip to content

Instantly share code, notes, and snippets.

@mnuddindev
Created November 21, 2019 07:34
Show Gist options
  • Select an option

  • Save mnuddindev/0579937be0fd62337edbbc7e67c392b6 to your computer and use it in GitHub Desktop.

Select an option

Save mnuddindev/0579937be0fd62337edbbc7e67c392b6 to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
import os
o = open ("others.txt", "a+")
wp = open ("wp.txt", 'a+')
wl = open ("list.txt").read().split("\n")
class tcolor:
yellow = '\33[33m'
red = '\33[31m'
green = '\33[32m'
def splitter(host):
host = host
print (tcolor.green+"[START] "+tcolor.yellow+"Scanner Started Successfully")
try:
test_response = requests.get(host+'/').text
except requests.exceptions.HTTPError:
o.write(host+'#notWP\n')
print (tcolor.red+"[ERROR] "+tcolor.yellow+"Connection Error")
pass
except requests.exceptions.ConnectionError:
o.write(host+'#notWP\n')
print(tcolor.red+"[ERROR] "+tcolor.yellow+"Connection Error")
pass
else:
if "wp-content" in test_response:
wp.write(host+'\n')
print(tcolor.yellow+"[OK] "+tcolor.green+"It is a Wordpress Site")
else:
o.write(host+'#NotWP\n')
print(tcolor.yellow+"[ERROR] "+tcolor.red+"It is not a Wordpress Site")
def banner():
os.system("clear")
print("###########################################################")
print("# Tool: WordPress Site splitter #")
print("# Author: Inad Islam #")
print("# A Wordpress site splitter for Private User's Only #")
print("###########################################################")
def s():
banner()
for item in wl:
if (item == ""):
continue
splitter(item)
s()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment