Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan ryepdx

View GitHub Profile
@ryepdx
ryepdx / infection_exposed_and_explained.php
Last active Feb 21, 2016
After de-obfuscating and commenting the botnet slave code I found in a client's codebase, this is what I ended up with. http://ryepdx.com/2013/02/deobfuscating-a-botnet-infection/
View infection_exposed_and_explained.php
<?php
// "!defined('determinator') == "include_once" for sneaky people.
if (!defined("determinator")){
function determinator_feof($file_pointer, &$now = NULL) {
// Assigning a value to $now in this function changes
// the value of whatever variable the calling function
// passed in. Functions with side effects... huzzah!
$now = microtime(true);
// Have we reached the end of the file?
@ryepdx
ryepdx / mine.js
Created Feb 28, 2016
A script to make geth mine at a slower rate. Useful for development on private chains.
View mine.js
// Adapted from Iuri Matias' Embark framework
// https://github.com/iurimatias/embark-framework
// Modified by ryepdx to mine at regular intervals.
(function() {
var main = function () {
if (!loadScript("config.js")) {
console.log("== config.js not found");
}
if (typeof(config) === "undefined") {
@ryepdx
ryepdx / config.js
Created Feb 28, 2016
An optional configuration file to go with mine.js
View config.js
config = {
interval_ms: 15000,
mine_pending_txns: true,
mine_periodically: true,
mine_normally: false
};
View cryptofresh_scraper.js
'use strict'
var scrap = require('scrap')
scrap('http://cryptofresh.com/u/maker-fund', function (err, $) {
if (err) {
console.error(err)
return
}
$('#body div.col-sm-8 span.action').each(function (i, row) {
@ryepdx
ryepdx / mine.js
Last active Feb 10, 2018
Turn the Ethereum miner on and off intelligently to save your CPU when mining on a private chain.
View mine.js
// Adapted from Iuri Matias' Embark framework
// https://github.com/iurimatias/embark-framework
// Modified by ryepdx to mine at regular intervals.
(function() {
var main = function () {
if (!loadScript("config.js")) {
console.log("== config.js not found");
}
if (typeof(config) === "undefined") {
You can’t perform that action at this time.