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
/***************************************************************************\ | |
* DialogBox2 | |
* | |
* History: | |
\***************************************************************************/ | |
INT_PTR DialogBox2( | |
HWND hwnd, | |
HWND hwndOwner, | |
BOOL fDisabled, |
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
OVERVIEW: LLVM 'Clang' Compiler: http://clang.llvm.org | |
USAGE: clang -cc1 [options] <inputs> | |
OPTIONS: | |
-### Print the commands to run for this compilation | |
--analyze Run the static analyzer | |
--migrate Run the migrator | |
--relocatable-pch Build a relocatable precompiled header | |
--serialize-diagnostics <value> |
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
/* | |
* Get address from symbol (libdwarf version) | |
* Based on code by : Eli Bendersky (http://eli.thegreenplace.net) | |
* | |
*/ | |
#include <stdio.h> | |
#include <stdarg.h> | |
#include <stdlib.h> | |
#include <string.h> |
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
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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
// | |
// main.c | |
// macho-syms | |
// | |
// Created by C0deH4cker on 3/19/16. | |
// Copyright © 2016 C0deH4cker. All rights reserved. | |
// | |
#include <stdio.h> | |
#include <stdlib.h> |
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
// http://www.exploit-monday.com/2013/06/undocumented-ntquerysysteminformation.html | |
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
enum _SYSTEM_INFORMATION_CLASS | |
{ | |
SystemBasicInformation = 0x0000, | |
SystemProcessorInformation = 0x0001, | |
SystemPerformanceInformation = 0x0002, | |
SystemTimeOfDayInformation = 0x0003, |
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
''' | |
IDAPython script that generates a YARA rule to match against the | |
basic blocks of the current function. It masks out relocation bytes | |
and ignores jump instructions (given that we're already trying to | |
match compiler-specific bytes, this is of arguable benefit). | |
If python-yara is installed, the IDAPython script also validates that | |
the generated rule matches at least one segment in the current file. | |
author: Willi Ballenthin <william.ballenthin@fireeye.com> |
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 <stdio.h> | |
static int data[1] __attribute__((aligned(4096))) = {1}; | |
int main() | |
{ | |
MEMORY_BASIC_INFORMATION info; | |
VirtualQuery(&data, &info, sizeof(info)); | |
printf("%d\n", info.Protect==PAGE_WRITECOPY); |
OlderNewer