This file contains 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
LRU Cache | |
insert -- touch the value, update the value | |
init -- initialize w/ capacity | |
get -- get the value associated w/ key. touch the value | |
keep track of the LRU | |
Assumptions | |
1. key is an int, value is an int |
This file contains 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
(setq inhibit-startup-message t) | |
(require 'package) | |
(setq package-enable-at-startup nil) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/")) | |
(package-initialize) |
This file contains 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
exception ImplementMe | |
type t = True | False | If of t * t * t | Int of int | Plus of t * t | Greater of t * t | |
let isval t = | |
match t with | |
True|False -> true | |
| Int _ -> true | |
| _ -> false |
This file contains 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
; Function Attrs: noinline nounwind ssp | |
define void @"dummy_function(Dummy&, long, long, long)"({ i64, i64, i64 }* %dummy, i64 %i, i64 %j, i64 %k) local_unnamed_addr #0 { | |
%1 = tail call i8* @llvm.returnaddress(i32 0) | |
%2 = ptrtoint i8* %1 to i64 | |
%3 = ptrtoint { i64, i64, i64 }* %dummy to i64 | |
%4 = getelementptr inbounds { i64, i64, i64 }, { i64, i64, i64 }* %dummy, i64 0, i32 0 | |
store i64 %i, i64* %4, align 8 | |
%5 = add i64 %3, 8 | |
%6 = inttoptr i64 %5 to i64* | |
store i64 %j, i64* %6, align 8 |
This file contains 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
; Function Attrs: noinline nounwind ssp | |
define void @"dummy_function(Dummy&, long, long, long)"({ i64, i64, i64 }* %dummy, i64 %i, i64 %j, i64 %k) local_unnamed_addr #0 { | |
%1 = tail call i8* @llvm.returnaddress(i32 0) | |
%2 = ptrtoint i8* %1 to i64 | |
%3 = tail call %struct.Memory* @__remill_write_memory_64(%struct.Memory* null, i64 14096, i64 %2) | |
%4 = tail call %struct.Memory* @__remill_write_memory_64(%struct.Memory* %3, i64 14088, i64 0) #4 | |
%5 = ptrtoint { i64, i64, i64 }* %dummy to i64 | |
%6 = tail call %struct.Memory* @__remill_write_memory_64(%struct.Memory* %4, i64 %5, i64 %i) #4 | |
%7 = add i64 %5, 8 | |
%8 = tail call %struct.Memory* @__remill_write_memory_64(%struct.Memory* %6, i64 %7, i64 %j) #4 |
This file contains 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 requests | |
import re | |
def main(): | |
print("starting") | |
# Set the admin cookie before doing anything else | |
my_cookie = { | |
"name":"admin", | |
"value":"true" |
This file contains 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> | |
int main() { | |
printf("Hello World"); | |
return 0; | |
} |
This file contains 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 <string.h> | |
#include <unistd.h> | |
#include <sys/stat.h> | |
#define PARASITE_SIZE 8824 | |
int main(int argc, char **argv) { |
This file contains 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 <sys/mman.h> | |
int main(int argc, char **argv) { | |
if (argc != 3) { | |
printf("Usage: ./infect [host] [parasite]\n"); | |
exit(0); | |
} |
This file contains 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 <stdint.h> | |
#include <stdlib.h> | |
#include <elf.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
void readElfHeader(Elf64_Ehdr *ehdr); | |
int main(int argc, char **argv) { |
NewerOlder