Skip to content

Instantly share code, notes, and snippets.

QThread报错:QThread: Destroyed while thread is still running

出错原因在于线程还在运行的时候线程对象就已经被摧毁了,很可能是被垃圾回收了。

You're not storing a reference to the thread after it's been created, which means that it will be garbage collected (ie. destroyed) some time after the program leaves MainWindows init. You need to store it at least as long as the thread is running, for example use self.statusTh:

@gmh5225
gmh5225 / CVE-2023-41892-POC.md
Created September 24, 2023 15:32 — forked from to016/CVE-2023-41892-POC.md
CVE-2023-41892 (Craft CMS Remote Code Execution) - POC

This Gist provides a Proof-of-Concept (POC) for CVE-2023-41892, a Craft CMS vulnerability that allows Remote Code Execution (RCE).

Overview

CVE-2023-41892 is a security vulnerability discovered in Craft CMS, a popular content management system. Craft CMS versions affected by this vulnerability allow attackers to execute arbitrary code remotely, potentially compromising the security and integrity of the application.

POC

import requests
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active March 19, 2026 11:02
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@rexim
rexim / main.rs
Last active October 31, 2024 20:32
The Most Memory Safe Buffer Overflow in Rust!
// The Most Memory Safe Buffer Overflow in Rust!
//
// Consider all the code below under Public Domain
//
// How to build:
// $ rustc main.rs
//
// Wrong password:
// $ printf "hello\n" | ./main
//
@tonybaloney
tonybaloney / brute_token.py
Created December 1, 2021 20:32
Brute force a admin login and 2FA endpoint with token ranges 100,000 - 1,000,000
import asyncio
import aiohttp
from itertools import islice, chain
LOGIN_FORM = 'http://asd.sdfsdf/admin'
LOGIN_URL = 'http://asd.fsdfsdf/admin'
TWOFA_FORM = 'http://asda.asdas/doAdminTwoFactor.action'
INVALID_MESSAGE = 'Invalid token, please try again'
def batch(iterable, size):
// Copyright 2021 Alexey Kutepov <reximkut@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
@themagicalmammal
themagicalmammal / Optimizations_Artix.md
Last active March 6, 2026 11:15
Set of optimizations, I use on my Artix Setup

Artix Linux — Complete System Optimization Guide

Warning: This guide contains system-level modifications. Some steps are irreversible or can render your system unbootable. Read every section fully before executing any command. Know what you are doing, or do not proceed.

All examples are written for runit. Adapt service commands for OpenRC or s6 as needed.


Index

pub trait IteratorExt: Iterator + Sized {
fn our_flatten(self) -> Flatten<Self>
where
Self::Item: IntoIterator;
}
impl<T> IteratorExt for T
where
T: Iterator,
{
fn our_flatten(self) -> Flatten<Self>
#[macro_export]
macro_rules! avec {
($($element:expr),*) => {{
// check that count is const
const C: usize = $crate::count![@COUNT; $($element),*];
#[allow(unused_mut)]
let mut vs = Vec::with_capacity(C);
$(vs.push($element);)*
vs
#![warn(rust_2018_idioms)]
#[derive(Debug)]
pub struct StrSplit<'haystack, D> {
remainder: Option<&'haystack str>,
delimiter: D,
}
impl<'haystack, D> StrSplit<'haystack, D> {
pub fn new(haystack: &'haystack str, delimiter: D) -> Self {