Skip to content

Instantly share code, notes, and snippets.

View iamthegawd's full-sized avatar

God iamthegawd

View GitHub Profile
@iamthegawd
iamthegawd / daemon.c
Created January 30, 2018 21:31
This will daemonize the commandline and detach from the terminal (unlike nohup) so it will avoid kills from terminal related interrupts.
// daemon.c - God (proff@whitehats.net)
// - detaches from terminal and runs in background with first option 1/0 if to not chdir("/")
// and second option is 1/0 if to keep standard file handles open
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
@iamthegawd
iamthegawd / vw.sh
Last active January 30, 2018 21:42
well I just wrote this tiny code for my lab
#!/bin/bash
# vw.sh God (proff@whitehats.net)
ping 185.220.184.1 -c 1 -W 120
if [ $? = 0 ]
then
if ! pgrep -x "openvpn" > /dev/null
then
cd /etc/openvpn
Bitcoin address: 1GoD11o6PMKi63Lpyppxz8BX7LP7GRMN8C
Etherum address: 0x1b75355F74A00C58A3E2b811DBA1b3D0575aDf9c
Dogecoin address: D5hxyTqqgeEYR2wDauT6ZWb7C7W6ay6es8
Monero address: 4AMyFeXqdDrinHKF55jSpJHKyn98617RjWaRfu8cASuZd6ZDdASmfZNXs67uDdFSkxCtHrGuKs2jeLUnnyEgnNTHGGxGvXx
@iamthegawd
iamthegawd / fix_dns.sh
Created January 29, 2018 19:35
Fix DNS resolver for all interfaces from VPN and/or others software who can't be setted just from "Network Configuration" for Mac OS X and uid-root only.
#!/bin/bash
# Description: Fix DNS resolver for all interfaces with command scutil.
# Author: God <god@whitehats.net>
# WWW: whitehat.ro / whitehats.net
# Require: Mac OS X and uid-root or sudo
# Tested: Mac OS X 10.13.3
# Mar 23 Ian 2018 00:33:59 EET - first release
dns="185.220.184.184"