Skip to content

Instantly share code, notes, and snippets.

View craeckor's full-sized avatar
💭
i'm thinking

craeckor craeckor

💭
i'm thinking
View GitHub Profile
@craeckor
craeckor / Get-AppxPackage-DownloadLinks-Function.ps1
Last active August 26, 2024 20:39
Supports all parameters of https://store.rg-adguard.net/, only one parameter is allowed ($Ring doesn't count)
@craeckor
craeckor / script.zip.base64.cmd
Last active June 21, 2024 10:56
Fixes Error 0x80070643 for Windows Update KB5034441
@echo off
SETLOCAL EnableDelayedExpansion
for /f "tokens=* delims=" %%i in ('powershell -command "(Get-WmiObject -Class Win32_OperatingSystem).SystemDrive"') do set drive=%%i
for %%I in ("%~dp0") do set "cdrive=%%~dI"
if not "%cdrive%"=="%drive%" (
copy "%~f0" "%PUBLIC%\%~nx0"
start /b /wait "" cmd /c "%PUBLIC%\%~nx0"
start /b "" cmd /c "%cdrive% && del /f /q "%~f0""
exit /b
)
@craeckor
craeckor / update-cloudflare-dns-records.sh
Last active September 12, 2024 17:30
Script for updating your Cloudflare DNS-Records.
#!/bin/bash
#
# Cloudflare DNS-Records updater script V1.4
# Made by craeckor
#
# This script updates your Cloudflare DNS-Records.
# Requirements: bash, jq, curl and awk.
# API-Token (Not API-Key) is required.
# Only works for one specific Second Level Domain per script. (E.g example.com) Multiple subdomains are supported.
@craeckor
craeckor / aria2c.exe.ps1
Created January 8, 2024 11:19
PowerShell-Script which extracts aria2c from itself into the TEMP-directory and gives out the full-path from the executable aria2c.exe-file.
This file has been truncated, but you can view the full file.
@craeckor
craeckor / voicemeeter-keygen.ps1
Last active September 4, 2024 23:21
PowerShell script to activate VoiceMeeter Potato. This script uses double Base64 encoding for the keygen to evade antivirus-detection.
This file has been truncated, but you can view the full file.
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
@craeckor
craeckor / connect-sql.ps1
Created October 25, 2023 19:36
Connect PowerShell script with MSSQL-Server
#--------------------------------------------------------------------------------------------------------------
#-- Script to run query and get recordset
#-- Credits: SomTripathi --> https://gist.github.com/SomTripathi/651fd287250ad013720f
#--------------------------------------------------------------------------------------------------------------
function Run-Query( [string]$InstanceName , [string]$DatabaseName, [string]$Query, [string]$Username, [string]$Password)
{
$SQLInstance = $InstanceName
$DBName = $DatabaseName
@craeckor
craeckor / get-release-tag.bat
Last active January 31, 2024 15:51
Get latest release tag from a github repo
@echo off
setlocal enabledelayedexpansion
set header=-H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" -H "Accept-Language: en-US,en;q=0.5" -H "Connection: keep-alive" -H "Pragma: no-cache" -H "Cache-Control: no-cache"
set repo=PowerShell/PowerShell
for /f "tokens=7 delims=/" %%i in ('curl -s !header! -I "https://github.com/!repo!/releases/latest" 2^>^&1 ^| findstr "Location:"') do (
set tag=%%i
)
echo !tag!
endlocal
pause