Skip to content

Instantly share code, notes, and snippets.

View riverar's full-sized avatar

Rafael Rivera riverar

View GitHub Profile
@riverar
riverar / gist:4052f4a792ad2b784f8f
Created May 28, 2014 20:33
Diff of TrueCrypt 7.1a and "TrueCrypt 7.2" sources
--- Boot/Windows/BootMain.cpp Mon Jan 19 14:26:12 1970
+++ Boot/Windows/BootMain.cpp Mon Jan 19 14:26:12 1970
@@ -75,7 +75,9 @@
#endif // TC_WINDOWS_BOOT_RESCUE_DISK_MODE
- PrintEndl (3);
+ PrintEndl (2);
+ Print ("WARNING: Using TrueCrypt is not secure");
+ PrintEndl (2);
@riverar
riverar / Cargo.toml
Last active December 29, 2023 00:48
ADCS Templates
[package]
name = "app"
version = "0.0.0"
edition = "2021"
publish = false
[dependencies.windows]
version = "0.52.0"
features = [
"Win32_Foundation",
@riverar
riverar / focus_assist.cpp
Created October 30, 2018 00:02
Determine state of Quiet Hours/Focus Assist with WNF
//
// Not to be used in any serious manner
//
#include <Windows.h>
#include <iostream>
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
typedef struct _WNF_STATE_NAME
{
@riverar
riverar / features.json
Last active November 8, 2023 20:46
Quick n' dirty hack to enable Your Phone remoting, notification and other experiments
{
"AATes123": true,
"AcrylicAndBackground": true,
"AudioInfoSync": true,
"BatteryIndicator": true,
"CallingDiscoveryTimeout": 30,
"CallingEnableOnARM": true,
"CallingFromMessages": true,
"CallingLabelInProd": true,
"CallingNode": true,
@riverar
riverar / agent-2.js
Created July 9, 2019 09:37
Frida agent, using Xamarin Mono APIs to intercept a full-AOT method and dump its single argument
import { MonoApiHelper, MonoApi } from 'frida-mono-api'
const domain = MonoApi.mono_get_root_domain()
// Get a handle to the SeeingAI.Core assembly
let coreAssembly = MonoApi.mono_assembly_load_with_partial_name(Memory.allocUtf8String("SeeingAI.Core"), NULL)
let coreImage = MonoApi.mono_assembly_get_image(coreAssembly)
// Retrieve class metadata
let helperClass = MonoApiHelper.ClassFromName(coreImage, "SeeingAI.Network.SignatureHelper")
@riverar
riverar / gist:fd6525579d6bbafc6e48
Last active December 10, 2022 08:08
C# structures to implement "Aero Glass" blur on Windows 10
[DllImport("user32.dll")]
internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
[StructLayout(LayoutKind.Sequential)]
internal struct WindowCompositionAttributeData
{
public WindowCompositionAttribute Attribute;
public IntPtr Data;
public int SizeOfData;
}
@riverar
riverar / made_by_you_display_scaling.html
Created January 8, 2016 17:29
Made by you - Display Scaling in Windows 10
<p>Today we are introducing a new series of articles titled ‘Made by you’. If you have feedback on this type of content or other aspects of the Windows Insider Program, please let us know via the <a href="windows-feedback:?contextid=529" target="_blank">Feedback App</a>.&nbsp;&nbsp;</p>
<p>‘Made by you’ highlights how we are addressing feedback from Windows Insiders, how we investigated this feedback to shape Windows, and why we have made&nbsp;these improvements.</p>
<h3>Overview/Introduction </h3>
<p>Windows 10 is an important release for Windows display scaling. It implements a unified approach to display scaling across all SKUs and devices aimed at these goals: </p>
<ol>
<li>Our end users enjoy a mix of UWP and classic desktop applications on desktop SKUs which reliably provide content at a consistent size </li>
@riverar
riverar / services-agreement.patch
Last active June 23, 2022 12:30
Microsoft Services Agreement diff, [current] => [August 30, 2019]
--- old.txt Wed Jul 10 21:24:49 2019
+++ new.txt Wed Jul 10 21:24:52 2019
@@ -20 +20 @@
-vii. Don’t engage in activity that is harmful to you, the Services, or others (e.g., transmitting viruses, stalking, posting terrorist content, communicating hate speech, or advocating violence against others).
+vii. Don’t engage in activity that is harmful to you, the Services or others (e.g., transmitting viruses, stalking, posting terrorist or violent extremist content, communicating hate speech, or advocating violence against others).
@@ -25 +25 @@
-c. Application to Xbox Services. Click here for more information about how this Code of Conduct applies to Xbox Live, Games for Windows Live and Microsoft Studios games, applications, services and content provided by Microsoft. Violation of the Code of Conduct through Xbox Services (defined in section 14(a)(i)) may result in suspensions or bans from participation in Xbox Services, including forfeiture of content licenses, Xbox Gold Membership time, and Microsoft account ba
@riverar
riverar / prepare_xbox_disk.ps1
Created December 12, 2016 19:25
Xbox One disk partitioning script
# Copyright (c) Rafael Rivera
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@riverar
riverar / dummy.exe.manifest
Created May 30, 2016 17:04
Long Path Aware sample manifest
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<longPathAware>true</longPathAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>