Skip to content

Instantly share code, notes, and snippets.

View tbhaxor's full-sized avatar
👨‍🚀
Exploring nature beyond Kármán line

Gurkirat Singh tbhaxor

👨‍🚀
Exploring nature beyond Kármán line
View GitHub Profile
@tbhaxor
tbhaxor / fourier.html
Created October 30, 2019 17:54
fourier transformation
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>Fourier_Transform</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
@tbhaxor
tbhaxor / Deploying Web Applications with Heroku.ipynb
Created October 19, 2019 17:28
Learn about heroku and deploying application on it
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tbhaxor
tbhaxor / Caching in Python.ipynb
Last active October 19, 2019 07:11
Learn about caching and its implementation in Python and Flasl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tbhaxor
tbhaxor / flask_cache.py
Created October 15, 2019 20:01
Flask redis / memcaching in python
from flask import Flask, jsonify
from requests import get as request
from flask_caching import Cache
BASE = """https://jsonplaceholder.typicode.com/users/{id}"""
# creating application
app = Flask(__name__)
conf = {'CACHE_TYPE': 'redis'} # or memcache
@tbhaxor
tbhaxor / lru.py
Created October 15, 2019 19:41
LRU Caching in Python
from flask import Flask, jsonify
from requests import get as request
from functools import lru_cache
BASE = """https://jsonplaceholder.typicode.com/users/{id}"""
# creating application
app = Flask(__name__)
@tbhaxor
tbhaxor / zip_crack.py
Created October 3, 2019 20:36
Zip password cracker
from os import path
import tempfile
from argparse import ArgumentParser, RawDescriptionHelpFormatter
from zipfile import ZipFile
from queue import Queue
# configuring argument parser
parser = ArgumentParser(description="Zip file cracker",
formatter_class=RawDescriptionHelpFormatter)
parser.add_argument("--zip", help="zip file to extract",
@tbhaxor
tbhaxor / keylogger.py
Created October 3, 2019 19:10
A simple and crossplatform keylogger
from pynput.keyboard import Controller, Listener, Key
from argparse import ArgumentParser, RawTextHelpFormatter
from socket import socket, AF_INET, SOCK_STREAM
from os import path
import os
from datetime import datetime
def on_press_log_file(key: Key):
"""
@tbhaxor
tbhaxor / nmap_automator.py
Created October 3, 2019 19:00
Minimal nmap automation script
from nmap import PortScanner, PortScannerError
from argparse import ArgumentParser, RawTextHelpFormatter
from os import path
import os
from socket import gethostbyname
# configuring the argument parsing
parser = ArgumentParser(description="A minimal Nmap Automation Script",
formatter_class=RawTextHelpFormatter)
from PIL import Image
import binascii
import string
def rgb2hex(r,g,b):
hex = "#{:02x}{:02x}{:02x}".format(r,g,b)
return str(hex)
im = Image.open('bojack.png')
print im
arr=''
pix_val = list(im.getdata())
@tbhaxor
tbhaxor / md5_for_life.py
Last active August 12, 2019 20:54
Script for Emdee five for life
#!/usr/bin/python3
# -------------------
# Author: Gurkirat Singh <tbhaxor@gmail.com>
# -------------------
import requests
import sys
import hashlib
import re