Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
# Define ULID_DECODE and ULID_ENCODE which convert a ulid string to a binary and vice versa. | |
delimiter // | |
DROP FUNCTION IF EXISTS ULID_DECODE// | |
CREATE FUNCTION ULID_DECODE (s CHAR(26)) RETURNS BINARY(16) DETERMINISTIC | |
BEGIN | |
DECLARE s_base32 CHAR(26); | |
SET s_base32 = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(UPPER(s), 'J', 'I'), 'K', 'J'), 'M', 'K'), 'N', 'L'), 'P', 'M'), 'Q', 'N'), 'R', 'O'), 'S', 'P'), 'T', 'Q'), 'V', 'R'), 'W', 'S'), 'X', 'T'), 'Y', 'U'), 'Z', 'V'); | |
RETURN UNHEX(CONCAT(LPAD(CONV(SUBSTRING(s_base32, 1, 2), 32, 16), 2, '0'), LPAD(CONV(SUBSTRING(s_base32, 3, 12), 32, 16), 15, '0'), LPAD(CONV(SUBSTRING(s_base32, 15, 12), 32, 16), 15, '0'))); | |
END// |
<?php // tested with PHP 8.0.11 | |
$start = microtime(true); | |
const LOGIN_KEY_LEN = 20; | |
const MY_LOGIN_HEADER_LEN = 24; | |
const MAX_CIPHER_STORE_LEN = 4; | |
$raw = file_get_contents(__DIR__ . '/mylogin.cnf'); | |
$fp = 4; // skip null bytes |
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion |
# https://github.com/alexavlonitis | |
# to use this script run perl cisco_backup.pl "cisco enable password" # | |
use Net::SSH2; | |
use Net::Telnet::Cisco; | |
use warnings; | |
use strict; | |
my $user = "username"; #username of your switches | |
my $password = $ARGV[0]; #argument for the password |
var fs = require('fs') | |
, net = require('net') | |
, http = require('http') | |
, port = process.env.PORT; | |
var app = function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}; |
#!/usr/bin/perl -w | |
use strict; | |
use Data::Dumper; | |
use YAML; | |
use FindBin qw/$Bin/; | |
use Net::Telnet::Cisco; | |
++$|; | |
umask 012; | |
$0 =~ s{.*/}{}; |