Category Archives: Programming

Convert pkcs12 key to bks format for Android

Dear Reader,

If you ever want to convert a pkcs12 format key to bks format for Android follow the below instructions.

First of all downlaod bcprov-jdk16-1.46.jar file

[root@itpings certs]# wget
–2017-06-30 17:05:40–
Resolving (…
Connecting to (||:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1876535 (1.8M) [application/java-archive]
Saving to: ‘bcprov-jdk16-1.46.jar’

bcprov-jdk16-1.46.j 100%[===================>] 1.79M –.-KB/s in 0.02s

2017-06-30 17:05:40 (89.3 MB/s) – ‘bcprov-jdk16-1.46.jar’ saved [1876535/1876535]

Now Convert the File as follow with keytool

[root@itpings certs]# keytool –importkeystore –srckeystore user.P12 -srcstoretype pkcs12 –destkeystore user.bks –deststoretype bks –provider org.bouncycastle.jce.provider.BouncyCastleProvider -–providerpath bcprov-jdk16-1.46.jar
Enter destination keystore password:
Re-enter new password:
Enter source keystore password:
Entry for alias 1 successfully imported.
Import command completed: 1 entries successfully imported, 0 entries failed or cancelled
[root@itpings certs]# ls


Salman Aftab
YouTube: LinuxKing
FaceBook: LZHProject

Python for Linux Admins – IV

Simple Python Script which will show linux logs (dmesg and lastlog) from selection.

#!/usr/bin/env python

import os

os.system (‘clear’)

print “Pylog Created by Hyp3ri0n”

print “Version 0.1”

print “Respect Linux…………….”

print “=” * 50

print ” ”

value = 1

value2 = 2

answer = int(input (“Enter the Value 1 or 2: “)

if answer == value:

os.system (‘tail -20 /var/log/dmesg’)

if anwer == value2:

os.system (‘lastlog -u 0 && lastlog -u 1001-10000’)