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 | |
#coding: utf-8 | |
import struct | |
import os | |
p32 = lambda x:struct.pack("<l",x) | |
addr = 0x00514E88 | |
fixedMemory = p32(addr) |
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<stdio.h> | |
#include<stdlib.h> | |
#include<Windows.h> | |
unsigned char globalValue[0x400] = { 0 }; | |
#define MEMSTR ("VirtualProtect.\n") | |
#define VALLOC_SIZE 0x2000 | |
void somewhere() { |
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
main: | |
; LoadLibrary("ws2_32.dll") をする | |
mov ax,0x6c6c | |
movzx eax,ax | |
push eax | |
push 0x642e3233 | |
push 0x5f327377 | |
push esp ; ws2_32.dll | |
push 0xec0e4e8e ; LoadLibraryA | |
call api_call |
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<iostream> | |
#include<string> | |
#include"TestClass.h" | |
using namespace std; | |
int main() { | |
static char buf[sizeof(TestClass)*10]; | |
cout << sizeof(TestClass) << endl; | |
TestClass *t1 = new(buf) TestClass("AAAAAAA"); |
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
#pragma once | |
class TestClass | |
{ | |
public: | |
TestClass(); | |
TestClass(char *s); | |
~TestClass(); | |
void Print(); | |
private: | |
char* s = nullptr; |
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 "TestClass.h" | |
#include<iostream> | |
using namespace std; | |
TestClass::TestClass(){} | |
TestClass::TestClass(char *s) | |
{ | |
this->s = s; |
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 <iostream> | |
#include<string.h> | |
using namespace std; | |
int main() | |
{ | |
// これはあくまでも一例、C++ではString型を使うこと。 | |
// Cの書き方とC++の書き方を混ぜるのはあまり良くない。 | |
int v = 12; // プログラム的に変わる変数v(variable) |
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 std.stdio; | |
import std.string; | |
import std.socket; | |
import std.socketstream; | |
import core.thread; | |
import core.exception; | |
import core.sync.condition; | |
import core.sync.mutex; | |
// Queueテンプレートの定義 |
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 sys | |
import string | |
if (len(sys.argv)<2): | |
print "missing arguments." | |
exit() | |
f_in=open(sys.argv[1],"rb") | |
f_out=open("tanka.bin","wb") | |
for n in f_in.read().split(): f_out.write(chr(int(n,16))) |
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<stdio.h> | |
char flag[]={"Itofrjxb2`..c.2.6031]g6b1gg0^)b11cb^^-]z"}; | |
int main(){ | |
int eax,edx,ecx; | |
int tick=0; | |
int i; | |
for(tick=0;tick<3;){ // IRQ 0 interrupt. |