Skip to content

Instantly share code, notes, and snippets.

View cjavad's full-sized avatar
🐬
PHP'ing ;)

Javad Shafique cjavad

🐬
PHP'ing ;)
View GitHub Profile
#!/bin/bash
VERSION=3.11.8
VERSION_SHORT=3.11
mkdir -p /usr/local/src
cd /usr/local/src
if [ ! -f Python-${VERSION}.tgz ]; then
wget -O Python-${VERSION}.tgz https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tgz
@cjavad
cjavad / IQ.cs
Created February 9, 2024 17:08
Quickly lookup lifetime stats on ICTF discord bot IQ to troll peeps.
using System;
using System.Security.Cryptography;
using System.Linq;
using System.Text;
public class Program
{
public static void Main()
{
int[] res = Max(393489189116837918);
@cjavad
cjavad / iso3166_by_region.d.ts
Created November 30, 2020 22:54
Every country (ISO3166) separated into enums based on region, inspired by the similar CountryByCode. This list takes geographical assumptions over political ones, meaning you'll find countries such as Ukraine under CIS while they actually withdrew in 2014 (Effective 2018).
/**
* Every country (ISO3166) split into geographical region.
* https://meta.wikimedia.org/wiki/List_of_countries_by_regional_classification
* https://en.wikipedia.org/wiki/Commonwealth_of_Independent_States#Member_states
* https://en.wikipedia.org/wiki/Southeast_Asia
*/
export namespace CountryByRegion {
export enum Europe {
AX = 'Aland Islands',
AL = 'Albania',
@cjavad
cjavad / character_index_search.py
Created November 4, 2020 09:58
Yes, i was bored.
# Character index based search.
# Each line is seperated into words
# each word is then categories into indexes
# INPUT_PATH = r"PATH"
text = """What the fuck did you just fucking say about me, you little bitch?
I'll have you know I graduated top of my class in the Navy Seals,
and I've been involved in numerous secret raids on Al-Quaeda,
and I have over 300 confirmed kills.
@cjavad
cjavad / discordCountdown.js
Created July 4, 2020 15:39
Count down days and hours until event using vc channel name. Format: `;addcd | eventname | javascript passable date`
const Discord = require('discord.js');
const { JsonDB } = require('node-json-db');
const { DataError } = require('node-json-db/dist/lib/Errors');
const { Config } = require('node-json-db/dist/lib/JsonDBConfig');
const db = new JsonDB(new Config('db', true, false, '/'));
const client = new Discord.Client();
// Initialize db
try {
@cjavad
cjavad / xml2js.min.js
Created May 26, 2020 00:15
node-xml2js 1832e0b6b2de30a5e326d1cf21708cd32305a538 browerified and minified. https://github.com/Leonidas-from-XIV/node-xml2js/issues/277
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.xml2js=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){(function(){"use strict";exports.stripBOM=function(str){if(str[0]==="\ufeff"){return str.substring(1)}else{return str}}}).call(this)},{}],2:[function(require,module,
@cjavad
cjavad / base64.cpp
Created February 20, 2020 08:41
[base64 command line tool - detects base64 w/ regex]
#include "base64.hpp"
#include <regex>
/*
ENCODE/DECODE Functions
*/
std::string b64_encode(const std::string &input, bool strip_padding = false) {
static std::string encoded; // define output string
// resize string for space for the base64 string
@cjavad
cjavad / mangadex.py
Created December 21, 2019 23:11
Python script and downloads manga chapters from mangadex.org, works as a executable and takes args. (Downloads to folders it creates) REQUIRES SELENIUM and matching CHROME+CHROMEDRIVER.
#!/usr/bin/env python3
import requests
import os
import sys
import argparse
'''
This function takes a string and checks if it uses the format [http(s)][://mangadex.org/chapter/]*
aka. if it's a valid link to a mangadex manga/chapter.
@cjavad
cjavad / ac_autoexec.cfg
Last active February 26, 2020 17:46
16:10 Fullscreen windowed 1440x900 and 0.6@1200 DPI or 720 eDPI
exec ac_config
exec ac_crosshair
exec ac_baited
exec ac_expr
exec ac_spam
bind mouse1 "+attack"
bind mouse2 "+attack2"
bind mouse4 "+voicerecord"
bind w "+forward"
@cjavad
cjavad / GiveAwaySelecter.py
Last active December 4, 2018 16:43
Simple python script, to select a random item from a list of string. In this case a list of steam trade urls. By /u/cjavad
"""
DEFINE FUNCTIONS HERE
"""
import re
# get steamid of trader
def TradeLink2SteamId(tradeurl):
tradeurl = str(tradeurl)
partnerid = re.search("(=).*?(&)", tradeurl).group().strip("=").strip("&")