Skip to content

Instantly share code, notes, and snippets.

@dvas0004
dvas0004 / aquaPi.py
Created May 11, 2014 15:18
aquaPi - python bluetooth rfcomm server for aquarium control
import os
import glob
import time
import RPi.GPIO as GPIO
from bluetooth import *
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
GPIO.setmode(GPIO.BCM)
@dvas0004
dvas0004 / aquariumDroid.java
Created May 11, 2014 15:29
aquariumDroid.java - android companion app to aquaPi.py
package me.davidvassallo.aquarium;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Set;
import java.util.UUID;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
@dvas0004
dvas0004 / golangRepetition.html
Created August 12, 2014 05:49
HTML snipped showing goland template repetition structure. Part of: https://github.com/dvas0004/learning/tree/master/golang/myown/NetSecurityCheck
<html>
<head>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container well">
<h2>Alerts</h2>
<hr>
{{range $element := .Alerts}}
@dvas0004
dvas0004 / stuctArray.go
Last active August 29, 2015 14:05
array golang snippet for http://wp.me/pYwLI-oS
/*
Start Webserver Section
*/
type Page struct {
Title string
Body string
Alerts []string
}
func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
@dvas0004
dvas0004 / searchsploit-update.sh
Created October 19, 2014 09:41
Kali Linux Searchsploit updater
echo "Updating SearchSploit... (Kali Linux)"
# move into the exploit db directory within Kali
cd /usr/share/exploitdb
echo "Downloading latest archive..."
wget http://www.exploit-db.com/archive.tar.bz2
echo "Downloaded archive, proceeding to extract..."
tar -xjvf archive.tar.bz2
@dvas0004
dvas0004 / ossec_broker_server.py
Created January 9, 2015 11:46
basic ossec broker server
import SocketServer
import subprocess
class TCPHandler(SocketServer.BaseRequestHandler):
def handle(self):
# self.request is the TCP socket connected to the client
self.data = self.request.recv(1024).strip()
# for logging purposes, write connection information to screen
print "Connection from: %s : %s" % (self.client_address[0], self.data)
@dvas0004
dvas0004 / eps_monitor.conf
Created February 3, 2015 17:34
eps_script.py sample config file
[settings]
default_interval_mins=5
default_threshold=1000
smtp_server=127.0.0.1
recipient=someone@example.com
sender=alienvault@example.com
[thresholds]
sensorname=1000
@dvas0004
dvas0004 / eps_script.py
Last active October 11, 2016 09:56
EPS Monitor Script
#!/usr/bin/python
import MySQLdb
import ConfigParser
import smtplib
import os
#get database settings
# hack to comply with Alienvault config file format:
from io import StringIO
@dvas0004
dvas0004 / nxlog_windows.conf
Last active October 7, 2016 20:43
sample nxlog configuration file for windows server (post 2003)
## This is a sample configuration file. See the nxlog reference manual about the
## configuration options. It should be installed locally and is also available
## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html
## Please set the ROOT to the folder your nxlog was installed into,
## otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
@dvas0004
dvas0004 / nxlog_linux.conf
Created April 20, 2015 12:52
sample nxlog configuration for linux
## This is a sample configuration file. See the nxlog reference manual about the
## configuration options. It should be installed locally and is also available
## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html
## Please set the ROOT to the folder your nxlog was installed into,