Skip to content

Instantly share code, notes, and snippets.

Avatar

शंतनू (Shantanoo) shantanoo

  • पुणे, महाराष्ट्र, भारत
View GitHub Profile
View ssl_smtp_example.go
package main
import (
"crypto/tls"
"fmt"
"github.com/jpoehls/gophermail"
"log"
"net"
"net/smtp"
)
View gnupg21.rb
class Gnupg21 < Formula
desc "GNU Privacy Guard: a free PGP replacement"
homepage "https://www.gnupg.org/"
url "https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.1.18.tar.bz2"
mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnupg/gnupg-2.1.18.tar.bz2"
sha256 "d04c6fab7e5562ce4b915b22020e34d4c1a256847690cf149842264fc7cef994"
bottle do
sha256 "54c56057f77131999c28c36b8f1c7634cc49d93547c52e979afcffb18c5e414d" => :sierra
sha256 "3318380b33d6f8b96219885d5e633214160a91e067f4914c17c8755bc1910afb" => :el_capitan
View keybase.md

Keybase proof

I hereby claim:

  • I am shantanoo on github.
  • I am shantanoo (https://keybase.io/shantanoo) on keybase.
  • I have a public key ASBepQs9YHucd93ytfdW84n4eYZ0ZZk8m26RKrt1kQRm3go

To claim this, I am signing this object:

View ssh_keygen_rsa.py
#!/usr/bin/env python3
import argparse
from Crypto.PublicKey import RSA
from Crypto import Random
import sys
def createKeys(bits=2048):
rnd = Random.new()
View remove_mp3_id3_tags.py
#!/usr/bin/env python
# mutagen currently supports python 2.x only
# Install using pip:
# pip install mutagen
from mutagen.mp3 import MP3
import sys
for fn in sys.argv[1:]:
View manipulate_text.py
#!/usr/bin/env python3
import sys
def read_file(fname):
try:
data = open(fname).read()
return data
except:
return -1
View analyze_mp3.py
#!/usr/bin/env python3
import sys
def get_mp3_tag(fname):
try:
f = open(sys.argv[1], 'rb')
except Exception as e:
return(e, 1)
View aget-0.4-fix_build_hostent.diff
Index: Head.c
===================================================================
--- Head.c
+++ Head.c 2009-11-10 02:33:35.000000000 +0100
@@ -55,7 +55,7 @@
hstrerror(h_errno));
exit(1);
}
- strncpy(req->ip, inet_ntoa(*(struct in_addr *)he->h_addr), MAXIPSIZ);
+ strncpy(req->ip, inet_ntoa(*(struct in_addr *)he->h_addr_list[0]), MAXIPSIZ);
View encrypt_loopback.txt
# load required kernel modules
modprobe cryptoloop
modprobe aes
# Create loopback filesystem (change count according to your requirement)
dd if=/dev/urandom of=enc.img bs=1M count=50
# Setup password and create loopback device
losetup -e aes /dev/loop0 enc.img
View .muttrc
set ssl_use_sslv2=no
set ssl_use_sslv3=yes