Skip to content

Instantly share code, notes, and snippets.

View angeloped's full-sized avatar

Angeloped angeloped

  • Philippines
View GitHub Profile
@angeloped
angeloped / online-note.php
Last active September 17, 2020 21:52
A simple note composer web app written in PHP for lazy writers.
<?php
/*
A simple note composer web app written in PHP for lazy writers.
*/
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST');
header("Access-Control-Allow-Headers: X-Requested-With");
if(!isset($_GET["save"])){
@angeloped
angeloped / translit_farsi.py
Created August 11, 2020 21:19
Transliterate Persian/Farsi language. Persian/Farsi transliterator.
def translit_farsi(word):
word = word.replace("ا", "a")
word = word.replace("أ", "a")
word = word.replace("آ", "a")
word = word.replace("إ", "e")
word = word.replace("ب", "b")
word = word.replace("ت", "t")
word = word.replace("ث", "th")
word = word.replace("ج", "j")
word = word.replace("ح", "h")
@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 / predict-city-state-coords.py
Last active August 11, 2020 21:20
Geographical City/State prediction. Focc please fix me.
import csv
"""
Download the data here: https://github.com/angeloped/OSDSint/tree/master/geocodes
"""
with open("geocities.csv", 'r') as csv_file:
csv_globe = [a for a in csv.DictReader(csv_file)]
def pos_neg(num1, num2):
@angeloped
angeloped / geo-sorter.py
Created June 5, 2020 18:13
Geolocation Sorting Algorithm
sorted_geo = []
def Geolocation_sorter(geo_info): # arg={COUNTRY:'',LNG:'',LAT:''}
if not bool(sorted_geo): # if empty
sorted_geo.append(geo_info)
return
i = 0
while i < len(sorted_geo):
if (float(geo_info["LNG"]) >= float(sorted_geo[i]["LNG"]) and float(geo_info["LNG"]) <= float(sorted_geo[:i+1][0]["LNG"])):
sorted_geo.insert(i+1, geo_info)
@angeloped
angeloped / fibo-solver.py
Last active June 4, 2020 19:50
A simple Fibonacci sequence solver.
'''
written by: Bryan Angelo
'''
def fibCount(nth=0,ntp=0,sus=False): # where / limit / yield
# infinite loop
A,B = 1,1
nth_ = 0
while 1:
if bool(nth): # last number of specific iteration limit
@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 / nmap_profile.py
Last active September 18, 2021 09:50
A collection of Nmap scan presets for python-nmap.
import re
import nmap
"""
name: nmap_profile.py
author: bryan angelo
description: A collection of Nmap scan profiles for python-nmap.
"""
nmap_profiles = {
@angeloped
angeloped / admin-finder.py
Last active May 26, 2020 12:12
A simplified admin panel finder compatible in Python 3.
import re
import time
import urllib.request
import _thread
paths = ["/Login/Admin", "/UserLogin", "/acceso.asp", "/acceso.aspx", "/acceso.brf", "/acceso.cfm", "/acceso.cgi", "/acceso.js", "/acceso.php", "/access", "/access.asp", "/access.aspx", "/access.php", "/account.asp", "/account.aspx", "/account.brf", "/account.cfm", "/account.cgi", "/account.html", "/account.js", "/account.php", "/accounts", "/accounts.asp", "/accounts.aspx", "/accounts.php", "/adm", "/adm.asp", "/adm.aspx", "/adm.brf", "/adm.cfm", "/adm.cgi", "/adm.html", "/adm.js", "/adm.php", "/adm/admloginuser.asp", "/adm/admloginuser.aspx", "/adm/admloginuser.brf", "/adm/admloginuser.cfm", "/adm/admloginuser.cgi", "/adm/admloginuser.js", "/adm/admloginuser.php", "/adm/index.asp", "/adm/index.aspx", "/adm/index.brf", "/adm/index.cfm", "/adm/index.cgi", "/adm/index.html", "/adm/index.js", "/adm/index.php", "/adm_auth.asp", "/adm_auth.aspx", "/adm_auth.brf", "/adm_auth.cfm", "/adm_auth.cgi", "/adm_auth.js", "/adm_auth.php", "/admin", "/admin-login.a
@angeloped
angeloped / keyboard_type_replace.js
Created May 11, 2020 22:44
Replace keyboard characters by keydown.
$('textarea').on('keydown', function(e){
console.log(e.keyCode);
if( e.keyCode == 90 ){
e.preventDefault();
$(this).append('y').focus();
}
if( e.keyCode == 89 ){
e.preventDefault();
$(this).append('z').focus();