Skip to content

Instantly share code, notes, and snippets.

View chankruze's full-sized avatar
🎯
Focusing

Chandan Kumar Mandal chankruze

🎯
Focusing
View GitHub Profile
{BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0}
#!/bin/bash
if [ $# -eq 0 ]
then
adb connect $(ip route show | grep "default via" | cut -d" " -f3)
else
adb connect $1
fi

These are a few of my favourite things!

7A3B00

6000C7

67C700

42FFFC

Hey check out this super secret message I made, using a cool ROT13 cipher I found online !

Lb, fb unir lbh orra cynlvat gung arj Zrfbcrgf tnzr? Gubfr arj Zrtnybalpuvqr naq Oenqlcbqvqnr gurl nqqrq ner cerggl pbby. Npghnyyl, V jbhyq tb nf sne nf fnlvat gung vg vf abj zl yvsr'f qrnerfg nzovgvba gb bognva n "UzrxmfmnxqExaftYazefqd"!

#!/usr/bin/python3
from itertools import permutations
correct_fill = "285"
perm = permutations('123456789', 3)
f = open("numbers_permutation.txt", "w")
@chankruze
chankruze / netgear-private-key-disclosure.md
Created January 20, 2020 12:04 — forked from nstarke/netgear-private-key-disclosure.md
Netgear TLS Private Key Disclosure through Device Firmware Images

Netgear Signed TLS Cert Private Key Disclosure

Overview

There are at least two valid, signed TLS certificates that are bundled with publicly available Netgear device firmware.

These certificates are trusted by browsers on all platforms, but will surely be added to revocation lists shortly.

The firmware images that contained these certificates along with their private keys were publicly available for download through Netgear's support website, without authentication; thus anyone in the world could have retrieved these keys.

chankruze@geekofia:~$ usb-devices | grep "Manufacturer=Realme" -B 3
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 19 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=18d1 ProdID=4ee8 Rev=04.09
S: Manufacturer=Realme
chankruze@geekofia:~$ cd /run/user/1000/gvfs/
chankruze@geekofia:/run/user/1000/gvfs$ ls
'ftp:host=192.168.43.220,port=2121'
$uri = Read-Host 'Enter URL'
$out = Read-Host 'Save As'
Invoke-WebRequest $uri -OutFile $out
#!/bin/bash
cd ~/Android/Sdk/platform-tools
./adb connect $(ip route show | grep "default via" | cut -d" " -f3):5555
@SuppressLint("DefaultLocale")
public static String humanReadableByteCount(long bytes, boolean si) {
int unit = si ? 1000 : 1024;
if (bytes < unit) return bytes + " B";
int exp = (int) (Math.log(bytes) / Math.log(unit));
String pre = (si ? "kMGTPE" : "KMGTPE").charAt(exp - 1) + (si ? "" : "i");
return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre);
}
public String getReadableSize() {