Skip to content

Instantly share code, notes, and snippets.

View PriyantoDeb's full-sized avatar

Priyanto Deb PriyantoDeb

View GitHub Profile
@PriyantoDeb
PriyantoDeb / newcert.py
Created June 28, 2021 05:34 — forked from Zeerg/newcert.py
Python script to generate CSR/Self Signed Cert. Needs pyOpenssl and python-whois
#!/usr/bin/python
from OpenSSL import crypto
import os
import sys
import datetime
import whois
#Variables
TYPE_RSA = crypto.TYPE_RSA
TYPE_DSA = crypto.TYPE_DSA
@PriyantoDeb
PriyantoDeb / tool.py
Created September 7, 2019 11:11 — forked from mimoo/tool.py
encrypt with AES in python using pycrypto lib
import argparse, os, sys
from Crypto.Cipher import AES
from Crypto.Hash import HMAC
from Crypto.Protocol.KDF import PBKDF2
# check arguments
parser = argparse.ArgumentParser()
parser.add_argument("file", help="the file we want to encrypt/decrypt")
parser.add_argument("key", help="your key")
@PriyantoDeb
PriyantoDeb / quick_sort.c
Created June 29, 2016 15:55 — forked from mbalayil/quick_sort.c
Quick Sort using recursion in C
/** Divide : Partition the array A[low....high] into two sub-arrays
* A[low....j-1] and A[j+1...high] such that each element
* of A[low....j-1] is less than or equal to A[j], which
* in turn is is less than or equal to A[j+1...high]. Compute
* the index j as part of this partitioning procedure.
* Conquer : Sort the two sub-arrays A[low....j-1] and A[j+1....high]
* by recursive calls to quicksort
**/
#include<stdio.h>