This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <winternl.h> | |
#include <psapi.h> | |
#include <iostream> | |
#include <vector> | |
bool check(HANDLE hProcess) { | |
PROCESS_BASIC_INFORMATION pbi = {}; | |
DWORD rb = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$registryPaths = @( | |
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", | |
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | |
) | |
function Get-SteamGames { | |
$steamGames = @() | |
foreach ($path in $registryPaths) { | |
if (Test-Path $path) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import operator | |
import readline | |
units = { | |
None: 1, | |
'm': 1e6, | |
'b': 1e9, | |
't': 1e12, | |
'qd': 1e15, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
f="$1" | |
if [ -z "$f" ] | |
then | |
echo "Usage: $0 elf-to-fix" | |
exit 1 | |
fi | |
if [ -n "$f" -a ! -f "$f" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function searchTag(el, tag) { | |
return el.tagName === tag ? el : searchTag(el.parentNode, tag); | |
} | |
const blockList = /acer|kioxia|pny/ig | |
const requireList = /[124]tb/ig | |
[...$$('#ItemContainer .prod_name')] | |
.filter(el => el.textContent.match(blockList) || !el.textContent.match(requireList)) | |
.map(el => searchTag(el, 'DL')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-WindowsCapability -Online -Name (Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Server~~~*').Name | |
Start-Service sshd | |
Set-Service sshd -StartupType Automatic | |
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force | |
ssh w11 powershell 'chcp 65001; Add-Content -Force -Path $env:ProgramData\ssh\administrators_authorized_keys -Value "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJhhjdIss2wmiuFJCjpWEVInHMuXfGed0J3nZW1wIKtg";icacls.exe "$env:ProgramData\ssh\administrators_authorized_keys" /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import wintypes | |
import ctypes | |
import threading | |
import time | |
kernel32 = ctypes.CDLL('kernel32') | |
ENABLE_PROCESSED_INPUT = 1 | |
ENABLE_LINE_INPUT = 2 | |
ENABLE_ECHO_INPUT = 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func fcolor(r, g, b byte) string { | |
return fmt.Sprintf("\x1b[38;2;%d;%d;%dm", r, g, b) | |
} | |
func bcolor(r, g, b byte) string { | |
return fmt.Sprintf("\x1b[48;2;%d;%d;%dm", r, g, b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
proxy = os.getenv('socks5_proxy') | |
if proxy: | |
host, port = proxy.split(':') | |
import socks # pip install pysocks | |
import socket | |
def create_connection(address, timeout=None, source_address=None): | |
sock = socks.socksocket() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Tooltip } from 'bootstrap'; | |
import { nextTick } from 'vue'; | |
const attrName = 'data-bs-title'; | |
const contextAttrName = '__v_bs_tooltip__'; | |
export default { | |
install(app, options) { | |
app.directive('bs-tooltip', { | |
mounted(el, binding, vnode, prevVnode) { |
NewerOlder