Skip to content

Instantly share code, notes, and snippets.

@yutianqaq
yutianqaq / P1.py
Last active June 19, 2024 02:12
Python 爬虫
import requests
import logging
import random
import time
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
# 忽略 HTTPS 验证警告
requests.packages.urllib3.disable_warnings()
@yutianqaq
yutianqaq / ClearDefenderHistory.bat
Created April 3, 2024 07:44
Clear Defender History
<# : batch script
@echo off
powershell -nop "if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { Start-Process -Verb RunAs 'cmd.exe' -ArgumentList '/c %~dpnx0 %*' } else { Invoke-Expression ([System.IO.File]::ReadAllText('%~f0')) }"
goto :eof
#>
# https://www.tiraniddo.dev/2019/09/the-art-of-becoming-trustedinstaller.html
# https://github.com/LesFerch/ClearDefenderHistory/blob/main/ClearDefenderHistory.bat
$ScriptBlock = {
@yutianqaq
yutianqaq / Tools.md
Last active June 26, 2024 14:22
用于记录常用工具名字
@yutianqaq
yutianqaq / .zshrc
Created January 4, 2024 06:34
costom zshrc
export PATH="/ffffffff0x/.jenv/bin:$PATH"
eval "$(jenv init -)"
alias code='code --no-sandbox --user-data-dir /root/vscode_data'
# custom alias
alias rastart='systemctl start wg-quick@client'
alias rastop='systemctl stop wg-quick@client'
alias bloodhound='BloodHound --no-sandbox'
@yutianqaq
yutianqaq / hash_func_unicode.py
Created December 15, 2023 13:02
hash_func_unicode
import sys
def hash_string(string):
try:
hash_value = 7124
for x in string:
hash_value = ((hash_value << 5) + hash_value) + ord(x)
return hash_value & 0xFFFFFFFF
@yutianqaq
yutianqaq / xorencrypt.py
Last active January 1, 2024 03:33
xorencrypt
import os
import sys
import random
import string
def generate_random_string(length):
# 生成随机字符串的字符集
characters = string.ascii_letters + string.digits
@yutianqaq
yutianqaq / anti.cpp
Created November 30, 2023 13:54
反沙箱之获取屏幕分辨率
void DisplayScale()
{
HWND hWnd = GetDesktopWindow();
HMONITOR hMonitor = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);
MONITORINFOEX miex;
miex.cbSize = sizeof(miex);
GetMonitorInfo(hMonitor, &miex);
int cxLogical = (miex.rcMonitor.right - miex.rcMonitor.left);
int cyLogical = (miex.rcMonitor.bottom - miex.rcMonitor.top);