🏳️⚧️
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
#!/bin/bash | |
docker start gdb-docker | |
docker exec --privileged -it gdb-docker /usr/bin/gdb $1 |
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 argparse | |
import base64 | |
from bs4 import BeautifulSoup | |
from http import cookies | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import json | |
import requests | |
import os | |
import socketserver | |
from urllib.parse import unquote |
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
# To run, execute Rscript linearprogramming.R | |
# based on https://rpubs.com/abhaypadda/linear-optimization-example | |
library(lpSolve) | |
# Objective | |
objective.in <- c(0.06, 0.08) | |
# Constraint matrix with 3 rows | |
const.mat <- matrix(c(8, 6, 1, 2, 1, 2), nrow=3, byrow=TRUE) |
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
var confirm1; | |
confirm1 = confirm("Are you ready to play?"); | |
if(confirm1===true){ | |
var age = prompt("how old are you?"); | |
if (age < 18){ | |
console.log("you are not old enough to play"); | |
} | |
else{ | |
console.log("You may start your quest!"); | |
} |
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
package main | |
import ( | |
"fmt" | |
) | |
type Node struct { | |
Data int | |
Next_node *Node | |
} |
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 <unistd.h> | |
#include <stdlib.h> | |
#include <netinet/in.h> | |
void main() { | |
int sock = socket(AF_INET, SOCK_STREAM, 0); | |
struct sockaddr_in addr; | |
addr.sin_family = AF_INET; | |
addr.sin_addr.s_addr = INADDR_ANY; |
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 <stdio.h> | |
#include <string.h> | |
int main(int argc, char *argv[]) { | |
char *test = argv[1]; | |
int tt = (int)strlen(test); | |
printf("%d", tt); | |
return 0; | |
} |
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
// To compile: gcc -fno-stack-protector -o boverflow_gets boverflow_gets.c | |
// To run (test): python -c "print 'a'*<some number>" | ./boverflow_gets | |
#include <stdio.h> | |
#include <string.h> | |
int main() { | |
char buffer[16]; | |
gets(buffer); | |
printf("%s", buffer); | |
return 0; |
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
// to compile: gcc -fno-stack-protector -o boverflow_strcpy boverflow_strcpy.c | |
// to run (test): ./boverflow_strcpy $(python -c "print 'a'*15") | |
#include <stdio.h> | |
#include <strings.h> | |
void foo(char *bar){ | |
char buffer[16]; | |
strcpy(buffer, bar); | |
printf("%s", buffer); | |
} |