Skip to content

Instantly share code, notes, and snippets.

View cstrouse's full-sized avatar
💭
Bug Bounty

Casey Strouse cstrouse

💭
Bug Bounty
View GitHub Profile
@cstrouse
cstrouse / readme.sh
Created March 7, 2021 12:43
AT Commands to add LTE band locking appropriate for T-Mobile to the Netgear Nighthawk M1 (MR1100) router
at!band=?
at!band=03,"LTE B2 (1900 MHz PCS)" ,0, 2
at!band=04,"LTE B4 (1700/2100 MHz AWS)" ,0, 8
at!band=05,"LTE B12 (700 MHz AWS)" ,0, 800
at!band=06,"LTE B66 (AWS-3)" ,0, 0, 2
at!band=07,"LTE CA (B2+B4)" ,0, a
at!band=08,"LTE CA (B2+B4+B12)" ,0, 80a
at!band=?
at!reset
@cstrouse
cstrouse / malware.sh
Created November 26, 2020 05:28
Useful commands for finding PHP malware
find . -type f -name "*.ico" -print0 | xargs -0 file | grep PHP
@cstrouse
cstrouse / wp-config.php
Created November 2, 2020 17:06
Add the following to wp-config.php to fix wp-cli warnings related to SSL and proxies on AWS (PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO in phar:///opt/bitnami/apps/wordpress/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 114)
define( 'FORCE_SSL_ADMIN', true );
define( 'FORCE_SSL_LOGIN', true);
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){ $_SERVER['HTTPS']='on'; }
@cstrouse
cstrouse / functions.php
Created August 23, 2020 17:22
Exclude the current post on an archive page (useful especially when using the repeater with Oxygen)
function cst_exclude_current_post_from_archive( $query ) {
if ( ! is_admin() ) {
$query->set('post__not_in', array( get_the_ID() ) );
}
}
add_action( 'pre_get_posts', 'cst_exclude_current_post_from_archive' );
@cstrouse
cstrouse / instructions.md
Last active July 31, 2022 22:47
Disable CFG Lock on Dell PowerEdge T30 (Board: 07T4MC)
  • CFG Lock offset is 0xAF
  • Above 4GB MMIO BIOS Assignment offset is 0x355
BIOS Version Offset
1.0.1 0xAF
1.0.12 0xAF
1.0.14 0xAF
1.0.15 0xAF
1.1.0 0xAF
@cstrouse
cstrouse / setup.txt
Created July 15, 2020 08:21
Disable CFG Lock on Dell PowerEdge T30 (Board: 07T4MC) running version 1.3.1 of the BIOS
This file has been truncated, but you can view the full file.
UEFI Protocol Detected
--------------------------------------------------------------------------------
String Packages
--------------------------------------------------------------------------------
Offset: Language:
--------------------------------------------------------------------------------
0x4DD3D en-US (0x0)
@cstrouse
cstrouse / snippet.js
Created June 27, 2020 06:38
Use this code snippet to calculate how much you've made over the lifetime of your Upwork account.
// https://www.upwork.com/ab/payments/reports/relationship-values
Applet.getVar('reportData').relationships.reduce((accum,item) => accum + item.totalValue, 0)
@cstrouse
cstrouse / Dockerfile
Last active April 11, 2020 21:02 — forked from rosstimson/Dockerfile
Easily get ffmpeg on Fedora with support for all the things. Updated to reflect VLC's move to Gitlab for their repository hosting.
# Dockerfile for ffmpeg with pretty much support for everything as per:
# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
# includes codecs with weird licensing like MP3 and AAC.
#
FROM fedora
MAINTAINER Ross Timson <ross@rosstimson.com>
# Install build requirements.
RUN dnf install -y autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
@cstrouse
cstrouse / gen_qr.py
Last active February 4, 2020 12:19
This was a quick and dirty example used for an Upwork proposal requesting generating a QR code and using it to create a composite image.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from io import BytesIO
import cairosvg
import pyqrcode
from PIL import Image
url = pyqrcode.create('https://github.com/cstrouse/')