Skip to content

Instantly share code, notes, and snippets.

View 1trackprojects1's full-sized avatar
🌎
:/

Track Projects 1trackprojects1

🌎
:/
View GitHub Profile
@m-Phoenix852
m-Phoenix852 / discord-token-logger.js
Created August 26, 2020 07:45
Simple script to log in to discord account using token.
let token = "your token";
function login(token) {
setInterval(() => {
document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
/**
Simple(ish) example of discord gateway
This code will get to ready, and then remain connected with heartbeats
see https://discordapi.com/topics/gateway for more info
zlib compression is implemented as it will be required in gateway v7 (so get used to it now)
*/
const WebSocket = require('ws'); // npmjs.org/ws
const zlib = require('zlib-sync'); // npmjs.org/zlib-sync
const erlpack = require('erlpack'); // github.com/discordapp/erlpack
@masbog
masbog / dexMD5.py
Last active October 11, 2023 14:14
get dex MD5 of WhatsApp Application and get WhatsApp Version from an APK file
#!/usr/bin/env python3
# tweak up from https://github.com/mgp25/classesMD5-64/blob/master/dexMD5.py
# build AXML library from https://github.com/mikusjelly/axmlparser
# add xml manifest parse for getting WhatsApp Version
# to use this $ python3 dexMD5.py apk/WhatsApp.apk
# Output :
# WhatsApp Version : 2.17.296
# WhatsApp ClassesDEX MD5 : b'YrJNPljM3TuNFPIOZ+jziw=='
#
# @MasBog
@keithweaver
keithweaver / get-json.py
Created March 10, 2017 03:47
Get JSON file with Python
import json
def getJSON(filePathAndName):
with open(filePathAndName, 'r') as fp:
return json.load(fp)
# Example of returning just JSON
# jsonFile = getJSON('./test.json') # Uncomment this line
# It gets returned as a dictionary.
@tkrajina
tkrajina / unmarshal_interface.go
Last active January 30, 2024 05:46
Unmarshal JSON to specific interface implementation
package main
import (
"encoding/json"
"fmt"
"reflect"
)
type Something interface{}
@henriquemenezes
henriquemenezes / one-line-random-string-generators.md
Last active December 24, 2022 01:44
List of one-line random string generators

One-line Random String Generator

Python

CSPRNG (Cryptographically Secure Pseudo-Random Number Generator) functions:

  • os.urandom(n): return a string of n random bytes.
  • random.SystemRandom(): provides random functions that uses os.urandom().

Note: Don't use random module for PRNG for security purposes.

@fish2000
fish2000 / uninstall-all-via-pip.sh
Last active February 29, 2024 17:41
Get Rid Of PyObjC
yes | pip uninstall pyobjc-core \
pyobjc-framework-Accounts \
pyobjc-framework-AddressBook \
pyobjc-framework-AppleScriptKit \
pyobjc-framework-AppleScriptObjC \
pyobjc-framework-Automator \
pyobjc-framework-CFNetwork \
pyobjc-framework-CalendarStore \
pyobjc-framework-Cocoa \
pyobjc-framework-Collaboration \
@manishtpatel
manishtpatel / main.go
Last active October 18, 2023 03:12
GoLang Encrypt string to base64 and vice versa using AES encryption.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"fmt"
"io"
)
@robulouski
robulouski / gmail_imap_example.py
Last active April 19, 2024 02:27
Very basic example of using Python and IMAP to iterate over emails in a gmail folder/label. http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#!/usr/bin/env python
#
# Very basic example of using Python and IMAP to iterate over emails in a
# gmail folder/label. This code is released into the public domain.
#
# RKI July 2013
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#
import sys
import imaplib
@mariocesar
mariocesar / email_parse.py
Last active February 25, 2023 13:41
Parse a raw email
"""
$ cat source.email | python email_parse.py
"""
import fileinput
import email
from email.Utils import parseaddr
def parse():
raw_message = ''.join([line for line in fileinput.input()])