Pengenalan Smart Card

Sebetulnya saya masih baru di bidang ini bisa dibilang 10 bulan + 9 bln berjalan. Akan tetapi alhamdulillah, dalam waktu yg singkat tersebut saya telah berhasil menjalankan beberapa project kecil, ya scope kecil saja, yg bisa dibilang -insyaAllah- mewakili smart card atau kartu pintar. Saya hendak jelaskan ini terlebih dahulu daripada nanti saya dibilang sok tau hehehe..

Jadi artikel ini dibuat berdasarkan pengalaman saya sendiri sebagai seorang programmer/developer kartu pintar dan dibuat mengalir saja tanpa bahasa resmi dan saklek, mkn sekali2 saya akan membuka referensi..

Oh ya, latar belakang smart card saya di Low Level (Implementasi T=0, T=1, T=CL type A & B semuanya di samsung chip, mixed mode) dan di High Level khususnya java card (e-KTP versi company saya tapinya , beberapa proyek ID/loyalti dan berikutnya ke pembayaran/EMV based). Dengan latar belakang 19 bulan berjalan bisa dibilang saya masih newbie gan… Continue reading

Posted in Smart Card | Tagged , | 2 Comments

A Simple Crypto Tool (SmartConverter)

Had not updated this blog for long time. Well I just finished creating a simple crypto tool using openssl and crc. Probably it’s quite helpful for you. You can download it here.

Please note that the HMAC sha1, ripemd, rsa decrypt and encrypt have not been tested yet.

I am planning to upload the code to GitHub or LaunchPad, however the code still not cooked yet, if you need one Continue reading

Posted in C/C++, Programming, Tools | Tagged , , , , , , , , , | Leave a comment

WPA2-PSK Portable Hotspot Android Froyo 2.2

I was confused why windows 7 ultimate x86 cannot detect my Android portable hotspot when set to WPA2-PSK mode. Oh well I finally figured it out. My android is galaxy ace with froyo 2.2 virgin.

After you setup your android portable hotspot, from settings->wireless and networks->tethering and portable hotspot->Mobile AP Settings, here choose WP2-PSK and enter your password minimum 8 characters. Then move back one time and enable portable hotspot.

On windows do these steps. Pictures talk thousand words :D . Good luck!
Continue reading

Posted in Android, Trouble-Shoot | Tagged , , , , | Leave a comment

ATR Decoder

To refresh my minds in smart cards area, I decided to write an ATR decoder. Since that I have decided to focus myself on one of the scripting languages, that is Python, I decided to write an ATR decoder.

You can download here for python version, it is based on Smart Card Handbook, Third Edition Wolfgang Rankl and Wolfgang Effing, Giesecke & Devrient GmbH, Munich, Germany. Or in C, I wrote it last year during my first time learning smart card, download here.

Here’s the test result: Continue reading

Posted in Exercise, Programming, Python, Smart Card | Tagged , , | Leave a comment

Sorting a List of Tuples and Dictionary

So not to forget. I am doing basic exercise from here.

If you have a list of tuples:

undordered_list = [(1, 3), (3, 2), (2, 1)]

If you want to sort it based on the second tuple key, one of the solution could be:

def sort_last(a_list_of_tuples):
output = sorted(a_list_of_tuples, key=lambda keys:keys[1])
return output

the function above will sort the unordered_list based on the second key (keys[1]) of each tuple.

Now what about dictionary? Continue reading

Posted in Programming, Python | Tagged , , | Leave a comment

Misconception in C++

Continue reading

Posted in C/C++, Programming | Tagged , , , | Leave a comment

ORA-12560: TNS:protocol adapter error occurs (Oracle Newbie 101)

After so many years (hyperbolic :p) not touching database, my current job seems to force me to learn Oracle more. After installing the 10g Express Edition on windows XP, I could connect to the server using sqlplus if only it is on the BIN folder, however any directory besides that one cannot.

C:\oraclexe\app\oracle\product\10.2.0\server\BIN>sqlplus hr/hr

SQL*Plus: Release 10.2.0.1.0 – Production on Wed Jan 5 13:19:43 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 – Production

SQL> quit
Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 – Production

However from any directory cannot and ORA-12560: TNS:protocol adapter error occurs.

C:\oraclexe\app\oracle\product\10.2.0\server\BIN>cd \

C:\>sqlplus hr/hr

SQL*Plus: Release 10.2.0.1.0 – Production on Wed Jan 5 13:20:01 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:
ORA-12560: TNS:protocol adapter error

Enter user-name:

How to solve this? Continue reading

Posted in Oracle, Programming, Trouble-Shoot | Tagged , , | Leave a comment

Grep Exercise (From “UNIX® Shells by Example Fourth EditionBy Ellie Quigley”)

With the same text file from the previous post we have these questions:

  1. Print all lines containing the string San.
  2. Print all lines where the person’s first name starts with J.
  3. Print all lines ending in 700.
  4. Print all lines that don’t contain 834.
  5. Print all lines where birthdays are in December.
  6. Print all lines where the phone number is in the 408 area code.
  7. Print all lines containing an uppercase letter, followed by four lowercase letters, a comma, a space, and one uppercase letter.
  8. Print lines where the last name begins with K or k.
  9. Print lines preceded by a line number where the salary is a six-figure number.
  10. Print lines containing Lincoln or lincoln (remember that grep is insensitive to case).

and my answers are: Continue reading

Posted in Exercise, Grep, Linux, Programming | Tagged , , | Leave a comment

Everyday useful sed command

If you have this text file containing:

█▓▒░bondhan@optimus-prime█▓▒░ Wed Dec 22 14:00:23
/media/BONDHAN_4GB/workspace/grep_exercise/ cat grep_exercise.sh
1. Print all lines containing the string San.
2. Print all lines where the person’s first name starts with J.
3. Print all lines ending in 700.
4. Print all lines that don’t contain 834.
5. Print all lines where birthdays are in December.
6. Print all lines where the phone number is in the 408 area code.
7. Print all lines containing an uppercase letter, followed by four lowercase letters, a comma, a space, and one uppercase letter.
8. Print lines where the last name begins with K or k.
9. Print lines preceded by a line number where the salary is a six-figure number.
10. Print lines containing Lincoln or lincoln (remember that grep is insensitive to case).

If you want to append word echo “ in front of each line and add the at the end of each line, then this is the command:

sed -e ‘s/^[ \t]*/echo \”/g’ -e ‘s/\.$/\”/g’ grep_exercise.sh

The command above will search for a blank line or tab at the beginning of each line then replace with echo “ and then after -e flag the it will find at the end of each line (.$) and replace with ” (\”).

The result: Continue reading

Posted in Linux, Programming, Sed | Tagged , | Leave a comment