Skip to content

Instantly share code, notes, and snippets.

View ryancdotorg's full-sized avatar

Ryan Castellucci ryancdotorg

View GitHub Profile
anonymous
anonymous / pctf2014 rsa450
Created April 13, 2014 21:08
get modulus with
openssl rsa -noout -modulus -pubin -in public.pub
======== maskpriv.py ======
#!/usr/bin/env python
import re
import sys
import gmpy
from math import floor, ceil
@Yawning
Yawning / elligator2.h
Last active March 20, 2020 07:38
(DEPRECATED) A mostly drop in elligator2 for ed25519-donna.
There used to be something that resembled an Elligator2 implementation here ported from agl's
Go code. The implementation is unmaintained and has severe issues (as pointed out in a comment),
and should not be used for anything.
@FelixWeis
FelixWeis / scriptPubKey-templates-0-400000.json
Created March 5, 2016 07:11
Bitcoin output script types by frequency (P2PK, P2PKH, MULTISIG, P2SH, OP_RETURN, ...)
{
"OP_DUP OP_HASH160 20 OP_EQUALVERIFY OP_CHECKSIG": 319721182,
"OP_HASH160 20 OP_EQUAL": 10083919,
"65 OP_CHECKSIG": 887766,
"OP_RETURN": 288521,
"OP_1 33 33 33 OP_3 OP_CHECKMULTISIG": 224438,
"": 219175,
"OP_1 33 33 OP_2 OP_CHECKMULTISIG": 206415,
"33 OP_CHECKSIG": 101306,
"OP_RETURN 40": 65287,
@epixoip
epixoip / sshd_config.diff
Created April 10, 2021 06:00
ssh pubkey auth only with libpam
--- /etc/ssh/sshd_config.orig 2021-04-10 05:50:44.673514864 +0000
+++ /etc/ssh/sshd_config 2021-04-10 05:59:56.316912290 +0000
@@ -31,7 +31,7 @@
# Authentication:
#LoginGraceTime 2m
-#PermitRootLogin prohibit-password
+PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
@ThirteenFish
ThirteenFish / codec.c
Created November 17, 2015 11:01
Fun with C11 _Generic()
#include <stdio.h>
#include <string.h>
typedef struct {int v;} volume;
typedef struct {int s;} onoff;
struct settings {
int a;
char * b;
volume v;
@5310
5310 / .XCompose
Last active October 3, 2022 18:38
[Defunct] My sequences for use with the Compose key. Based off of kragen/xcompose and then overridden. Now part of Bash-It dotfiles repo. #dotfile
# ~/.XCompose
### Based on the en_US.UTF locale. ###
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
### Populated with Kragen's additions. ###
@jayeye
jayeye / README.md
Created October 3, 2016 21:45
Setting up ISC dhclient on debian / ubuntu for prefix delegation

My ISP (Time Warner Cable) hands out IPv6 addresses with DHCPv6; it will delegate a /56 if asked. So long as I keep refreshing the lease, it won't renumber me. I have my cable modem set to bridge, and do all the firewalling, NATing, etc., on a Debian box. In what follows, eth0 is the internal interface.

The dhclient that ships with debian/ubuntu does not support asking for a prefix delegation, so I had to build one from sources.

@renaudcerrato
renaudcerrato / 402-ath_regd_optional.patch
Last active February 28, 2023 15:03
Atheros driver patch to disable EEPROM regulatory restrictions enforcing.
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -341,6 +341,10 @@ ath_reg_apply_beaconing_flags(struct wip
struct ieee80211_channel *ch;
unsigned int i;
+#ifdef CONFIG_ATH_USER_REGD
+ return;
+#endif
+
@BigNerd95
BigNerd95 / regd_diff.c
Last active March 1, 2023 09:05
Atheros Country Code ART bypass passing a custom Country Name when loading the driver (e.g.: insmod ath cn=AU)
char *user_country_name = ""; // [MOD]
module_param_named(cn, user_country_name, charp, S_IRUGO); // [MOD]
MODULE_PARM_DESC(cn, "Country Name"); // [MOD]
static int __ath_regd_init(struct ath_regulatory *reg)
{
struct country_code_to_enum_rd *country = NULL;
u16 regdmn;
if (!reg)
@darconeous
darconeous / engenius-eap600-enable-ssh.md
Last active March 24, 2023 20:02
Enabling SSH on Engenius EAP600

Enabling SSH on Engenius EAP600 (and maybe other models)

This tutorial will walk you through the steps needed to get root SSH access on an Engenius EAP600 dual-band WiFi access point. SSH doesn't come enabled out of the box on these things, so if you want to SSH into the device (which is running an old version of OpenWRT), keep reading.