Skip to content

Instantly share code, notes, and snippets.

View segfo's full-sized avatar

segfo segfo

View GitHub Profile
#!/usr/bin/python
#coding: utf-8
import socket
import struct
host = 'babyfirst-heap_33ecf0ad56efc1b322088f95dd98827c.2014.shallweplayaga.me'
port = 4088
sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.sendall('ls -R /home\n')
sock.sendall('cat /home/babyfirst-heap/flag\n')
.intel_syntax noprefix
mov eax,0x0000AF81
push eax
mov eax,0xE381A7E7
push eax
xor edx,edx
inc edx
mov ebx,edx
add edx,edx
add edx,edx
.text
.code16gcc // 16bit-realmode
.intel_syntax noprefix // Intel Syntax
_start:
//Boot Parameter Block start
JMPInstruction: jmp short entry
NoOperation: nop
OEM_name: .ascii "tankaX86"
sect_size: .word 512
#include<stdio.h>
int main(){
int a=0x1<<31;
int b=-1L;
int c;
c=a/b;
printf("%d/%d=%d\n",a,b,c);
return 0;
}
#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.
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)))
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テンプレートの定義
#include <iostream>
#include<string.h>
using namespace std;
int main()
{
// これはあくまでも一例、C++ではString型を使うこと。
// Cの書き方とC++の書き方を混ぜるのはあまり良くない。
int v = 12; // プログラム的に変わる変数v(variable)