This file contains 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
<# :: | |
@echo off | |
powershell -c "iex (gc -Raw '%~f0')" | |
goto :eof | |
#> | |
$Names = @() | |
Add-Type -TypeDefinition @" | |
using System; | |
using System.Runtime.InteropServices; | |
public static class PackageDebugSettings |
This file contains 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
#define printf PrintFormatA | |
DWORD PrintFormatA(LPCSTR lpFormat, ...) | |
{ | |
va_list ArgList = NULL; | |
va_start(ArgList, lpFormat); | |
CHAR szOutput[1024] = {}; | |
DWORD nNumberOfBytesToWrite = wvsprintfA(szOutput, lpFormat, ArgList); | |
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), szOutput, nNumberOfBytesToWrite, NULL, NULL); | |
va_end(ArgList); | |
return nNumberOfBytesToWrite; |
This file contains 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
@echo off | |
cd "%~dp0" | |
gcc -municode -mwindows -nostdlib -Os -s WinMain.c -lUser32 -lKernel32 -lShell32 -o NoSteamWebHelper.exe | |
upx --best --ultra-brute NoSteamWebHelper.exe>nul 2>&1 |
This file contains 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> | |
LONG DisplayConfigSetDisplayMode(DISPLAYCONFIG_PATH_INFO *pPath, PDEVMODEW pDevMode, DWORD dwFlags) | |
{ | |
DISPLAYCONFIG_SOURCE_DEVICE_NAME dcSourceDeviceName = {.header = {.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME, | |
.size = sizeof(DISPLAYCONFIG_SOURCE_DEVICE_NAME), | |
.adapterId = pPath->sourceInfo.adapterId, | |
.id = pPath->sourceInfo.id}}; | |
DisplayConfigGetDeviceInfo(&dcSourceDeviceName.header); |
This file contains 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
BOOL MarkWindowFullscreen(HWND hWnd, BOOL fFullscreen) | |
{ | |
ITaskbarList2 *pTaskbarList2 = NULL; | |
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); | |
CoCreateInstance(&CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskbarList2, (LPVOID *)&pTaskbarList2); | |
pTaskbarList2->lpVtbl->HrInit(pTaskbarList2); | |
HRESULT hr = pTaskbarList2->lpVtbl->MarkFullscreenWindow(pTaskbarList2, GetConsoleWindow(), TRUE); | |
pTaskbarList2->lpVtbl->Release(pTaskbarList2); |
This file contains 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
[dependencies.windows] | |
version = "0.52" | |
features = ["Win32_Foundation", "Win32_Graphics_Dxgi", "Win32_Graphics_Dxgi_Common"] | |
[dependencies.windows-sys] | |
version = "0.52" | |
features = ["Win32_Foundation", "Win32_Devices_DeviceAndDriverInstallation"] |
This file contains 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-Type -AssemblyName System.Web.Extensions | |
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
[System.Web.Script.Serialization.JavaScriptSerializer]$JavaScriptSerializer = New-Object System.Web.Script.Serialization.JavaScriptSerializer | |
[System.Net.WebClient]$WebClient = New-Object System.Net.WebClient | |
$WebClient.Headers.Add("user-agent", "request") | |
$WebClient.DownloadFile(($JavaScriptSerializer.DeserializeObject( | |
$WebClient.DownloadString( | |
"https://api.github.com/repos/dscharrer/innoextract/releases/latest" |
This file contains 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 <dwmapi.h> | |
#include <tlhelp32.h> | |
// Callback function that marks a window as rude or non-rude depending on the parameter passed to MarkRudeWindow(HWND hWnd, BOOL bRude) | |
BOOL EnumWindowsProc(HWND hWnd, LPARAM lParam) | |
{ | |
static UINT uShellHookMessage = 0; | |
WCHAR rgwcClassName[256] = {0}; |
This file contains 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
// Marks a window as fullscreen. | |
VOID MarkFullscreenWindow(HWND hWnd, BOOL fFullscreen) | |
{ | |
// Source: https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist2-markfullscreenwindow | |
ITaskbarList2 *pTaskbarList2 = NULL; | |
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE | COINIT_SPEED_OVER_MEMORY); | |
CoCreateInstance(&CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskbarList2, (LPVOID *)&pTaskbarList2); | |
if (fFullscreen) |
This file contains 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
#define _WIN32_WINNT _WIN32_WINNT_WIN10 | |
#include <windows.h> | |
int printf(const char *__format, ...); | |
LPWSTR ShellHookMessageToStringW(WPARAM wParam) | |
{ | |
switch (wParam) | |
{ | |
case HSHELL_WINDOWCREATED: | |
return L"HSHELL_WINDOWCREATED"; |
NewerOlder