Skip to content

Instantly share code, notes, and snippets.

@katlogic
katlogic / poll.c
Created September 18, 2016 00:48
#include <sys/epoll.h>
#include <sys/socket.h>
#include <stdio.h>
int main()
{
struct epoll_event ev = {
.data.fd = 1
};
int efd = epoll_create(1);
ev.events = EPOLLIN|EPOLLET;
function lookup(t,p)
p:gsub("([^.]*).?", function(c)
if c == "" then return end
t = t[c]
end)
return t
end
print(lookup({a={b={c=1}}},"a.b.c"))
This does not seem to be exploitable on clean installs of Debian 7/8
Package versions:
5.5.49-0+deb8u1
5.5.31+dfsg-0+wheezy1
(both supposedly affected)
Miner has a public key pK, and private key sK.
When storing, the storer does:
* OP_STORE, 2^24 * 24 bits
* partition chunk of 48MB into words, 24bit each called D. you get ~ 2^24 of such words
* Hash the words via merkle, top hash is OP_STORE merkle hash
* Publish the OP_STORE with hash, along with your ip for p2p transfer
When storing for later mining, the miner does:
* Sees OP_STORE, decides to store this chunk
mydata.lua:
return { n = 1 }
nginx.conf:
location /lua {
content_by_lua '
local d = require "mydata"
d.n = d.n + 1
ngx.say(d.n)
';
> a = string.rep("a", 1e4) return string.match(a, ".-.-b")
pattern too complex
stack traceback:
[builtin#85]: at 0x004b6658
[C]: at 0x0040778b
#include <stdint.h>
#include <string.h>
enum {
ADD, SUB, ADDC, SUBC, CMP,
AND, OR, XOR, TEST,
SHL, SHR, ROTATE, // rotate direction and signed shift as primary flag
INC, // dec as primary flag
}
#define ADDR16 1
#define REPNZ 2
#define REPZ 4
#define SEGOVER 8
typedef struct {
uint32_t reg[8]; // general regs
uint32_t ip;
uint32_t seg[6]; // segment bases
uint32_t sel[6]; // segment selectors (not really used)
#include <windows.h>
#include <stdio.h>
static int data[1] __attribute__((aligned(4096))) = {1};
int main()
{
MEMORY_BASIC_INFORMATION info;
VirtualQuery(&data, &info, sizeof(info));
printf("%d\n", info.Protect==PAGE_WRITECOPY);
local mt
local sidetab = {}
mt = {
__index = function(self,k)
local l = rawget(mt,k)
if l then return l end
return sidetab[self] and sidetab[self][k] or nil
end,
__newindex = function(self,k,v)