Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@CypherpunkSamurai
CypherpunkSamurai / bencode.cpp
Created August 10, 2021 19:39 — forked from caetanus/bencode.cpp
Qt Bencode and Decoder and Torrent Creator
#include "bencode.h"
BEncode::BEncode()
: m_decodeError{ false }
{
}
QByteArray BEncode::encode(QVariant value)
{
return encodeVariant(value);
apply plugin: 'com.android.application'
android {
...
...
defaultConfig {
...
versionCode 2000
...
@CypherpunkSamurai
CypherpunkSamurai / get_latest_release.sh
Created October 3, 2021 17:52 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@CypherpunkSamurai
CypherpunkSamurai / encrypt_openssl.md
Created October 12, 2021 18:23 — forked from dreikanter/encrypt_openssl.md
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

@CypherpunkSamurai
CypherpunkSamurai / code.cpp
Created October 27, 2021 12:54 — forked from rla/code.cpp
Sending JSON POST request with Qt
void SyncService::sync()
{
QUrl url(SYNC_URL);
QNetworkRequest request(url);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply*)),
@CypherpunkSamurai
CypherpunkSamurai / linebreak.md
Last active November 18, 2021 20:18
Line breaks in markdown (github softwrap)
Hello  (<-- two spaces)
World

Hello
World


# Cracking Sublime Text ( Build 4121 ) Tutorial Analysis
---
Two main changes to be made for best experience. This can be done with script.
### License Key
While it is possible to deduce the format of the license key, there is available ones online to show. Analyse and see that it is still that same format. The main part is the verification of the hash values from the license key that we want to always be "correct". This is also the key that this tutorial will use.
```
@CypherpunkSamurai
CypherpunkSamurai / sublimetext_4121_crack.py
Created November 18, 2021 20:44 — forked from dmknght/sublimetext_4121_crack.py
Patch binary of sublimtext amd64 linux build 4121
import os
sublime_binary_path = "/tmp/sublime_text"
version_magic_string = "/updates/4/stable_update_check?version=4121&platform=linux&arch=x64"
sz_magic_string = 67
version_magic_string_offset = 0x000106bd # (Real offset from xxd)
is_file_read = os.access(sublime_binary_path, os.R_OK)
if not is_file_read:
@CypherpunkSamurai
CypherpunkSamurai / resources.md
Created November 18, 2021 20:49 — forked from muff-in/resources.md
A curated list of Assembly Language / Reversing / Malware Analysis / Game Hacking-resources