1 / 18

IKO31204 Pemrograman Sistem Jilid 3: Scripting II & Pengayaan

IKO31204 Pemrograman Sistem Jilid 3: Scripting II & Pengayaan Fakultas Ilmu Komputer - Universitas Indonesia Sep 2011. topik. enkripsi dengan GnuPG loop & array dengan awk latihan scripting & awk. enkripsi GnuPG. enkripsi GnuPG. step 1 :: Create a new key-pair # gpg --gen-key

Download Presentation

IKO31204 Pemrograman Sistem Jilid 3: Scripting II & Pengayaan

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IKO31204 Pemrograman Sistem Jilid 3: Scripting II & Pengayaan Fakultas Ilmu Komputer - Universitas Indonesia Sep 2011

  2. topik enkripsi dengan GnuPG loop & array dengan awk latihan scripting & awk

  3. enkripsi GnuPG

  4. enkripsi GnuPG step 1 :: Create a new key-pair # gpg --gen-key step 2 :: Export pub-key Anda # gpg --armor --export [Email UI Anda] > public-key.txt

  5. enkripsi GnuPG step 3 :: Import pub-key org lain # gpg --import PUB_KEY_ORG_LAIN step 4 :: Enkripsi berkas dg pub-key org lain # gpg --recipient dosen@sysprog.com --armor --encrypt FILE_ASLI (menghasilkan FILE_ASLI.asc)

  6. dekripsi GnuPG step 5 :: Mendapatkan FILE_ASLI # gpg --decrypt FILE_ASLI.asc > HASIL

  7. contoh GnuPG Mengambil dosen-sysprog.pub # wget https://projects.ui.ac.id/attachments/961/dosen-sysprog.pub Import dosen-sysprog.pub # gpg --import dosen-sysprog.pub Coba encrypt file pada WORK/TEST/ # cd WORK/TEST # cp ../A1/challenge.txt . # gpg --recipient dosen@sysprog.com --armor --encrypt challenge.txt # ls -al

  8. awk BEGIN { /** inisiasi */ } { /** proses thd-baris-input */ } END { /** finally */ }

  9. internal variable awk # man awk ARGC, ARGV, FNR, FS, NF, NR, RS, dll

  10. contoh awk

  11. loop dlm awk for (initialization; condition; increment) { body } initialization while (condition) { body increment }

  12. loop dlm awk for (ii in array) { do something with array[ii] }

  13. contohloop dlmawk

  14. array dlm awk array[subscript] = value subscript :: Index, cth: array[0], array[1], dst String, cth: array[“jml”], array[“cnt”]

  15. bash + awk # vi a.sh ---------------------------- #!/bin/bash awk 'BEGIN { A=”tes”;} {} END {print A;}' $1 ---------------------------- # chmod 755 a.sh # ./a.sh [some-text-file]

  16. contohkasus gunakan AWK

  17. https://projects.ui.ac.id/attachments/962/access-3.1.log.gz ada berapa IP unik ? berapa HIT per IP ? berapa byte per IP yg didownload ? IP mana yang paling sering download ? pada jam & menit berapa total byte didownload paling banyak ? Cth: 09:53 28881 09:54 2002833 09:55 39937474

  18. tanya jawab

More Related