Skip to content

Instantly share code, notes, and snippets.

View happyhater's full-sized avatar
🏠
Working from home

ZmEu happyhater

🏠
Working from home
View GitHub Profile
#!/bin/bash
if [ "x$(id -u)" != "x0" ];
then
echo "Error, can only be executed by root"
#exit 1
fi
# SOFTWARE="opensmtpd opensmtpd-extras dovecot-imapd spamassassin spampd dkimproxy"
SOFTWARE="opensmtpd opensmtpd-extras dovecot-imapd dkimproxy"
apt -y install clang libc6-dev-i386
cat <<'END' > xdp-drop-ebpf.c
#include <linux/bpf.h>
#include <linux/if_ether.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/udp.h>
---
config:
ouras: 51999
router:
rtr1:
model: vyatta
upstream:
64515:
name: VULTR
community: 1001
@happyhater
happyhater / irccloud-keepalive.sh
Created December 25, 2018 19:00
keepalive IRCCloud - Trial Account
#!/bin/bash
## zmeu (zmeu@whitehat.ro) Tue Dec 25 12:49:04 CST 2018
## keepalive IRCCloud - Trial Account
AGENT="IRCCloud/4.5 (iPhone; en; iPhone OS 12.1.2)"
URL="https://www.irccloud.com/chat"
USER="YOUR-ACCOUNT-NAME"
PASS="YOUR-PASSWORD"
TOKENIZE=$(curl -s -A $AGENT -X POST "$URL/auth-formtoken" --header "content-length: 0"|cut -d"\"" -f8)
SESSION=$(curl -s -A $AGENT -d email=$USER -d password=$PASS -d token=$TOKENIZE --header "content-type: application/x-www-form-urlencoded" --header "x-auth-formtoken: $TOKENIZE" "$URL/login"|cut -d"\"" -f8)
@happyhater
happyhater / bl.pl
Last active November 2, 2018 20:39
This script will automatically detect people listed on DNSBL and ban them.
#!/usr/bin/perl
use strict;
use Irssi;
use Net::DNS;
use vars qw($VERSION %IRSSI);
$VERSION = "0.0.1";
%IRSSI = (
authors => "zmeu",
contact => "zmeu\@whitehat.ro",
@happyhater
happyhater / dns.sh
Created January 27, 2018 18:29
Fix resolver from VPN and others software for Mac OS X and uid-root only.
#!/bin/bash
# --------------------------------
# Description: scutil - fix resolver from VPN clients (Mac OS X and uid-root/sudo)
# Author: God <god@whitehats.net>
# WWW: whitehat.ro / whitehats.net
# --------------------------------
# Mar 23 Ian 2018 00:33:59 EET - first release
dns="185.220.184.184"
@happyhater
happyhater / bitcoin.tcl
Last active January 11, 2018 18:53
Afisarea pretului curent al monede Bitcoin in format TCL pentru Eggdrop.
##
# ZmEu - Bitcoin Currency Price TCL.
#
# 11.01.2018 - first release. (not tested)
#
# USE AT YOUR OWN RISK!
#
##
package require Tcl 8.5