Skip to content

Instantly share code, notes, and snippets.

View iamironz's full-sized avatar

Aleksandr Efremenkov iamironz

View GitHub Profile
@ethaniel
ethaniel / sms-to-telegram.md
Last active April 9, 2024 03:44
HOWTO: Receive SMS via 4G/LTE Huawei stick on Raspberry Pi 4 and forward them via Telegram

HOWTO: Receive SMS via 4G/LTE Huawei stick on Raspberry Pi 4 and forward them via Telegram

I live abroad and have only 1 sim card slot in my phone. It holds the SIM card of the country that I am in right now. But I also have another SIM card from my home country which receives my banking SMS codes. I can't afford to lose the "home" SIM card, so I decided to keep it in my house and forward the SMS messages to my main phone and computer via Telegram (just like Whatsapp, but so much better).

I also made a choice to use a 4G/LTE stick instead of 3G, because the 3G signal in my area is getting worse in worse due to operators upgrading their equipment.

Prerequisites

  1. Raspberry Pi 4
  2. Huawei E8372 (but can be any similar)

Step 1 - Get the Huawei card to work properly with Raspberry

@DavidPesticcio
DavidPesticcio / get_jenkins_credentials.groovy
Created November 26, 2019 18:15
Jenkins: How to decrypt credentials
// Here is a short snippet you can just run from the jenkins script console, to dump all of your credentials to plain text.
com.cloudbees.plugins.credentials.SystemCredentialsProvider.getInstance().getCredentials().forEach{
it.properties.each { prop, val ->
println(prop + ' = "' + val + '"')
}
println("-----------------------")
}
@dtmsecurity
dtmsecurity / doh_test.sh
Last active December 1, 2022 16:38
DNS over HTTPS (DoH) Resolver GET Test Script
#!/bin/bash
printf "===START dns.google.com===\n"
curl -k -H "accept: application/dns-json" "https://dns.google.com/resolve?name=example.com&type=AAAA"
printf "\n===END dns.google.com===\n"
printf "===START cloudflare-dns.com===\n"
curl -k -H "accept: application/dns-json" "https://cloudflare-dns.com/dns-query?name=example.com&type=AAAA"
printf "\n===END cloudflare-dns.com===\n"
printf "===START 1.1.1.1===\n"
curl -k -H "accept: application/dns-json" "https://1.1.1.1/dns-query?name=example.com&type=AAAA"
printf "\n===END 1.1.1.1===\n"