Skip to content

Instantly share code, notes, and snippets.

View belohnung's full-sized avatar
🏠
Working from home

blong belohnung

🏠
Working from home
View GitHub Profile
@belohnung
belohnung / smokepingparser.js
Created July 27, 2023 21:25
Smokeping Target config parser in Javascript
function parseSmokepingConfig(filePath) {
let fileContent = fs.readFileSync(filePath, 'utf8');
fileContent = fileContent.replace("\r\n", "\n");
const lines = fileContent.split("\n");
const targets = [];
let currentTarget = null;
let isInHeader = true;
let headerLines = "";
for (const line of lines) {
@belohnung
belohnung / main.rs
Last active August 31, 2021 15:33
Tool to ping MC:BE servers
use std::convert::TryInto;
use std::net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket};
use std::thread;
const UNCONNECTED_PING: &'static [u8] = &[
0x01u8, // UNCONNECTED_PING ID
0x0, 0x0, 0x0, 0x0, 0x0, 0xD, 0x8, 0x8B, // ping-time
0x0, 0xFF, 0xFF, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0x12, 0x34, 0x56,
0x78, // magic
];

Keybase proof

I hereby claim:

  • I am belohnung on github.
  • I am belohnung (https://keybase.io/belohnung) on keybase.
  • I have a public key whose fingerprint is CF63 ABE2 1594 6D22 BAB1 B8F7 37C7 7176 BCB7 8B8F

To claim this, I am signing this object: