Skip to content

Instantly share code, notes, and snippets.

View b-meson's full-sized avatar

Freddy Martinez b-meson

  • Chicago
View GitHub Profile
### Keybase proof
I hereby claim:
* I am b-meson on github.
* I am bmeson (https://keybase.io/bmeson) on keybase.
* I have a public key ASD8a_HcoY7IspIICtz3xlBOaowmT8TYrru7iLwmi-o8ago
To claim this, I am signing this object:
@b-meson
b-meson / gist:30124ff8939f3242ff1999890781716a
Last active June 7, 2018 22:48
Generic SecureDrop testing plan
# Basic Server Testing
- [] I can access both the source and journalist interfaces after upgrade and it is upgraded to 0.5.1-rcN (where N is the number of the release candidate)
- [] I can SSH into both machines over Tor
- [] AppArmor is loaded on app and mon
- [] Both servers are running grsec kernels
- [] iptables rules loaded
- [] OSSEC emails begin to flow after install
- [] OSSEC emails are decrypted to correct key and I am able to decrypt them
# Command Line User Generation
<interfaces>
<wan>
<enable></enable>
<if>igb0</if>
<ipaddr>dhcp</ipaddr>
<ipaddrv6>dhcp6</ipaddrv6>
<gateway></gateway>
<blockpriv>on</blockpriv>
<blockbogons>on</blockbogons>
@b-meson
b-meson / sanitycheck2.xml
Created September 11, 2017 21:52
sanitycheck2_pfsense
<interfaces>
<wan>
<enable></enable>
<if>igb0</if>
<ipaddr>dhcp</ipaddr>
<ipaddrv6>dhcp6</ipaddrv6>
<gateway></gateway>
<blockpriv>on</blockpriv>
<blockbogons>on</blockbogons>
<interfaces>
<wan>
<enable/></enable>
<if>igb0</if>
<ipaddr>dhcp</ipaddr>
<ipaddrv6>dhcp6</ipaddrv6>
<gateway/></gateway>
<blockpriv>on</blockpriv>
<blockbogons>on</blockbogons>
@b-meson
b-meson / mr_requests.py
Created August 3, 2017 05:22
MuckRock basic API request
import json
import requests
from datetime import datetime
import dateutil.relativedelta
import os
mr_username = ''
mr_pass = ''
api_url = 'https://www.muckrock.com/api_v1/'
@b-meson
b-meson / esconfig.py
Created July 13, 2017 14:42
push ES Config's JSON to ES using requests
# Access Keys from ~/.aws/credentials
aws_access_key_id = 'SOMEKEY'
aws_secret_access_key = 'SECRETKEYVALUE'
aws_session_token = 'ANOTHER KEY FROM STS'
import requests
import requests_aws4auth
from requests_aws4auth import AWS4Auth
auth = AWS4Auth(aws_access_key_id,aws_secret_access_key,'region', 'es', session_token=aws_session_token)
endpoint = "https://clouddomain.region.es.amazonaws.com/_template/template_1"
@b-meson
b-meson / scraper.py
Created November 21, 2016 18:00
OpenOversight II scraper
### SAMPLE JSON FROM THE II SCRAPER USING THIS URL http://staging.cpdp.co/api/v1/suggestion/?text=Loga
###
### {u'NEIGHBORHOODS': [{u'text': u'Logan Square', u'score': 1.0, u'payload': {u'url': u'not implemented',
### u'result_text': u'Logan Square'}}], u'OFFICER': [{u'text': u'Alexus Logan', u'score': 1.0, u'payload':
### {u'url': u'https://cpdb.co/officer/alexus-logan/4264', u'result_text': u'Alexus Logan', u'result_extra_information':
### u'Badge 6585'}}, {u'text': u'Logan Westcott', u'score': 1.0, u'payload': {u'url': u'
### https://cpdb.co/officer/logan-westcott/7989', u'result_text': u'Logan Westcott', u'result_extra_information': u'
### Badge 13487'}}, {u'text': u'Michael Logan', u'score': 1.0, u'payload': {u'url': u'
### https://cpdb.co/officer/michael-logan/21496', u'result_text': u'Michael Logan', u'result_extra_information': u''}},
### {u'text': u'Nekeeta Logan', u'score': 1.0, u'payload': {u'url': u'https://cpdb.co/officer/nekeeta-logan/4265', u'
cat scraper.rb
require 'video_info'
VideoInfo.provider_api_keys = { vimeo: 'a4268064c180defed88340bec4dc6212' }
video=VideoInfo.new("https://vimeo.com/165083121")
print video.video_id, "\n"
print video.title, "\n"
b_meson [3:22 PM]
I'm basically splitting the documents here: https://github.com/freddymartinez9/miscfoiamirror/tree/master/1505depositsanalysis and then doing a manual OCR on each document to get a text file out of them and then doing a side by side of the pdf and the text file to get an average expenditure
(yes they say deposits but its really an outgoing expense)
so there is a python program here checkreduction.py that has these two lines
```foia_response = '1505deposists1.49.pdf'
png_response = '1505deposists1.49.png'
````
where it reads those two files in and spits out a text file that is just the expenses which we have to compared side by side by to the PDF.