Skip to content

Instantly share code, notes, and snippets.

View maxux's full-sized avatar
🔑

Maxime Daniel maxux

🔑
View GitHub Profile
#!/bin/bash
# id=0
# set hostname if provided
[[ ! -z $1 ]] && hostname "$1"
# rtinfo vm
if [ ! -e /tmp/rtinfo-client-static-x64 ]; then
echo "[+] starting monitoring"
wget https://arya.maxux.net/build/rtinfo/rtinfo-client-static-x64 -O /tmp/rtinfo-client-static-x64
#include <stdio.h>
#include "tests.h"
//
// type definition
//
#define __executor(name) name
#define __constructor(name) __construct_##name
// macro definition:
#!/bin/bash
die() {
echo "$1" > /dev/stderr
exit 1
}
# Checking rgument set
[[ -z $1 ]] && die "Missing disk argument"
# Checking if argument is a block device
docker run -ti --name spotify --hostname spotify
--privileged
-v /tmp/.X11-unix/:/tmp/.X11-unix
-v /tmp/.docker.xauth:/tmp/.docker.xauth
-e XAUTHORITY=/tmp/.docker.xauth
-e DISPLAY
-e PULSE_SERVER=172.17.0.1
maxux/spotify
spotify
#!/bin/bash
appid="VCCHE5T2qXXXXXXXXXXXXXx"
secret="_ZxN_n2CaQaAXXXXXXXXXXXXx"
archive="/tmp/bash-debug.tar.gz"
baseurl="https://itsyou.online/v1/oauth/access_token?grant_type=client_credentials"
echo "[+] generating token"
token=$(curl -s -X POST "${baseurl}&client_id=${appid}&client_secret=${secret}&response_type=id_token")
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
#include <stdint.h>
#include <stdlib.h>
#include <x86intrin.h>
// compile using: gcc -msse4.2 -O2 crc32-benchmark.c -o crc32-benchmark
typedef struct stats_t {
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <fcntl.h>
void benchmark(size_t size, char *filename) {
int fd;
class PythonIndex:
def __init__(self):
self.indexes = {
'guid': {},
'name': {},
'template_uid': {},
'template_host': {},
'template_account': {},
'template_repo': {},
'template_name': {},
from zeroos.core0.client import Client
def execute(cn, cmd):
print('+ %s' % cmd)
print(cn.bash(cmd).get())
target = '192.168.193.18'
cl = Client(target, timeout=18000)
@maxux
maxux / hash-bench.c
Last active December 21, 2017 10:57
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <openssl/sha.h>
char *sha256_hex(unsigned char *hash) {
char *buffer = calloc((SHA256_DIGEST_LENGTH * 2) + 1, sizeof(char));
for(int i = 0; i < SHA256_DIGEST_LENGTH; i++)