Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I wonder if I can brute-force learning... probably shouldn't.

Dracovian

💭
I wonder if I can brute-force learning... probably shouldn't.
View GitHub Profile
@Dracovian
Dracovian / api.php
Created Jan 9, 2018
An API made with PHP that handles simple RSA functionality such as keypair generation, encrypting, and decrypting.
View api.php
<?php
class Filter {
var $input;
function __construct($input) {
$this->input = htmlspecialchars($input);
$this->numeric = '#[0-9]#';
$this->alphabetic = '#[a-z]#i';
$this->alphanumeric = '#[a-z0-9]#i';
$this->multiplier = 512;
@Dracovian
Dracovian / obfuscator.py
Last active Jan 26, 2018
Prevent filename scrutiny by means of renaming said files with something a bit more random. Also employ a checksum verification method to catch potential file corruption or alteration when reversing the process.
View obfuscator.py
'''
'' @author: KimChoJapFan
'' @date: January 26, 2018
'''
# Import some necessary modules.
import hashlib, random, os
# Create our characterset for the random filename.
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
@Dracovian
Dracovian / autoban.py
Last active Jun 11, 2020
Mess with people on Discord and get yourself banned from servers so easily.
View autoban.py
from http.client import HTTPSConnection
from json import dumps, loads
from threading import Thread
class Request:
def __init__(self, conn=None):
if conn is None:
conn = HTTPSConnection('discordapp.com', 443)
@Dracovian
Dracovian / web.py
Created Feb 27, 2018
Simple web server in Python 3
View web.py
from socket import socket, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR
from sys import stdout
host, port, sock = 'localhost', 80, socket(AF_INET, SOCK_STREAM)
sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
sock.bind((host, port))
sock.listen(1)
stdout.write('Hosting HTTP Server on {}:{}\n'.format(host, port))
@Dracovian
Dracovian / passgen.py
Last active Mar 9, 2018
Simple Python 3 Password Generator
View passgen.py
from sys import stdout
from os import urandom
def genCharset():
lower = 'abcdefghijklmnopqrstuvwxyz'
return '0123456789{}{}!@#$%^&*'.format(lower, lower.upper())
def randomInteger(min, max):
return (ord(urandom(1)) % (max - min)) + min
@Dracovian
Dracovian / php_web.py
Created Mar 26, 2018
It was worth an attempt...
View php_web.py
'''
'' @author KimChoJapFan <https://github.com/KimChoJapFan>
'' @date March 25, 2018
'' @project WebPyPHP
'' @version 3.18r01
'''
from socket import socket, timeout, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR
from subprocess import run, PIPE
from os import path
@Dracovian
Dracovian / interpreter.cpp
Created Mar 30, 2018
Simplest Interpreter
View interpreter.cpp
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <regex>
#include <cmath>
#include "compiler.hpp"
@Dracovian
Dracovian / extract.bat
Created Apr 12, 2018
Simple unpacking of some repacks with exception to those that includes encryption such as the ones from R.G. Mechanics
View extract.bat
@echo off
REM Author: KimChoJapFan
REM
REM Purpose: To unpack Mr. DJ repacks.
REM
REM Benefit: To prevent shady scripts from being ran (no bitcoin miners, keyloggers, etc...).
REM
REM Downside: Can cause errors and may take longer to finish.
@Dracovian
Dracovian / run.vbs
Created Apr 12, 2018
An example script to run a couple of programs without showing a command prompt window for each running program.
View run.vbs
Dim dir : dir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
Set ws = WScript.CreateObject("WScript.Shell")
Dim nginx : nginx = dir & "\bin\nginx.exe"
Dim php : php = dir & "\bin\php\php-cgi.exe"
Dim nginx_start : nginx_start = nginx & " -p " & dir & "\bin -c " & dir & "\bin\conf\nginx.conf"
Dim php_start : php_start = php & " -b 127.0.0.1:9000 -c " & dir & "\bin\php\php.ini"
ws.run(nginx_start), 0, false
@Dracovian
Dracovian / conf.json
Created Apr 17, 2018
A slightly more complicated NodeJS web server
View conf.json
{
"settings": {
"port": 80,
"index": "index.html"
},
"headers": {
"host": "localhost",
"origin": "http://localhost",
"x-frame-options": "SAMEORIGIN",
"x-xss-protection": "\"1; mode=block\"",
You can’t perform that action at this time.