$14B (yes, that is a Billion dollars!!)
That is the drop in Google’s market capitalization, when R.R.Donnelly released Google’s quarterly results earlier than intended 🙂
$14B (yes, that is a Billion dollars!!)
That is the drop in Google’s market capitalization, when R.R.Donnelly released Google’s quarterly results earlier than intended 🙂
Following up on my earlier post about using keytool to import and export certificates into a keystore. Here is some more information on using openssl to download the certificate from a remote server and then using keytool to import it into the keystore.
keytool needs the certificate to be in X509 format, so we will use sed to format the certificate.
[code]echo -n | openssl s_client -connect HOST:PORTNUMBER | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ > /tmp/$SERVERNAME.cert [/code]
breaking down the command
[code]echo -n[/code]
send an end of line signal to openssl. This allows openssl (or rather the server it is trying to connect to) to disconnect the session
[code]openssl s_client -connect HOST:PORTNUMBER[/code]
asks openssl to act as a client and connect to the HOST on the specificed PORTNUMBER
[code]sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ [/code]
asks sed to take the input from openssl and only output the content between BEGIN CERTIFICATE and END CERTIFICATE.
NOTE: If you get an error like “SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert unexpected message”, it means the server doesn’t support SSL negotation. Using the command option -no_tls1 helps work around this error. This option will tell openssl to disable TLS1 negotiation.
Quick update on the races Jhanvi and I ran so far this year. And yes, she kicked my butt in all of them as usual 🙂
Showing off our medals in the train back home.. It was painful 🙂Â
Endomondo’s view of how I ranÂ
This is the third time, I am running this trail half marathon. And for the first time, I actually did better than the last race. And it was mainly due to Jhanvi encouraging me to practice. Not my best time, but better than last year 🙂
Quick post on using diff to compare two directories in Linux. This will show the list of files and subdirectories that are different in either directories
[code]diff /PATH_TO_FIRST_DIRECTORY /PATH_TO_SECOND_DIRECTORY -r –brief  [/code]
Options used
If you want to grep for certain http response codes in a apache log file
Details of the options
tells grep to look for space or tab before the specified string, which in this case is 200.
The net is up in arms about a new release from team Ghostshell of compromise data. Details of the leak can be found at http://www.theregister.co.uk/2012/08/28/team_ghostshell_megahack/ and the source of the data is at http://pastebin.com/BuabHTvr .
I thought I would put my nascent python skills to use and write a simple script to parse through the release and download all the data. Hoping to analyze it later on. It is pretty basic, but does the job of parsing the release and downloading the content. You can get the script at https://github.com/kudithipudi/Misc-Scripts/blob/master/parseHellfire.py
Watch out for an analysis of the content soon :).
Simple one liner to check if your web server is using strong ciphers
[code]
openssl s_client -cipher LOW -host SERVER_NAME -port 443 [/code]
Simple script in python to look for credit card numbers in a file.
[code]
#Importing modules
import re
import os
# Define variables
inputFile = ‘test.txt’
searchPattern = ‘((\D(6011|5[1-5]\d{2}|4\d{3}|3\d{3})\d{11,12}\D)|(^(6011|5[1-5]\d{2}|4\d{3}|3\d{3})\d{11,12}\D))’
tempinputFile = open(inputFile)
tempLine = tempinputFile.readline()
while tempLine:
print ("LINE: " + tempLine)
foundContent = re.search(searchPattern,tempLine, re.IGNORECASE)
if foundContent:
print("FOUND: " + foundContent.group())
tempLine = tempinputFile.readline()
tempinputFile.close() [/code]
The script started out as a simple check for any 16 digit numbers that had a non numeric character on either end. But I tweaked it a little bit to look for credit card like numbers using the regex from http://www.regular-expressions.info/creditcard.html. Finally I added an option to match credit card like numbers if the numbers start at the beginning of the line (i.e there is no non-numeric number before the credit card number)
Actually, this is more of a read on the web post. New acronym for describing technology that doesn’t really help
CBT : Cock-n-Bull Technology
🙂