Skip to content

Instantly share code, notes, and snippets.

View 11philip22's full-sized avatar
👽
planet rider

Philip 11philip22

👽
planet rider
  • /dev/chaos
View GitHub Profile
@11philip22
11philip22 / Vagrantfile
Created February 4, 2021 08:28
vagrant file to make 1 ubuntu master and two slaves
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
BOX_IMAGE = "ubuntu/focal64"
NODE_COUNT = 2
Vagrant.configure("2") do |config|
config.vm.define "master" do |subconfig|
@11philip22
11philip22 / exif.py
Created January 27, 2021 13:03
read exif data from jpg
import sys
from PIL import Image
from PIL.ExifTags import TAGS
imagename = sys.argv[1]
image = Image.open(imagename)
exifdata = image.getexif()
for tag_id in exifdata:
@11philip22
11philip22 / Dockerfile
Created January 14, 2021 09:51
Docker pip multistage container
FROM python:alpine as base
FROM base as builder
RUN mkdir /install
WORKDIR /install
COPY requirements.txt /requirements.txt
RUN pip install --no-warn-script-location --prefix=/install -r /requirements.txt
FROM base
COPY --from=builder /install /usr/local
import sys
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtWebKit import *
class Render(QWebPage):
def __init__(self, url):
self.app = QApplication(sys.argv)
QWebPage.__init__(self)
self.loadFinished.connect(self._loadFinished)
section .data
whatToWrite db "Henlooo",10,0
len equ $ - whatToWrite
whatToWrite1 db "fren",10,0
len1 equ $ - whatToWrite1
section .text
global _start
""""
Python script to parse the passwords listed on https://sites.google.com/site/saynamweb/password
"""
import bs4
import requests
import sys
import itertools
response = requests.get("https://sites.google.com/site/saynamweb/password")
@11philip22
11philip22 / ding.cpp
Created December 31, 2020 16:07
c++ load rsa key from file using crypto++
template <typename Key>
const Key loadKey(const std::string& filename)
{
Key key;
CryptoPP::ByteQueue queue;
CryptoPP::FileSource file(filename.c_str(), true);
file.TransferTo(queue);
queue.MessageEnd();
key.Load(queue);
@11philip22
11philip22 / TinyProxyCloudFormation.json
Last active December 18, 2020 13:21
aws cloudformation for deploying a ec2 with tinyproxy
{
"Resources": {
"ProxyEC2": {
"Type": "AWS::EC2::Instance",
"Metadata": {
"AWS::CloudFormation::Init" : {
"configSets" : {
"full_install" : [
"setup_epel",
"install_proxy"
@11philip22
11philip22 / GetS3Content.py
Last active December 16, 2020 12:10
aws boto3 iterate trough public s3 bucket
import boto3
from botocore.handlers import disable_signing
from botocore import UNSIGNED
from botocore.client import Config
bucket_name = 'nice try fbi'
s3_client = boto3.client('s3', config=Config(signature_version=UNSIGNED))
s3_resource = boto3.resource('s3')
s3_resource.meta.client.meta.events.register('choose-signer.s3.*', disable_signing)
@11philip22
11philip22 / amplify.json
Created December 16, 2020 10:21
AWS cloudformation example for Amplify
{
"Parameters": {
"AccessTokenParameter": {
"Type": "String",
"Description": "Personal access token for github"
}
},
"Resources": {
"Mysite": {