Posts Tagged ‘Tutorial’

enkripsi Triple Des dan Kompresi LZSS

Here i’ll try to shared about coding at triple des and lzss compression.

This is the sample

<?php
include_once(“des/YI_DES.class.php”;);
include_once(“lzss/YI_LZSS_Com.class.php”;);
$enkrip   = new YI_DES();
$kompres  = new YI_Compress();
$password = $_POST['password'];
$temp     = “temp/”;
$down     = “download/”;
$enkrip -> cekSession(reg_userName);
if (is_uploaded_file($_FILES['file']['tmp_name'])) {
if ($_POST['waktu'] > 240) set_time_limit(240); else set_time_limit($_POST['waktu']);
try {
$file_name  = $_FILES['file']['name'];  //Returns the Actual Name of the File.
$file_name  = str_replace(“.”, “~”, $file_name);
$ext        = substr($file_name, -3, 3);
copy($_FILES['file']['tmp_name'], $temp . $file_name);  //Copy dari server temporary
if (filesize($temp . $file_name) <= 0) {
throw new exception(“Maaf, File tidak boleh kosong”;);
}
$fr   = fopen($temp . $file_name, “rb”;);
$isi  = fread($fr, filesize($temp . $file_name));
fclose($fr);
if ($password == “”;) {
throw new exception(“Maaf, password tidak boleh kosong”;);
}
if (strlen($password) <= 7) {
throw new exception(“Maaf, password tidak boleh kurang dari 8 karakter”;);
}
for ($i=0;$i<=strlen($password);$i++) {
if (strpos($password, chr(63), $i) AND strpos($password, chr(03), $i+1)) {
throw new exception(“Maaf, password tidak boleh menggunakan karakter ? dan _”;);
}
}
$header = $kompres -> get_head_info($isi);
if ($header != “”;) {
throw new exception(“Maaf, file sudah dienkripsi”;);
}
$waktu_mulai    = microtime(TRUE);
$hasil_kompres  = $kompres -> compress($temp . $file_name);
$hasil_enkrip   = $enkrip -> des($password, $hasil_kompres, 1, 1, null);
//tulis file akhir proses kompresi dan enkripsi ditambah dengan header
// Format Header File : YI_DL$ext$key?
$hdr    = “YI_DL” . $ext . $password . “?”;
$header = $enkrip -> enc_head($hdr);
$file_kom       = $down . basename($file_name) . “.YI_DLZ”;
$akhir  = strrev($header . “|” . $hasil_enkrip);
$fw     = fopen($file_kom, “wb”;);
fwrite($fw, $akhir);
fclose($fw);
$waktu_selesai  = microtime(TRUE);
$waktu          = $waktu_selesai – $waktu_mulai;
$file_asli    = $temp . $file_name;
$file_proses  = $down . $file_name . “.YI_DLZ”;
//laporan (proses, file asli, file proses, variabel hasil proses, waktu)
$kompres -> laporan(“enkrip”, $file_asli, $file_proses, $akhir, $waktu);
}
catch (Exception $e) {
$enkrip -> error($e);
}
}
else
$enkrip -> error2(“Maaf, Anda belum memasukkan file”;);
?>

i’ve use this code, and if there is a some code is wrong plese tell me.

Thanks

tutorial codeigniter dasar part 2

Pada tutorial kemarin, kita udah bisa menambahkan data ke dalam database… (Create) dan menampilkannya (semua data)…. Sekarang, kita akan membuat aksi lainnya, yaitu update/ubah dan delete/hapus pada setiap data di dalam sebuah table…

Kita lanjutkan tutorial kemarin (Tutorial CodeIgniter Dasar Part I) yang waktu itu kita udah membuat table mahasiswa dan membuat fungsi untuk menambahkan datanya.. sekarang mari kita buat fungsi/aksi lainnya, yaitu update dan delete…

Kita review hasil kerjaan dari tutorial kemarin…
Read the rest of this entry »

zeroshell sebagai alternatif radius server

Fitur & Fungsi Zeroshell:

1.Load Balancing and Failover of multiple Internet connections;
2.UMTS/HSDPA connections by using 3G modems;
3.RADIUS server for providing secure authentication and automatic management of the encryption keys to the Wireless 802.11b, 802.11g and 802.11a networks supporting the 802.1x protocol in the EAP-TLS, EAP-TTLS and PEAP form or the less secure authentication of the client MAC Address; WPA with TKIP and WPA2 with CCMP (802.11i complaint) are supported too; the RADIUS server may also, depending on the username, group or MAC Address of the supplicant, allow the access on a preset 802.1Q VLAN;

Zeroshell gak perlu diinstall, bisa langsung dijalankan dalam beberapa mode :

1. Boot CD
2. Boot CD via VMWare
3. Boot pake Flashdish
4. Langsung Install di HD

Read the rest of this entry »

instalasi cpanel

  1. Download script instalasi

    - cd /home
    - wget http://layer1.cpanel.net/latest
    - sh latest
    - Proses instalasi cpanel akan berjalan, silahkan tunggu kira-kira 3jam (tergantung bandwith internet anda). Server akan dikonfigurasi otomatis

  2. Saat proses selesai, berarti instalasi cpanel anda telah berhasil
  3. Download ISO Centos dari cpanel,

    http://layer1.cpanel.net/CentOS-5.0-i386-bin-DVD-cPanel.iso

  4. Burn dalam DVD
  5. Server boot dari DVD ang barusan dibuat (direkomendasikan install OS yang FRESH (baru))
  6. Konfigurasi server saat install
    - Ikuti step-step instalasi, isikan dengan default saja
    - Install dengan minimal install, tidak boleh ada Apache, MySQL, DNS dan sejenisnya
    - Jangan install XWindows, karena server akan lebih berat dan akan membuka hole security
    - lihat referensi disini
  7. Kira-kira 30 menis instalasi OS Centos 5.1 akan selesai
  8. Lakukan setup dasar secukupnya
    - IP LAN, dengan perintah : system-config-network

instalasi ispcp pada debian

alternatif pengganti cPanel sebagai control panel untuk domain anda :D
Jalanin command berikut :

#apt-get install aptitude

apt-get sama dengan aptitude

BAB 1 : Installation

1. Update your packages list:

# aptitude update

2. Install needed repository key:

# aptitude install debian-backports-keyring

3. Install the new Apache fcgid module version:

# aptitude -t etch-backports install libapache2-mod-fcgid

Read the rest of this entry »