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
// | |
// Windows x86 Interrupt Descriptor Table (IDT) hook test | |
// | |
// Barakat Soror (https://twitter.com/barakatsoror) | |
// | |
#include <Windows.h> | |
int main(void) | |
{ |
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
#include <X11/Xlib.h> | |
#include <X11/Xatom.h> | |
#include <X11/Xutil.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include "x.h" | |
#include "datatypes.h" |
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
// windbg use: !analyze -show 109 | |
// As of 2/25/2019 | |
0 : A generic data region | |
1 : Modification of a function or .pdata | |
2 : A processor IDT | |
3 : A processor GDT | |
4 : Type 1 process list corruption | |
5 : Type 2 process list corruption | |
6 : Debug routine modification | |
7 : Critical MSR modification |
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
import idaapi | |
from idc import * | |
logo = "CE ED 66 66 CC 0D 00 0B 03 73 00 83 00 0C 00 0D 00 08 11 1F 88 89 00 0E DC CC 6E E6 DD DD D9 99 BB BB 67 63 6E 0E EC CC DD DC 99 9F BB B9 33 3E".replace(" ", "").decode("hex") | |
registers = { | |
0xFF00: "rJOYP", | |
0xFF01: "rSB", | |
0xFF02: "rSC", | |
0xFF04: "rDIV", |
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
/** By_Sean_Eron_Anderson [email protected] */ | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <endian.h> | |
#define CHAR_BIT 8 | |
void Compute_the_sign_of_an_integer() { | |
/*Compute the sign of an integer*/ |
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
private static Dictionary<string, string> GetProcessorInfo() | |
{ | |
ManagementObjectCollection moc; | |
var Processor = new Dictionary<string, string>(); | |
try | |
{ | |
moc = new ManagementObjectSearcher("select * from Win32_Processor").Get(); | |
} | |
catch |
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
/* MIT License | |
* | |
* Copyright (c) namazso 2018 | |
* | |
* 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: |
Here is the gist for showing how to send string from c to go without a copy, for sending an float32 array from c to go without copy, please see here
Below is the documentation for converting between a c string and a go string:
// From https://golang.org/cmd/cgo/
// A few special functions convert between Go and C types by making copies of the data.
// Go string to C string
// The C string is allocated in the C heap using malloc.
// It is the caller's responsibility to arrange for it to be
// freed, such as by calling C.free (be sure to include stdlib.h