Skip to content

Instantly share code, notes, and snippets.

View cmbaughman's full-sized avatar
🧐
I may be slow to respond.

Chris Baughman cmbaughman

🧐
I may be slow to respond.
View GitHub Profile
@cmbaughman
cmbaughman / OpenRelays.md
Created August 28, 2015 21:25
Taking Advantage of Open Relays

#Taking advantage of open relays

##Introduction

An open relay is a mail server that allows anyone to send email through it. Unfortunately this used to be the default and in some cases still is, but it has become a tool in most spammers arsenals, to send unsolicited email to anyone and sometimes from anyone. This is no longer the default configuration in many cases, however sometimes you'll find that sys admins either from lazyness or just not thinking of security when configuring a server, create open relays all the time.

##Testing procedure

To test for an open relay, one can either use one of the many excellent tools, such as (http://www.aupads.org/test-relay.html), it's quite simple to check for. But how does one actually do this manually? If you know how, you'll understand better the problem and how applications we use everyday work.

@cmbaughman
cmbaughman / remove_pattern_lock.sh
Created February 4, 2014 02:03
How to break into an Android phone that uses pattern lock...
#!/bin/bash
adb shell
cp /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock'
update system set value=0 where name='lockscreen.lockedoutpermanently'
#It's good to include this part too.
adb shell rm -f /data/system/gesture.key
@cmbaughman
cmbaughman / setup-gnomedev-tools.sh
Created February 4, 2014 15:49
Automatically set up GNOME development environment (C, C++, Python, and JavaScript), all optional libs, and documentation.
#!/bin/bash
BH=$(which bash)
echo "Currently using " + $BH
echo " "
echo "update apt repos..."
echo " "
sudo apt-get update
@cmbaughman
cmbaughman / get-wifi-hotspot.md
Created February 5, 2014 18:47
Turn your Linux Machine into a WiFi Hotspot!

Turn Ubuntu based distros into a better WiFi hotspot


Use the following instructions to set up, configure, and run a WiFi hotspot from your computer. Note: The strength will increase with more connections.

  1. Add the following ppa: sudo add-apt-repository ppa:nilarimogard/webupd8
  2. Run: sudo apt-get update && sudo apt-get install ap-hotspot

After install, ap-hotspot must be configured, however first if using any sort of firewall, unblock the following apps:

var crypto = require('crypto');
function encrypt(text){
var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq');
var crypted = cipher.update(text,'utf8','hex');
crypted += cipher.final('hex');
return crypted;
}
function decrypt(text){
var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq');
var dec = decipher.update(text,'hex','utf8');
[QUOTE=llrraa2010;47347928]1. mkdir hello
USER-NAME@MACHINE-NAME:~/Android$ cd kernel/common/drivers
USER-NAME@MACHINE-NAME:~/Android/kernel/common/drivers$ mkdir hello
2. hello.h
#ifndef _HELLO_ANDROID_H_
#define _HELLO_ANDROID_H_
#include

Key commands available when a group is selected

[ - Expand the currently selected group, and all its subgroups

] - Collapse the currently selected group, and all its subgroups

Enter - Expand or collapse the currently selected group.

Key commands available when a package is selected
@cmbaughman
cmbaughman / rails_resources.md
Created April 4, 2014 17:02 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@cmbaughman
cmbaughman / Vagrantfile
Created April 6, 2014 23:55
Preliminary Vagrant Notes
Vagrant::Config.run do |config|
config.vm. box = "precise64"
config.vm.box_url = "http://hashicorp-files.vagrantup.com/precise64.box"
config.vm.share_folder "v-root", "/anydir", "."
config.vm.forward_port 80, 8080
config.vm.provision "shell", path: "provision.sh"
#or chef config.vm.provision "chef_solo", run_list: ["candoris_chef"]
end
@cmbaughman
cmbaughman / vagrant_docker.md
Created June 4, 2014 13:29
How to set up Vagrant to use the Docker Provisioner

How to set up Vagrant do build/configure Dockers

  1. Put the dockerfile that you want to use in a directory next to your vagrantfile.

  2. In the vagrantfile put the following:

config.vm.provision "docker" do |d|
 d.build_image "/vagrant", args: "-t my-name/my-new-image"