start new:
tmux
start new with session name:
tmux new -s myname
// Calculates the checksum for a sentence | |
// Calculates the checksum for a sentence | |
static string getChecksum(string sentence) { | |
//Start with first Item | |
int checksum= Convert.ToByte(sentence[sentence.IndexOf('$')+1]); | |
// Loop through all chars to get a checksum | |
for (int i=sentence.IndexOf('$')+2 ; i<sentence.IndexOf('*') ; i++){ | |
// No. XOR the checksum with this character's value | |
checksum^=Convert.ToByte(sentence[i]); |
DO NOT use these as-is for anything important! | |
These are only very basic examples and they are missing much of what would be needed for a real-world use case. | |
These are snippets for matching encrypt and decrypt (Rijndael-128 in CBC mode with PKCS7 padding) in C#.NET, PHP, and Python. | |
I cobbled these together from various existing examples because at the time it seemed like a lot of existing examples out there for different languages/platforms did not quite match and would require quite a bit more work before they would encrypt/decrypt identically. | |
Each of these take Keys and IVs that are 16 character strings encoded in base64. |
sudo dfu-util -l
It will show like...
Found DFU: [0483:df11] ver=2100, devnum=32, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 g", serial="3262355B3231"
Found DFU: [0483:df11] ver=2100, devnum=32, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 g,01*016 g", serial="3262355B3231"
Found DFU: [0483:df11] ver=2100, devnum=32, cfg=1, intf=0, alt=1, name="@Option Bytes /0x1FFFC000/01*016 g", serial="3262355B3231"
sudo cp /etc/network/interfaces /etc/network/interfacesoriginal | |
sudp rm /etc/network/interfaces | |
sudo nano /etc/network/interfaces | |
---------------------------------- | |
COPY | |
---------------------------------- | |
auto lo | |
iface lo inet loopback | |
auto eth0 |
#include <iostream> | |
#include <iomanip> | |
#include <unordered_set> | |
#include <vector> | |
#include <fstream> | |
using Type = uint32_t; | |
using Magic = std::vector<Type>; | |
using Numbers = std::unordered_set<Type>; |
#!/bin/bash | |
set -e | |
## Alternative 1 | |
# Key server | |
alternative1() { | |
KEY_SRV=${KEY_SRV:-"keyserver.ubuntu.com"} | |
#GPG_KEY="7D8D0BF6" | |
GPG_KEY="ED444FF07D8D0BF6" |