Skip to content

Instantly share code, notes, and snippets.

View sdushantha's full-sized avatar

Siddharth Dushantha sdushantha

View GitHub Profile
#!/usr/bin/python3
#
# POC of RCE on Fuel CMS v1.4.1 (CVE-2018-16763)
#
# Original author: Padsala Trushal
# Modified by: Siddharth Dushantha
#
# Modifications that've been made:
# - Cleaned output so that the word 'system' did not
# appear in every output
@sdushantha
sdushantha / fetch-words.sh
Last active June 5, 2023 06:26
List of all Wordle's 14,855 words fetched directly from Wordle's source code
#!/bin/bash
#
# Code used to fetch all of Wordle's words
#
# Save JavaScript code containing the list of words into wordle.js
curl https://www.nytimes.com/games-assets/v2/wordle.b53d5fe794f17d174ac9.js > wordle.js
# Get the array containing the list of words and remove array specific characters
cat wordle.js| grep -oE 'va=\[[^]]*]' | sed -e "s/va=\[//g" -e "s/\"//g" -e "s/,/\n/g" -e "s/]//g" > wordle-full-list.txt

|Url |Contact |Expires |Encryption |Acknowledgments |Languages |Policy |Hiring | |------------------------------------------------------------|-----------------------------------------------|-------------------------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------

import requests
import jwt
import argparse
import sys
def get_exernal_object_id(target, token):
headers = {
'Host': 'teams.microsoft.com',
'Authorization': f"Bearer {token}",
@sdushantha
sdushantha / test
Last active February 23, 2023 22:31
hello
@sdushantha
sdushantha / eduroam.sh
Created August 23, 2021 16:34 — forked from AntonFriberg/eduroam.sh
Connect to eduroam on Lund University with NetworkManager
nmcli con add \
type wifi \
con-name "eduroam"
ifname "wlp4s0" \ # Your wifi interface
ssid "eduroam" \
wifi-sec.key-mgmt "wpa-eap" \
802-1x.identity "<YOUR-STUDENT-ID>@lu.se" \ # May also use another university identification
802-1x.password "<YOUR-PASSWORD" \
802-1x.system-ca-certs "yes" \
802-1x.domain-suffix-match "radius.lu.se" \
@sdushantha
sdushantha / ytdl.py
Created May 22, 2021 10:53
Very short YouTube downloader. Extraction of video is done through code, no external modules.
#!/usr/bin/env python3
#
# by Siddharth Dushantha (sdushantha)
#
# My very simple version of youtube-dl.
#
# Credits: https://git.io/JTPr9
#
import re
@sdushantha
sdushantha / apple-serial.py
Last active September 23, 2020 08:37
Get the basic device specs based on serial number for Apple Devices. Useful to check inventory
import requests
import sys
# Can be 'computer' or 'tablet'
deviceType = "computer"
serialNumber = input("Serial: ")
print()
data = {
'cat': 'computer',

Source code for graph used in EE

import matplotlib.pyplot as plt
from collections import Counter, OrderedDict
import requests

r = requests.get("https://sherlock-holm.es/stories/plain-text/cano.txt")
text = r.text

chars_to_remove = []