Skip to content

Instantly share code, notes, and snippets.

View 0x15f's full-sized avatar
:shipit:
Shipping shit

Jake Casto 0x15f

:shipit:
Shipping shit
View GitHub Profile
@0x15f
0x15f / MyPlay.txt
Last active March 23, 2019 15:40
No idea when or why I wrote this
SETTING: 2 dogs walking together in a park
ACTORS: Dog1, Dog2
SCENE ONE:
Dog1: (TALKING TO DOG2) "What do you think of cats?"
Dog2: (RESPONDING TO DOG1) "Cats are horrible creatues! Hissing and clawing!"

Keybase proof

I hereby claim:

  • I am 0x15f on github.
  • I am 0x15f (https://keybase.io/0x15f) on keybase.
  • I have a public key whose fingerprint is C966 C9AA 8F59 21D7 D8A2 0B67 A58F F86E 6362 6DE0

To claim this, I am signing this object:

<?php
$ip = 'ice.cosmicpe.me';
$port = 19132;
$socket = @fsockopen("udp://" . $ip, $port, $errno, $errstr, 5);
socket_set_timeout($socket, 5);
socket_set_blocking($socket, true);
@fwrite($socket, "\xFE\xFD\x09\x10\x20\x30\x40\xFF\xFF\xFF\x01");
<?php
class UDPProxy extends \Threaded {
// private static $ENCRYPT_KEY = 'jsd8hv8QWCH';
/**@var stream*/
public $socket;
/**@var stream*/
public $sql;
#!/bin/bash
PREFIX=$@
if [ -z $PREFIX ]; then
PREFIX="/usr/local"
fi
# Ensure you have write permissions to PREFIX
sudo mkdir $PREFIX
sudo chown -R `whoami` $PREFIX
sudo apt-get update && sudo apt-get dist-upgrade -y
sudo apt-get install -y screen
sudo apt-get install -y npm
sudo apt-get install -y libpangocairo-1.0
sudo apt-get install -y libx11-xcb1
sudo apt-get install -y libxcomposite-dev
sudo apt-get install -y libxcursor1
sudo apt-get install -y libxdamage1
sudo apt-get install -y libxi6 libgconf-2-4
sudo apt-get install -y libxtst6
#!/bin/bash
# Requirements: curl, sudo, tar, building tools
[ -z "${PREFIX}" ] && PREFIX=/usr/local
[ -w "${PREFIX}" ] || SUDO=sudo
set -e
mkdir -p work
#!/bin/bash
mkdir -p work
cd work
curl -fsSL https://downloads.php.net/~pollita/php-7.2.3.tar.xz | tar -xJf - --strip-components=1
./configure \
--disable-cgi \
--enable-mbstring \
@0x15f
0x15f / AES-256 encryption and decryption in PHP and C#.md
Created March 21, 2018 02:07
AES-256 encryption and decryption in PHP and C#

AES-256 encryption and decryption in PHP and C#

Update: There is a more secure version available. Details

PHP

<?php

$plaintext = 'My secret message 1234';
@0x15f
0x15f / handle_csv.php
Last active April 11, 2018 13:22
Simple PHP Script allows you to handle uploaded CSV files w/ empty columns/headers
<?php
$file = file($_FILES['file-name']['tmp_name']);
$csv_rows = array_map('str_getcsv', file($_FILES['customer-csv']['tmp_name']));
$csv_header = array_filter(array_shift($csv_rows));
$merged = [];
foreach($csv_rows as $row) {
$row = array_filter($row);
while(count($row) !== count($csv_header)) {
if(count($row) > count($csv_header)) {