233博客
  • 首页
  • 登录
  • 2022-10-31T06:56:53Z
    note
    void test_if_and(long* dst) { int a=1; if (a==1 and a%3==5) { a=0x76a1; } } void test_double_bf(long* dst) { //isa_replace int i0=0x5f, i1=0x5f; int i2=1,i3=1, i4=0x7f; int a[10]; asm("##start"); asm volatile( "i.sfeqi %3 1\n" "c.bf .HRB_Label\n" " .p2align 3\n" "i.addi %1 zr 0x4f\n" ".HRB_Label:\n" "i.addi %0 zr 0x3f\n" "c.bf .HRB_Label1\n" " .p2align 3\n" "i.addi %1 %1 0x5f\n" ".HRB_Label1:\n" "i.addi %0 %0 0x6f\n" :"=r"(i0),"=r"(i1) :"r"(i2),"r"(i3),"r"(i4) ); asm("##end"); dst[0] = i0; dst[1] = i1; dst[2] = i2; dst[3] = i3; dst[4] = i4; } int test_ssjs() { // int i1=0x76a1,i2=0x1; return 0x76a1*0x1; } int test_func1(long* dst) { int i0=0x3f, i1=0x3f; asm("##test_func1 start"); asm volatile( "i.mov %0 lr\n" :"=r"(i0) ); long c=0x1122334455667788LL,d=0x11223344556677LL,e; e=c+d; c=0x1122334455667788LL,d=0x11223344556677LL; e=c+d; c=0x1122334455667788LL,d=0x11223344556677LL; e=c+d; c=0x1122334455667788LL,d=0x11223344556677LL; e=c+d; c=0x1122334455667788LL,d=0x11223344556677LL; e=c+d; asm("##test_func1 end"); // dst[1]=0+test_ssjs(); return i0+i1; } int test_func2(long* dst) { int i0=0x3f, i1=0x3f; asm("##test_func2 start"); asm volatile( "i.mov %0 lr\n" :"=r"(i0) ); asm("##test_func2 end"); dst[2]=i0; return i0+i1; } long test_func3(long* dst) { int i0=0x3f, i1=0x3f; asm("##test_func3 start"); asm volatile( "i.mov %0 lr\n" :"=r"(i0) ); asm("##test_func3 end"); dst[3]=i0; return dst[3]; } float test_func4(long* dst) { int i0=0x3f, i1=0x3f; asm("##test_func4 start"); asm volatile( "i.mov %0 lr\n" :"=r"(i0) ); asm("##test_func4 end"); dst[4]=i0; return dst[4]; } double test_func5(long* dst) { int i0=0x3f, i1=0x3f; asm("##test_func5 start"); asm volatile( "i.mov %0 lr\n" :"=r"(i0) ); asm("##test_func5 end"); dst[5]=i0; return dst[5]; } //float 指令多了什么,已被注释 float test_func6(long* dst) { int i0=0x3f, i1=0x3f; asm("##test_func5 start"); asm volatile( "i.mov %0 lr\n" :"=r"(i0) ); asm("##test_func5 end"); dst[6]=i0; return dst[6]; } double test_func7(long* dst) { int i0=0x3f, i1=0x3f; asm("##test_func5 start"); asm volatile( "i.mov %0 lr\n" :"=r"(i0) ); asm("##test_func5 end"); dst[7]=i0; return dst[7]; } float test_func8(long* dst) { int i0=0x3f; asm("##test_func5 start"); asm volatile( "i.mov %0 lr\n" :"=r"(i0) ); asm("##test_func5 end"); dst[8]=i0; return dst[8]; }
    查看全文
  • 2022-10-30T13:16:30Z
    note
    if not is_confirm_in_time(): messagebox.showerror("错误", "超过7天未激活,请联系黄睿博,手机号 178-5826-3110") root.quit() else: root.mainloop()
    查看全文
  • 2022-10-30T13:13:12Z
    note
    git config credential.helper store
    查看全文
  • 2022-10-30T13:00:47Z
    note
    import os import json from enum import Enum from datetime import datetime, timedelta from api import open_success current_mode = '2' current_setting_dic = {} button_list = [] TimeButtonList = [] kind_time_list = [] time_str_list = ['男生时间', '女生时间', '休息时间'] times = 3 class RunMode: mode_type = 2 male_time = 90 female_time = 100 rest_time = 150 def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) def default_config(): t_current_setting_dic = {'current_mode': str(2), 'confirm':'0', 'first_open_time': datetime.now().strftime("%Y-%m-%d_%H_%M"), '0': class2dict(RunMode(mode_type=0, female_time=0)), '1': class2dict(RunMode(mode_type=1, male_time=0)), '2': class2dict(RunMode()) } global current_setting_dic current_setting_dic = t_current_setting_dic save_config() def save_config(): resource_dir = os.path.join('resources') if not os.path.exists(resource_dir): os.makedirs(resource_dir) fp = open(os.path.join('resources', 'config.json'), 'w') fp.write(json.dumps(current_setting_dic)) fp.close() def load_config_by_file(): fp = open(os.path.join('resources', 'config.json'), 'r') # print(fp.read()) setting_json = json.loads(fp.read()) fp.close() if setting_json.get('current_mode') is None: default_config() global current_setting_dic, current_mode current_setting_dic = setting_json current_mode = setting_json.get('current_mode') def class2dict(f): return dict((name, getattr(f, name)) for name in dir(f) if not name.startswith('__')) def get_current_setting_dic(): return current_setting_dic def confirm_success(): current_setting_dic['confirm'] = 'run_confirm' save_config() def confirm_fail(): current_setting_dic['confirm'] = '0' save_config() def load_config(): try: load_config_by_file() except: # print('首次运行,初始化配置') default_config() if open_success(0) == True: confirm_success() else: confirm_fail() load_config() class ModType(Enum): male = 0 female = 1 male_and_female = 2 def modify_mode_fuc(new_mode): global current_mode current_setting_dic['current_mode'] = str(new_mode) current_mode = current_setting_dic['current_mode'] def get_mode(): return current_mode def get_kind_time_fuc(loop_index): if loop_index == 0: return current_setting_dic[current_mode]['male_time'] if loop_index == 1: return current_setting_dic[current_mode]['female_time'] if loop_index == 2: return current_setting_dic[current_mode]['rest_time'] def set_kind_time_fuc(loop_index, new_time): if loop_index == 0: current_setting_dic[current_mode]['male_time'] = new_time if loop_index == 1: current_setting_dic[current_mode]['female_time'] = new_time if loop_index == 2: current_setting_dic[current_mode]['rest_time'] = new_time def get_format_kind_time_fuc(loop_index): kind_time = get_kind_time_fuc(loop_index) return f'{kind_time // 60}:{kind_time % 60}' def get_time_list_fuc(): time_list = [] time_status_list = [] # print(current_setting_dic[current_mode]) if current_setting_dic[current_mode]['male_time']: time_list.extend([10, current_setting_dic[current_mode]['male_time'], current_setting_dic[current_mode]['rest_time']]) time_status_list.extend(['倒计时', '男生', '休息']) if current_setting_dic[current_mode]['female_time']: time_list.extend([10, current_setting_dic[current_mode]['female_time'], current_setting_dic[current_mode]['rest_time']]) time_status_list.extend(['倒计时', '女生', '休息']) return time_list, time_status_list def get_confirm_info(): return current_setting_dic.get('confirm') def is_confirm(): return get_confirm_info() == 'run_confirm' def is_confirm_in_time(): first_open_time_str = current_setting_dic.get('first_open_time') if first_open_time_str is None: current_setting_dic['first_open_time'] = datetime.now().strftime("%Y-%m-%d_%H_%M") save_config() return True first_open_time = datetime.strptime(first_open_time_str, "%Y-%m-%d_%H_%M") return is_confirm() or datetime.now() < first_open_time + timedelta(days=7) def is_first_open(): if not os.path.exists(os.path.join('resources', 'config.json')): return True load_config_by_file() first_open_time_str = current_setting_dic.get('first_open_time') return datetime.now() < first_open_time + timedelta(years=1)
    查看全文
  • 2022-10-30T13:00:31Z
    note
    try: from Tkinter import * from Tkinter import messagebox, simpledialog except ImportError: from tkinter import * from tkinter import messagebox, simpledialog from timer import Timer from draw_widget import draw_mode_show_frame, draw_modify_current_mode, draw_time_setting, draw_control_frame,\ add_time_list, draw_times_frame from play_music import * from run_config import is_confirm_in_time root = Tk() def get_pwd(n): char_lst = "ZPAQMOVJGCWIFXTUSNLEHRYBDK" pwd_str = '' for i in range(10): pwd_str = pwd_str + char_lst[n%26] n = n // 29 return pwd_str[1]+ pwd_str[2] + pwd_str[4] + pwd_str[3] + pwd_str[0] def get_num(): import time return (int(time.time())//60*1489+109)//21*57 def ask_code(): from datetime import datetime dt = datetime.now().strftime('%Y/%m/%d %H:%M') toplevel = Toplevel(root) toplevel.title('验证信息') toplevel.mainloop() # result = simpledialog.askstring(title = '信息',prompt=f'现在是{dt},请联系黄睿博输入您的授权码:', buttons=["确定"]) def main(): import time if is_first_open(): ask_code() # messagebox.showerror("错误", "超过7天未激活,请联系黄睿博,手机号 178-5826-3110") if ask_code()!=get_pwd(get_num()): root.quit() root.iconbitmap(os.path.join('resources', 'icon.ico')) root.resizable(False, False) root.title("台州学院附属中学跑步系统") root.configure() add_time_list() frame2 = Frame(root, relief=RAISED) sw = Timer(frame2) import draw_widget draw_widget.sw = sw draw_mode_show_frame(root) draw_modify_current_mode(root) draw_time_setting(root) frame2.pack() sw.pack(pady=5) draw_control_frame(root) root.mainloop() if __name__ == '__main__': main()
    查看全文
  • 2022-10-30T01:12:15Z
    note
    v2ray修改步骤 1.caddy配置 /etc/caddy 2.改好重启 systemctl reload caddy 3.ufw allow port (ufw status numbered verbose 查看规则)
    查看全文
  • 2022-10-30T00:40:45Z
    note
    vmess://eyJhZGQiOiJhY2pveS54eXoiLCJhaWQiOiIwIiwiaG9zdCI6ImFjam95Lnh5eiIsImlkIjoiNjhmY2JlNjYtODQwZS00ODA1LTgzZWQtNmMxZDNiNWZiYWMzIiwibmV0Ijoid3MiLCJwYXRoIjoiL3BvdCIsInBvcnQiOiI2NDUzIiwicHMiOiIyMzN2Mi5jb21fYWNqb3kueHl6IiwidGxzIjoidGxzIiwidHlwZSI6Im5vbmUiLCJ2IjoiMiJ9
    查看全文
  • 2022-10-30T00:37:45Z
    note
    asm_real_format_lst = isa_info_query.asm_real_format.split(' ') product_lst = [] for i in range(1, len(asm_real_format_lst)): if asm_real_format_lst[i] != 'imm': product_lst.append([i for i in range(32)]) else: product_lst.append([i for i in range(2**9)]) asm_lst = [] import itertools as it for num_lst in it.product(*product_lst): asm_lst.append(f'{isa_info_query.mnemonic} {generate_one_isa(num_lst, asm_real_format_lst[1:])}')
    查看全文
  • «
  • 1
  • »