Skip to content

Instantly share code, notes, and snippets.

View clouedoc's full-sized avatar
🦀
Learning Rust for fun&profit

Camille Louédoc-Eyriès clouedoc

🦀
Learning Rust for fun&profit
View GitHub Profile
@alexklibisz
alexklibisz / 0-firefly-grafana-example.md
Last active January 31, 2025 09:59
Firefly + Grafana Example
crasher = someBool => {
let divZero = Math.min(Infinity ? [] : Infinity, -0) / 0;
if (someBool) divZero = -0;
return divZero ? 1 : 0
};
crasher(false);
for (let i = 0; i < 0x10000; ++i) crasher(false);

Deezer Keys

Deezer is unique amongst most of the commercial music streaming services I've attempted to reverse engineer in that many keys are stored (obfuscated) on the client side, including the "DRM" used to encrypt tracks. With some reverse engineering effort, this makes it fairly trivial to implement clients and libraries.

Note that many keys and algorithms are implemented in a strange way - often the ASCII hex form of a key or hash is used rather than the raw bytes.

Logging in to Deezer using the mobile API

On the desktop versions of Deezer, logging in requires a Captcha. However, on the mobile versions no Captcha is required. This is because on mobile the app uses a different endpoint to log in, but encrypts the login parameters instead (using a hardcoded key). This details how to obtain the login parameter encryption key (what I call the "gateway key"). The gateway key is a 16 character ASCII uppercase string of numbers and letters.

Note that no keys will be posted here due to fear of DMCA take

@LeZuse
LeZuse / 00_README.md
Last active February 11, 2025 03:08
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
@le-dawg
le-dawg / awsmining.md
Created December 29, 2020 15:20
XMR Mining AWS ... here is how to do it securely

So you want to mine in AWS without getting caught

tl;dr: AWS mining is against TOC so even if you have credits you will be invoiced and your credits burned. Watch out. These methods only help mitigate or lower the risk of discovery. Share responsibly.

Problem

AWS is firewalled af on top of the policy mentioned in tl;dr. A good way is to use a mining proxy with TLS. Even better would be a point-to-point VPN. Using VPN directly is also a good solution - but services that let you configure that you only want one certain port to run via VPN and not the SSH connection that is your lifeline are costly. This document sketches a few solutions, provides some links, and documents one particular approach. And remember, methods of detection will soon encompass deep learning: https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9178288

@andelf
andelf / trc20.js
Created April 20, 2020 07:12
Get TRC20 balance and transfer USDT tokens
const TronWeb = require('tronweb');
const HttpProvider = TronWeb.providers.HttpProvider;
const fullNode = new HttpProvider("https://api.trongrid.io");
// const fullNode = new HttpProvider("http://192.168.1.162:8090");
const solidityNode = new HttpProvider("https://api.trongrid.io");
const eventServer = new HttpProvider("https://api.trongrid.io");
const privateKey = "3481E79956D4BD95F358AC96D151C976392FC4E3FC132F78A847906DE588C145";
const tronWeb = new TronWeb(fullNode, solidityNode, eventServer, privateKey);
/**
* Export all data from an IndexedDB database
*
* @param {IDBDatabase} idbDatabase The database to export from
* @return {Promise<string>}
*/
export function exportToJson(idbDatabase) {
return new Promise((resolve, reject) => {
const exportObject = {}
if (idbDatabase.objectStoreNames.length === 0) {
@aslushnikov
aslushnikov / networkinformation.js
Created June 3, 2019 03:48
Using Puppeteer to emulate Network Information API
const puppeteer = require('puppeteeer');
const networkConditions = {
'2g': {
downloadThroughput: 500 * 1024 / 8 * .8,
uploadThroughput: 500 * 1024 / 8 * .8,
latency: 400 * 5,
offline: false,
},
'3g': {
@edco
edco / mc-server.yaml
Created March 14, 2018 02:28
Create a Minecraft server on Google Cloud Platform in moments. Running this script amounts to accepting the Minecraft EULA. Based on https://cloud.google.com/solutions/gaming/minecraft-server but without the dedicated storage and backups.
resources:
- type: compute.v1.address
name: mcs-ip
properties:
region: australia-southeast1
- type: compute.v1.instance
name: mc-server
properties:
zone: australia-southeast1-c
machineType: zones/australia-southeast1-c/machineTypes/n1-standard-1
@Xetera
Xetera / First Discord Command
Created November 4, 2017 10:57
One of the first "working" pieces of code I wrote in python for discord ft. global variables
async def cmd_weather(self, channel, author):
import json
from array import array
import requests
from collections import OrderedDict
from pprint import pprint
api_key = "&APPID=507e30d896f751513350c41899382d89"
city_name_url = "http://api.openweathermap.org/data/2.5/weather?q="
units = "&units=metric"
global general_info