My CM4 doesn't have wifi, so I tried with a couple devices:
Both support monitor-mode and injection. I'm not sure, but I think kali's extended kernel has support for them buit in, but it also doesn't have Gpi2 LCD support.
#!/bin/bash -e | |
apt install -y build-essential debootstrap unzip git | |
# create image | |
qemu-img create -f qcow2 -o preallocation=metadata rknullos.qcow2 2G | |
modprobe nbd max_part=8 | |
qemu-nbd --connect=/dev/nbd0 rknullos.qcow2 | |
# paritition |
#include "stdio.h" | |
// Get more from https://en.wikipedia.org/wiki/List_of_file_signatures | |
const char* detectMime(unsigned char* bytes) { | |
if (bytes[0] == 0xFF && bytes[1] == 0xD8 && bytes[2] == 0xFF) { | |
return "image/jpeg"; | |
} | |
if (bytes[0] == 0x89 && bytes[1] == 0x50 && bytes[2] == 0x4E) { | |
return "image/png"; |
import 'https://cdn.jsdelivr.net/pyodide/v0.23.4/full/pyodide.js' | |
import setup from 'https://konsumer.js.org/raylib-python-web/python-raylib-web.js' | |
class RaylibPythonComponent extends HTMLElement { | |
constructor () { | |
super() | |
this.shadow = this.attachShadow({ mode: 'open' }) | |
this.canvas = document.createElement('canvas') | |
this.style.display = 'none' | |
window.addEventListener('resize', this.onResize.bind(this)) |
#!/bin/bash | |
wget https://github.com/raysan5/raylib/releases/download/4.5.0/raylib-4.5.0_webassembly.zip | |
unzip raylib-4.5.0_webassembly.zip | |
cd raylib-4.5.0_webassembly/ | |
wget https://raw.githubusercontent.com/raysan5/raylib/master/examples/core/core_basic_window.c | |
emcc -Os -I./include -s USE_GLFW=3 -s ASYNCIFY -DPLATFORM_WEB -o index.html core_basic_window.c lib/libraylib.a | |
npx -y live-server |
// this will make a note (to be re-inserted in your save-file) for all the passwords and firewall-codes | |
// your save file here | |
var fname = '/Users/konsumer/Library/Application Support/Hacknet/Accounts/save_konsumer.xml' | |
// var fname = 'C:\\Program Files (x86)\\Steam\\userdata\\93631843\\365450\\remote\\save_konsumer.xml' | |
var fs = require('fs') | |
var xml2js = require('xml2js') | |
var parser = new xml2js.Parser() |
import getWasmInterface from './get_wasm_interface.js' | |
// usage | |
const bytes = await fetch('mine.wasm').then(r => r.arrayBuffer()) | |
const m = await WebAssembly.compile(bytes) | |
// imports is minimal stub (empty functions) and exports is a list of things it exports | |
const { imports } = await getWasmInterface(m) | |
// now I can inject my own functions |
.PHONY: help clean | |
help: ## Show this help | |
@python tools/help.py "$(MAKEFILE_LIST)" | |
clean: ## Remove all built files | |
@rm -f FILES |
My CM4 doesn't have wifi, so I tried with a couple devices:
Both support monitor-mode and injection. I'm not sure, but I think kali's extended kernel has support for them buit in, but it also doesn't have Gpi2 LCD support.
/** | |
* My lightweight router using hooks | |
*/ | |
import React, { cloneElement, useContext, useState, useEffect } from 'react' | |
import createHistory from 'history/createBrowserHistory' | |
import Path from 'path-parser' | |
// for direct import | |
export const history = createHistory() |
import React form 'react' | |
import { compose, withHandlers } from 'recompose' | |
import { formHandler } from './utils' | |
// usage example | |
export const MyCoolForm = ({form, setForm, onSubmit}) => ( | |
<form onSubmit={onSubmit}> | |
<input type="name" value={form.name} onChange={setForm('name')} /> | |
<input type="email" value={form.email} onChange={setForm('email')} /> | |
<input type="password" value={form.password} onChange={setForm('password')} /> |