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 bash | |
files=`git status | grep -e "modified:.*\.py" | sed -E "s/\s*modified:\s*//"` | |
for FILE in ${files} | |
do | |
echo "Running black on" ${FILE} | |
black ${FILE} | |
done | |
# Add modified stagged files back to stagged. | |
git diff --name-only --cached | xargs -l git add |
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/python3 | |
""" | |
Update the vultr api for the my domain. | |
""" | |
import os | |
import requests | |
import syslog | |
PUBLIC_IP_ADDRESS = "https://api.ipify.org" | |
VULTR_API_UPDATE = "https://api.vultr.com/v1/dns/update_record" |
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
/* | |
* Keygen for the "KeygenMe or Not" challenge. | |
* */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdbool.h> | |
void exit_error(char * e) { | |
fprintf(stderr, "%s\n", e); |
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> | |
int str_set(char * str, const size_t n, const size_t pos, const uint8_t val) { | |
uint8_t return_value = 0; | |
asm | |
( | |
"cmp %[pos], %[n]\n\t" |
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
package main | |
import "fmt" | |
func quicksort(slice []int) ([]int) { | |
length := len(slice) | |
// The array is considered sorted if it contains only one element. | |
if length < 2 { | |
return slice |
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 re | |
import sys | |
import matplotlib.pyplot as plt | |
# src, dst | |
sources = [] | |
def find_dependencies(filename): | |
dependecies = 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
# Assuming you're running this as root in kali. | |
apt-get update | |
# Pixie-Dust required packages. | |
apt-get install build-essential | |
apt-get install libpcap-dev | |
apt-get install sqlite3 | |
apt-get install libsqlite3-dev | |
apt-get install pixiewps |
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
// Reverse shell in go | |
package main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"io" | |
"net" | |
"os" |
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/types.h> | |
#include <unistd.h> | |
#include <dirent.h> | |
#include <string.h> | |
/* | |
1. Un program care scanfile |
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
/* | |
Scrieti un program UNIX in C care realizeaza urmatoarele: | |
Sistemul este format din doua procese: parinte si fiu | |
Parintele instaleaza o alarma care il va intrerupe dupa 7 secunde; intre timp, va afisa pe ecran, in mod continuu, | |
caracterul 'A'. La primirea semnalului de alarma va anunta fiul prin semnalul SIGUSR1, dar va continua sa afiseze | |
(la infinit) caracterul 'A' | |
Fiul ignora semnalul SIG_TERM |