Skip to content

Instantly share code, notes, and snippets.

View angeloped's full-sized avatar

Angeloped angeloped

  • Philippines
View GitHub Profile
@angeloped
angeloped / rsa.py
Created June 21, 2020 08:26
A simple RSA implementation in Python
'''
620031587
Net-Centric Computing Assignment
Part A - RSA Encryption
'''
import random
'''
@angeloped
angeloped / keydown.coffee
Created May 31, 2020 19:22 — forked from tiye/keydown.coffee
keyCode of keydown event in JSON format
# keydown data from the web
# http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
map =
backspace: 8
tab: 9
enter: 13
shift: 16
ctrl: 17
@angeloped
angeloped / generate-ssh-key.sh
Created February 12, 2020 05:14 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@angeloped
angeloped / aes.py
Created September 28, 2019 09:54 — forked from LuoZijun/aes.py
Python AES
#!/usr/bin/env python
#coding: utf8
import base64
import hashlib
import binascii
from Crypto import Random
from Crypto.Cipher import AES
from os import urandom
@angeloped
angeloped / netcat.py
Created September 20, 2019 07:58 — forked from leonjza/netcat.py
Python Netcat
import socket
class Netcat:
""" Python 'netcat like' module """
def __init__(self, ip, port):
self.buff = ""
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@angeloped
angeloped / pi.py
Last active September 13, 2019 06:41 — forked from markhamilton1/pi.py
pi is a Python script that computes each digit of the value of pi. As long as this script runs it continues to generate digits. As a matter of full disclosure, I did not write this. I am posting it here as a means of preserving the algorithm and making it available to others.
import sys
'''
Added some modificationss
1. saving line for every 1024 digits.
2. notify if it scored million.
'''
def calcPi():
q, r, t, k, n, l = 1, 0, 1, 1, 3, 3
@angeloped
angeloped / ch5_html_form_brute_force.py
Created September 5, 2019 14:33 — forked from ismailakkila/ch5_html_form_brute_force.py
ch5_html_form_brute_force.py
#ch5_html_form_brute_force.py
from html.parser import HTMLParser
import urllib.request
import urllib.parse
import http.cookiejar
import queue
import threading
import sys
import os
@angeloped
angeloped / udpflood_scapy.py
Created July 27, 2019 19:49 — forked from nextrevision/udpflood_scapy.py
Send a flood of UDP packets to a specific UDP port
#!/usr/bin/env python
#
# Requires:
# - scapy
# - tcpreplay
import sys
from scapy.all import *
if len(sys.argv) != 6:
/**
* jQuery 2.1.3's parseHTML (without scripts options).
* Unlike jQuery, this returns a DocumentFragment, which is more convenient to insert into DOM.
* MIT license.
*
* If you only support Edge 13+ then try this:
function parseHTML(html, context) {
var t = (context || document).createElement('template');
t.innerHTML = html;
return t.content.cloneNode(true);
@angeloped
angeloped / dummy-web-server.py
Created December 13, 2018 14:07 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost