Goodbye polar domain (Python water water water)

When I was in junior high school, I programmed Goodbye Jiyu in Python. Many functions have not been implemented, but the basic killing and freezing are still very easy to use.

I don’t know too much about what version is not copyrighted, anyway, I wrote it myself

(Looking back now two years later, the writing was so ugly back then…)

Respect Jiyu, it is only for learning, and it is forbidden to use it to do harmful things. It is recommended to take your information class well

import os
from tkinter import *
from tkinter. messagebox import *

import psutil

root = Tk()
root.geometry('280x320')
root.title('Goodbye Jiyu')
root.wm_attributes('-topmost', 1)
root. resizable(False, False)
root.configure(bg = '#1E1E1E')

font1 = ('Microsoft Yahei', 9)
font2 = ('Courier New', 16, 'bold')
font3 = ('Microsoft Yahei', 10)
ICED = False
TOP = True
CON = True

Label(root, text = 'polar state', bg = '#1E1E1E', fg = '#A0A0A0', font = font1).place(x = 0, y = 10, width = 140 , height = 20)
Label(root, text = 'broadcast status', bg = '#1E1E1E', fg = '#A0A0A0', font = font1).place(x = 140, y = 10, width = 140, height = 20)
Label(root, text = 'keyboard status', bg = '#1E1E1E', fg = '#A0A0A0', font = font1).place(x = 0, y = 70, width = 140, height = 20)
Label(root, text = 'top state', bg = '#1E1E1E', fg = '#A0A0A0', font = font1).place(x = 140, y = 70, width = 140, height = 20)

la = Label(root, bg = '#1E1E1E', font = ('Courier New', 13, 'bold'))
lb = Label(root, bg = '#1E1E1E', font = font2)
lc = Label(root, text = 'OPENED', fg = 'lime', bg = '#1E1E1E', font = font2)
ld = Label(root, text = 'ON', fg = 'lime', bg = '#1E1E1E', font = font2)

la. place(x = 0, y = 30, width = 140, height = 45)
lb. place(x = 140, y = 30, width = 140, height = 45)
lc. place(x = 0, y = 90, width = 140, height = 45)
ld.place(x = 140, y = 90, width = 140, height = 45)


def cba1():
    ba.config(fg = '#660000', bg = 'red', activeforeground = 'red', activebackground = '#660000', text = 'keyboard lock', command = cba2)
    lc.config(text = 'OPENED', fg = 'lime')
    #---------------------------
    #----------Open keypad lock----------
    #---------------------------

def cba2():
    ba.config(fg = '#006600', bg = 'lime', activeforeground = 'lime', activebackground = '#006600', text = 'open keyboard lock', command = cba1)
    lc.config(text = 'LOCKED', fg = 'red')
    #---------------------------
    #----------Up keypad lock----------
    #---------------------------

ba = Button(root, text = 'keyboard lock', borderwidth = 0, bg = 'red', font = font3, activeforeground = 'red', activebackground = '#660000', relief = GROOVE, fg = '#660000', command = cba2)
ba.place(x = 10, y = 140, width = 125, height = 45)


def cbb1():
    bb.config(fg = '#660000', bg = 'red', activeforeground = 'red', activebackground = '#660000', text = 'Cancel top', command = cbb2 )
    ld.config(text = 'ON', fg = 'lime')
    TOP = 1
    root.wm_attributes('-topmost', 1)

def cbb2():
    bb.config(fg = '#006600', bg = 'lime', activeforeground = 'lime', activebackground = '#006600', text = 'top window', command = cbb1 )
    ld.config(text = 'ON', fg = 'red')
    TOP = 0
    root.wm_attributes('-topmost', 0)

bb = Button(root, text = 'Unpin', borderwidth = 0, bg = 'red', font = font3, activeforeground = 'red', activebackground = '#660000', relief = GROOVE, fg = '#660000', command = cbb2)
bb.place(x = 145, y = 140, width = 125, height = 45)

# These three functions have not been done yet

def cbc():
    bc['state'] = 'disabled'
    bd['state'] = 'normal'
    be['state'] = 'normal'
    #---------------------------
    #-----------Windowing----------
    #---------------------------

def cbd():
    bc['state'] = 'normal'
    bd['state'] = 'disabled'
    be['state'] = 'normal'
    #---------------------------
    #-----------minimize----------
    #---------------------------

def cbe():
    bc['state'] = 'normal'
    bd['state'] = 'normal'
    be['state'] = 'disabled'
    #---------------------------
    #----------Restore window----------
    #---------------------------

