Skip to content

Instantly share code, notes, and snippets.

View cooperq's full-sized avatar

Cooper Quintin cooperq

View GitHub Profile
@cooperq
cooperq / get_apk_hashes.sh
Created May 20, 2024 21:02
Get shasums for all android apk files (for scanning in virustotal or whatever)
PKGNAMES=`adb shell "pm list packages | cut -d ':' -f 2"`
for pkg in $PKGNAMES; do
export PTH=`adb shell "pm path $pkg | cut -d ':' -f 2;"`
for pth in $PTH; do
adb shell "sha256sum $pth"
done
done
go get github.com/cooperq/yaya
cd $GOPATH/src/github.com/cooperq/yaya
go build
<div id="twitterTest">
<a href="http://twitter.com/share"
class="twitter-share-button" data-count="none">Tweet</a>
<script src="http://platform.twitter.com/widgets.js"></script>
</div>
# openssl s_client -showcerts -servername espionageapp.com -connect espionageapp.com:443
CONNECTED(00000003)
depth=1 C = IL, O = StartCom Ltd., OU = Secure Digital Certificate Signing, CN = StartCom Class 1 Primary Intermediate Server CA
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
0 s:/C=US/CN=www.espionageapp.com/emailAddress=postmaster@espionageapp.com
i:/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Class 1 Primary Intermediate Server CA
>>> import requests
>>> requests.get("https://www.espionageapp.com/")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request
resp = self.send(prep, **send_kwargs)

Keybase proof

I hereby claim:

  • I am cooperq on github.
  • I am cooperq (https://keybase.io/cooperq) on keybase.
  • I have a public key whose fingerprint is 75FB 9347 FA4B 22A0 5068 080B D0EA 7B6F F0AF E2CA

To claim this, I am signing this object:

@cooperq
cooperq / gist:0919e79734f15789094c
Created December 5, 2014 20:59
Failing firefox test
exports["test Policy hasWhitelistedScheme"] = function(assert) {
assert.ok(true);
};
require("sdk/test").run(exports);
@cooperq
cooperq / gist:8443635
Created January 15, 2014 20:13
malloc malloc malloc malloc all day long malloc malloc malloc this is the malloc song!
#include <stdlib.h>
#include <stdio.h>
void main(){
printf("Allocating all the memory...\n");
while(1){
int *buffer = malloc(1024);
if(buffer == NULL){
printf("could not allocate any more memory\n");
}
@cooperq
cooperq / server.js
Created November 11, 2012 23:31
simple node redirect app
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(302, {'Location': 'https://ethersheet.org'});
res.end();
}).listen(8000);
console.log('Server running at http://0.0.0.0:8000/');
import socket
HOST = '' # Symbolic name meaning all available interfaces
PORT = 50008 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
old_port = 1
while 1:
conn, addr = s.accept()