- Compile the program in gcc with debug symbols enabled (
-g
) - Do NOT strip the binary
- To generate assembly code using gcc use the -S option:
gcc -S hello.c
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
; Press Ctrl+Shift+Space to set any currently active window to be always on top. | |
; Press Ctrl+Shift+Space again set the window to no longer be always on top. | |
; Source: https://www.howtogeek.com/196958/the-3-best-ways-to-make-a-window-always-on-top-on-windows | |
^+SPACE:: | |
WinGetTitle, activeWindow, A | |
if IsWindowAlwaysOnTop(activeWindow) { | |
notificationMessage := "The window """ . activeWindow . """ is now always on top." | |
notificationIcon := 16 + 1 ; No notification sound (16) + Info icon (1) | |
} |
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
--- src/opusenc.c | |
+++ src/opusenc.c | |
@@ -145,7 +145,7 @@ | |
printf(" --speech Tune low bitrates for speech (override automatic detection)\n"); | |
printf(" --comp n Set encoding complexity (0-10, default: 10 (slowest))\n"); | |
printf(" --framesize n Set maximum frame size in milliseconds\n"); | |
- printf(" (2.5, 5, 10, 20, 40, 60, default: 20)\n"); | |
+ printf(" (2.5, 5, 10, 20, 40, 60, 120, default: 20)\n"); | |
printf(" --expect-loss n Set expected packet loss in percent (default: 0)\n"); | |
printf(" --downmix-mono Downmix to mono\n"); |
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
// LICENSE | |
// ======= | |
// Copyright (c) 2017-2019 Advanced Micro Devices, Inc. All rights reserved. | |
// ------- | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, | |
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the | |
// Software is furnished to do so, subject to the following conditions: | |
// ------- | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the |
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
#!/usr/bin/python | |
# vim: set ft=python: | |
# see the README at https://gist.github.com/v-fox/43c287426c366679afc4c65eece60cbc | |
# source: https://github.com/mpv-player/mpv/issues/2149 | |
# source: https://github.com/mpv-player/mpv/issues/566 | |
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy | |
import vapoursynth as vs | |
import functools |
In this gist I show how to disassemble and modify a Linux executable binary to change the body of a function. This will allow you to control how a binary behaves, even when you don't have access to the source code and you can't recompile it.
In my case, I was asked to try and bypass the protection mechanism implemented. The protection mechanism implemented was meant to only allow a binary to be run in presence of a valid license.
So basically my activity involved:
- Finding the function which performs the protection check
- Disassembling the binary
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
/*============================================================================= | |
ReShade 4 effect file | |
github.com/martymcmodding | |
Rough port of CMAA2 to ReShade by Pascal Gilcher | |
I do not claim any copyright to any of the work used in this product | |
CMAA2 (Copyright (c) 2018, Intel Corporation) is licensed under | |
http://www.apache.org/licenses/LICENSE-2.0 |