bc = Button(root, text = 'windowed', borderwidth = 0, font = font3, bg = '#00A7FF', activeforeground = '#00A7FF', activebackground = '#0000BF', relief = GROOVE, fg = '#0000BF', command = cbc)
bc. place(x = 10, y = 195, width = 76, height = 45)
bd = Button(root, text = 'minimize', borderwidth = 0, font = font3, bg = '#00A7FF', activeforeground = '#00A7FF', activebackground = '#0000BF', relief = GROOVE, fg = '#0000BF', command = cbd)
bd.place(x = 96, y = 195, width = 76, height = 45)
be = Button(root, text = 'Restore window', borderwidth = 0, font = font3, bg = '#00A7FF', activeforeground = '#00A7FF', activebackground = '#0000BF', relief = GROOVE, fg = '#0000BF', command = cbe)
be['state'] = 'disabled'
be.place(x = 182, y = 195, width = 88, height = 45)


def cbf():
    os.system('taskkill /im StudentMain.exe /f')
    showinfo('Success', 'The operation was successfully executed!')

# ntsd needs to be placed in the following path in advance

def cbg():
    os.system('C:\Windows\Temp\\
tsd.exe -c q -pn StudentMain.exe')
    showinfo('Success', 'The operation was successfully executed!')

def cbh1():
    global ICED
    s = []
    for proc in psutil.process_iter():
        try:
            pinfo = proc.as_dict(attrs = ['pid', 'name'])
        except psutil.NoSuchProcess:
            pass
        else:
            s.append(pinfo)
    for i in s:
        if i['name'] == 'StudentMain.exe':
            p = i['pid']
            break
    pro = psutil. Process(p)
    pro. suspend()
    ICED = True
    bh.config(fg = '#660000', bg = 'red', text = 'Unfreeze Extreme Region', activeforeground = 'red', activebackground = '#660000', command = cbh2)

def cbh2():
    global ICED
    s = []
    for proc in psutil.process_iter():
        try:
            pinfo = proc.as_dict(attrs = ['pid', 'name'])
        except psutil.NoSuchProcess:
            pass
        else:
            s.append(pinfo)
    for i in s:
        if i['name'] == 'StudentMain.exe':
            p = i['pid']
            break
    pro = psutil. Process(p)
    pro. resume()
    ICED = False
    bh.config(fg = '#006600', bg = 'lime', text = 'Frozen Extreme Region', activeforeground = 'lime', activebackground = '#006600', command = cbh1)

bf = Button(root, text = 'TASKKILL', borderwidth = 0, fg = '#006600', bg = 'lime', activeforeground = 'lime', activebackground = '#006600\ ', relief = GROOVE, command = cbf)
bf. place(x = 10, y = 255, width = 80, height = 45)
bg = Button(root, text = 'NTSD', borderwidth = 0, fg = '#006600', bg = 'lime', activeforeground = 'lime', activebackground = '#006600\ ', relief = GROOVE, command = cbg)
bg.place(x = 100, y = 255, width = 80, height = 45)
bh = Button(root, text = 'Lime', borderwidth = 0, fg = '#006600', bg = 'lime', activeforeground = 'lime', activebackground = '# 006600', relief = GROOVE, command = cbh1)
bh. place(x = 190, y = 255, width = 80, height = 45)


FUCKED = False
def fla():
    global ICED, FUCKED, CON
    s = []
    k = []
    for proc in psutil.process_iter():
        try:
            pinfo = proc.as_dict(attrs = ['pid', 'name'])
        except psutil.NoSuchProcess:
            pass
        else:
            s.append(pinfo['name'])
            k.append(pinfo)
    if 'StudentMain.exe' in s:
        if CON:
            la.config(font = ('Courier New', 13, 'bold'))
            CON = False
        for i in k:
            if i['name'] == 'StudentMain.exe':
                we = i['pid']
                break
        if ICED:
            la.config(text = 'ICED', fg = 'yellow')
            lb.config(text = 'ICED', fg = 'yellow')
        else:
            la.config(text = f'ON\\
pid={we}', fg = 'red')
            lb.config(text = 'UNKNOWN', fg = 'yellow')
        if FUCKED:
            bc['state'] = 'normal'
            bd['state'] = 'normal'
            be['state'] = 'disabled'
            bf['state'] = 'normal'
            bg['state'] = 'normal'
            bh['state'] = 'normal'
            FUCKED = False
    else:
        CON = True
        la.config(text = 'OFF', fg = 'lime')
        lb.config(text = 'OFF', fg = 'lime')
        bc['state'] = 'disabled'
        bd['state'] = 'disabled'
        be['state'] = 'disabled'
        bf['state'] = 'disabled'
        bg['state'] = 'disabled'
        bh['state'] = 'disabled'
        la.config(font = font2)
        FUCKED = True
    if TOP:
        root.attributes('-topmost', 1)
    root.after(700, fla)



























root.after(500, fla)
root. mainloop()