Tuesday, January 25, 2011

How to quickly and easily download youtube video

This trick will only be felt if you use the Linux operating system. It is very easy, simply use the existing browser, eg Mozilla Firefox or another browser.




The following process sequence:
1. Open your favorite browser
2. Type the address youtube.com
3. Allow it to finish spinning video
4. Open the / tmp directory on your computer, there will appear a file. flv is the result of streaming from youtube.com
5. Do not forget to quickly copy a file to another place, because after the computer restarts also missing file in the directory / tmp



Easy to do, so no need to use additional software to take a video on youtube. Good luck.
Read More

Thursday, October 21, 2010

SSH via web with JAVA


If at any time, you have problems with SSH in your workplace. Maybe the admin on your premises to close specific ports eg 443 or 22. This method can be effective, but there are a few tricks to put into the public html server. Maybe the hackers in cyberspace can help.

Okay, ready to empty file can use vi, vim, pico (editor unix) or notepad (windows). type the following script:


<html>

<body>

<APPLET CODE="com.mindbright.application.MindTerm.class" ARCHIVE="mindterm.jar" WIDTH=0 HEIGHT=0>

<PARAM NAME="sepframe" value="true">
<PARAM NAME="x11fwd" value="true">
<PARAM NAME="port" value="7575">

</APPLET>

</body>

</html>

give file name eg javassh.html

as supporting files, you can support the jar file (mindterm.jar). You can search via google.

good luck.


Read More

Wednesday, September 8, 2010

PHP Validate Form

Making the form on the php impressed casual. But one time we faced a problem with the validation of that form, eg filling of data can not be empty. Here are some scripts that can be used to check the validation of a form, especially checking space which can become the things we missed.

To make it easier, can be made a separate file with the parent file. suppose check.inc and later called in the php file using the command required


function check_not_empty($s, $include_whitespace = false)
{
if ($include_whitespace) {
// make it so strings containing white space are treated as empty too
$s = trim($s);
}
return (isset($s) && strlen($s)); // var is set and not an empty string ''
}
?>

Read More

Tuesday, September 7, 2010

Email Services : Linux Ubuntu Server 10.04 Chapter 5

The process of getting an email from one person to another over a network or the Internet involves many systems working together. Each of these systems must be correctly configured for the process to work. The sender uses a Mail User Agent (MUA), or email client, to send the message through one or more Mail Transfer Agents (MTA), the last of which will hand it off to a Mail Delivery Agent (MDA)
for delivery to the recipient's mailbox, from which it will be retrieved by the recipient's email client, usually via a POP3 or IMAP server.


1. POSTFIX
Postfix is the default Mail Transfer Agent (MTA) in Ubuntu. It attempts to be fast and easy to administer and secure. It is compatible with the MTA sendmail. This section explains how to install and configure postfix. It also explains how to set it up as an SMTP server using a secure connection(for sending emails securely).
To install postfix run the following command:
yoyok@yoyok-server:~$ sudo apt-get install postfix

To configure postfix, run the following command:
yoyok@yoyok-server:~$ sudo dpkg-reconfigure postfix
The user interface will be displayed. On each screen, select the following values:
• Internet Site
• mail.example.com
• steve
• mail.example.com, localhost.localdomain, localhost
• No
• 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24
• 0
• +
• all

By default Postfix will use mbox for the mailbox format. Rather than editing the configuration file directly, you can use the postconf command to configure all postfix parameters. The configuration parameters will be stored in /etc/postfix/main.cf file. Later if you wish to re-configure a particular parameter, you can either run the command or change it manually in the file.
To configure the mailbox format for Maildir:
sudo postconf -e 'home_mailbox = Maildir/'

SMTP Authentication
SMTP-AUTH allows a client to identify itself through an authentication mechanism (SASL).
Transport Layer Security (TLS) should be used to encrypt the authentication process. Once authenticated the SMTP server will allow the client to relay mail.
1. Configure Postfix for SMTP-AUTH using SASL (Dovecot SASL):
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_sasl_type = dovecot'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_sasl_path = private/auth-client'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_sasl_local_domain ='
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_sasl_security_options = noanonymous'
yoyok@yoyok-server:~$ sudo postconf -e 'broken_sasl_auth_clients = yes'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_sasl_auth_enable = yes'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_sudo postconf -e 'inet_interfaces = all'


yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_tls_auth_only = no'
yoyok@yoyok-server:~$ sudo postconf -e 'smtp_use_tls = yes'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_use_tls = yes'
yoyok@yoyok-server:~$ sudo postconf -e 'smtp_tls_note_starttls_offer = yes'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_tls_key_file = /etc/ssl/private/server.key'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_tls_cert_file = /etc/ssl/certs/server.crt'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_tls_loglevel = 1'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_tls_received_header = yes'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
yoyok@yoyok-server:~$ sudo postconf -e 'tls_random_source = dev:/dev/urandom'
yoyok@yoyok-server:~$ sudo postconf -e 'myhostname = mail.example.com'
yoyok@yoyok-server:~$ sudo postconf -e 'smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem'


The postfix initial configuration is complete. Run the following command to restart the postfix daemon:
yoyok@yoyok-server:~$ sudo /etc/init.d/postfix restart
To see if SMTP-AUTH and TLS work properly, run the following command:
telnet mail.example.com 25
After you have established the connection to the postfix mail server, type:
ehlo mail.example.com
If you see the following lines among others, then everything is working perfectly. Type quit to exit.
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME

Read More