Skip to content

Instantly share code, notes, and snippets.

@c3ph3us
c3ph3us / imgist.sh
Created August 17, 2023 15:07 — forked from RichardBronosky/imgist.sh
Imgur was down, so I created Imgist
#! /usr/bin/env bash
set -eu
_main(){
input_file="$1"
file_path="$(realpath -s "$input_file")"
file_name="$(basename "$file_path")"
cd "$(dirname "$(realpath -s "${BASH_SOURCE[0]}")")"
cp "$file_path" ./
git add "$file_name"

Want to fork your own gists? No fork button? No problem! Install this user script by clicking refork.user.js' "raw" link down below: ⇓

@c3ph3us
c3ph3us / build.gradle
Created July 15, 2023 18:01 — forked from johnrengelman/build.gradle
Self applying Gradle plugin project
//place this content in your buildSrc/build.gradle file
//Then apply your plugin to its own build in build.gradle
import org.codehaus.groovy.control.CompilerConfiguration
apply plugin: 'groovy'
repositories {
jcenter()
}
@c3ph3us
c3ph3us / 00-getcert.md
Created May 12, 2023 13:52 — forked from AfroThundr3007730/00-getcert.md
Renews my LetsEncrypt certificates if they expire in less than 3 days.

This gist includes a certificate renewal script, which I use to renew both of my LetsEncrypt certificates, as well as the systemd unit files necessary to automate it. It's currently set to run every 12 hours, and renews the certificates if they expire in less than 3 days. The certbot tool is required in order to use this script. Note that I generated my keys and CSR manually because I needed to add specific extensions to my certificates. That process is not covered here.

Filename Description
01-getcert.sh The certificate renewal script.
02-cli.ini Example Certbot configuration.
03-getcert.timer The systemd timer unit file.
04-getcert.service The systemd service unit file.
05-openssl.conf Example openssl.conf for the CSR
06-getcert-ddns.sh DDNS version of the renewal script.
#!/bin/bash
address=https://ilo.mysite.com:34043
username=Administrator
password=********
session_key=$(
curl -fsS \
--insecure \
"$address/json/login_session" \
@c3ph3us
c3ph3us / root.sh
Created August 18, 2022 03:50 — forked from pisculichi/root.sh
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";
@c3ph3us
c3ph3us / ping.py
Created May 27, 2022 19:49 — forked from pklaus/ping.py
A pure python ping implementation using raw socket.
#!/usr/bin/env python2
"""
Other Repositories of python-ping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* https://github.com/l4m3rx/python-ping supports Python2 and Python3
* https://bitbucket.org/delroth/python-ping
@c3ph3us
c3ph3us / README.md
Created March 31, 2022 19:56 — forked from kiler129/README.md
Run iLO remote console from shell

iLO Remote Console

This small script lets you start iLO Java-based console from shell.

But why not HTML5?

  • iLO 2/3 doesn't have HTML5 console
  • Mounting local (from the client computer) ISOs is PAINFULLY slow via HTML5 client

TL;DR

If you just start it, it will ask you for everything:

@c3ph3us
c3ph3us / Bookmarks.md
Created October 18, 2021 17:34 — forked from crok/Bookmarks.md
cat [google_chrome_exported_bookmarks].html | grep "<DT><A HREF=" | sed 's%.*DT.*HREF="%%g' | sed 's%".*ICON="">% -- %g' | sed 's%".*ADD_DATE="">% -- %g' | sed 's%</A>%%g' | sed 's%http%* [http%g' | sed 's% -- %] -- %g' > bookmarks.md
@c3ph3us
c3ph3us / gist:35411782d17f8781b71a4a38faba0341
Created February 16, 2020 17:53 — forked from keenerd/gist:f92e823447264ddaa030
yyjd's cpu governor cheat sheet