Skip to content

Instantly share code, notes, and snippets.

View ChuckWoodraska's full-sized avatar

Chuck Woodraska ChuckWoodraska

View GitHub Profile
@ChuckWoodraska
ChuckWoodraska / robotweetweather.py
Last active August 29, 2015 14:25
Tweet weather
import time
import pywapi
import string
import tweepy
from myconfig import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_SECRET, ZIPCODE
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET)
api = tweepy.API(auth)
@ChuckWoodraska
ChuckWoodraska / dash_runner.py
Last active June 4, 2022 11:28
Used to sniff traffic for Amazon dash button and play a song through my chromecast.
import time
import sys
import logging
import pychromecast
from scapy.all import *
mac_address = '00:00:00:00:00:00'
def arp_display(pkt):
if pkt[ARP].op == 1:
if pkt[ARP].hwsrc == mac_address:
@ChuckWoodraska
ChuckWoodraska / ldap_test.py
Last active July 13, 2017 13:38
LDAP authentication test with Python 3.
import ldap3 as ldap
SERVER_NAME = 'ldap.example.com'
DN = 'EXAMPLEDOMAIN'
USERNAME = 'user'
PASSWORD = 'password'
server = ldap.Server(SERVER_NAME)
connection = ldap.Connection(server, user='{}\\{}'.format(DN, USERNAME), password=PASSWORD)
connection.open()
class HelloWorld():
def print_hello(self):
print('hello')