Skip to content

Instantly share code, notes, and snippets.

View DrPizza's full-sized avatar
🙄
they see me rollin'. they hatin'.

Peter Bright DrPizza

🙄
they see me rollin'. they hatin'.
View GitHub Profile
unsigned int x = 0;
template<unsigned int N>
struct F
{
enum { val = F<N - 1>::val * N };
};
template<>
struct F<0>
template<typename T, typename U>
T* make_pointer(U* base, ptrdiff_t offset)
{
return reinterpret_cast<T*>(reinterpret_cast<size_t>(base) + offset);
}
PROC hook_iat(HMODULE importing_module, const char* exporting_module, PSTR function_name, PROC hooking_proc)
{
if(!importing_module) {
return nullptr;
#include <iostream>
#include <fstream>
int main(int argc, char* argv[])
{
// victim is 32-bit, /DYNAMICBASE:NO, /NXCOMPAT:NO, /GS-, running on Windows 8.1 Pro 64-bit free.
// KB2868626 KB2883200 KB2887595 KB2894852 KB2894856 KB2900986 KB2903939 KB2904440 KB2911106
// KB2919355 KB2919394 KB2919442 KB2920189 KB2928680 KB2934520 KB2954879 KB2955164 KB2959626
// KB2961072 KB2962140 KB2962409 KB2965142 KB2965500 KB2966826 KB2966828 KB2967917 KB2968296
// KB2969339 KB2971203 KB2972103 KB2972213 KB2973114 KB2973201 KB2973351 KB2975061 KB2975719
#define _CRT_SECURE_NO_DEPRECATE 1
#define _CRT_SECURE_NO_WARNINGS 1
#include <cstdio>
#include <cstring>
#include <iostream>
#include <windows.h>
void say_hello()
{
#include <iostream>
#include <list>
#include <tuple>
#include <memory>
#include <type_traits>
template<typename Tuple, typename Function, std::size_t... Indices, typename = std::enable_if_t<std::is_void<std::result_of_t<Function(std::tuple_element_t<0, std::decay_t<Tuple>>)>>::value>>
constexpr void tuple_for_each_aux(Tuple&& t, Function f, std::index_sequence<Indices...>) {
using swallow = int[];
static_cast<void>(swallow{ 0, (f(std::get<Indices>(std::forward<Tuple>(t))), void(), 0)... });
#include <tuple>
#include <utility>
#include <type_traits>
#include <iostream>
template<typename... T> class typelist {};
template<typename F, std::size_t I, typename... Tuples>
using apply_result_type = decltype(std::declval<F>()(std::get<I>(std::declval<Tuples>())...));
#include <tuple>
#include <utility>
#include <type_traits>
#include <iostream>
template<typename... T> class typelist {};
template<typename F, std::size_t I, typename... Tuples>
using apply_result_type = decltype(std::declval<F>()(std::get<I>(std::declval<Tuples>())...));
constexpr bool operator==(const iterator_type& rhs) const
{
return utility::tuple_apply_fn{}([](const auto&... as) { return utility::foldl_fn{}([](bool lhs, bool rhs) { return lhs && rhs; }, true, as...); }, utility::tuple_for_each_fn{}([](const auto& lhs, const auto& rhs) { return lhs == rhs; }, its, rhs.its));
}
1>Target "_MASM: (TargetId:36)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\masm.targets" from project "C:\Code\Projects\reed-solomon\tbb\tbb.vcxproj" (target "_BuildGenerateSourcesAction" depends on it):
1>Building target "_MASM" completely.
1>Output file "C:\Code\Projects\reed-solomon\x64\Debug\tbb\lock_byte.obj" does not exist. <----- WHY ADDED TO THE LIST OF OBJECTS?
1>Task "Message" (TaskId:17)
1> Task Parameter:Importance=High (TaskId:17)
1> Task Parameter:Text=Assembling src\tbb\ia32-masm\lock_byte.asm... (TaskId:17)
1> Assembling src\tbb\ia32-masm\lock_byte.asm... (TaskId:17) <-------- WHY BUILDING HERE?
1>Done executing task "Message". (TaskId:17)
1>Task "WriteLinesToFile" skipped, due to false condition; ('@(MASM_tlog)' != '' and '%(MASM_tlog.ExcludedFromBuild)' != 'true') was evaluated as ('' != '' and '' != 'true').
1>Task "MASM" skipped, due to false condition; ('@(MASM)' != '' and '%(MASM.ExcludedFromBuild)' != 'true') was evaluated as ('src\tbb\ia32-ma

Keybase proof

I hereby claim:

  • I am DrPizza on github.
  • I am drpizza (https://keybase.io/drpizza) on keybase.
  • I have a public key whose fingerprint is 0671 F93D F5D8 4CD9 9957 87EA 82A6 1251 0FFB 783C

To claim this, I am signing this object: