snippetjournal

– notes, snippet codes, and my journal

Joke : How to Measure Quality code – WTF/minute

leave a comment »

Written by snippetjournal

May 26, 2015 at 3:05 am

Posted in Collection Link, Opini

Tagged with ,

Email Spoofing

leave a comment »

Secara singkat email spoofing artinya mengirim email dengan domain email address yang sebenar nya tidak pernah ada. misalnya ingin mengirim email dari ucup@bajajbajuri.com, padahal email dan domain dari bajajbajuri tidak pernah ada.

Feature email spoofing sangat bergantung dengan SMTP yang kita gunakan untuk mengirim email. saya mencoba dengan gmail dan tentu saja tidak bisa :D. jadi saran saya gunakan SMTP server yang lain, saya mencoba dengan SMTP server smtp2go, anda bisa mengambil paket gratis untuk uji coba.

berikut code java yang saya gunakan, hasil copas dari mkyong.com :D


 //testing smtp2go
 final String username = "xx.xx@gmail.com";
 final String password = "xx";

 Properties props = new Properties();
 props.put("mail.smtp.auth", "true");
 props.put("mail.smtp.starttls.enable", "true");
 props.put("mail.smtp.host", "smtpcorp.com");
 props.put("mail.smtp.port", "2525");
 
 Session session = Session.getInstance(props,
 new javax.mail.Authenticator() {
 protected PasswordAuthentication getPasswordAuthentication() {
 return new PasswordAuthentication(username, password);
 }
 });

 try {

 Message message = new MimeMessage(session);
 //domain email address must exist
 InternetAddress from = new InternetAddress("no-reply@travel.com", "xx Travel Company");
 message.setFrom(from);
 message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("aditya.kaha@gmail.com"));
 message.setSubject("Testing Subject");
 message.setText("Dear Mail Crawler,"+ "\n\n No spam to my email, please!");

 Transport.send(message);

 System.out.println("Done");

 } catch (MessagingException e) {
 throw new RuntimeException(e);
 } catch (UnsupportedEncodingException e) {
 e.printStackTrace();
 }
 
 

Edit :

ternyata setelah dilakukan testing, jika kita melakukan email spoofing sudah dipastikan email dengan domain address hasil spoofing akan dikategorikan spam, karena penyedia layanan email seperti gmail dan yahoo sudah cukup canggih dan email spoofing ini memang biasanya di peruntukan untuk hal hal negatif seperti spamming.

Karena seingat saya pada waktu sekitar tahun 2006-2009 email spoofing masih bisa kita gunakan. cara lain untuk atau solusi lain adalah dengan menyediakan form user untuk meng-config email pribadi nya sebagai email broadcast dari sistem, kita cukup memberikan konfigurasi SMTP gmail dan yahoo sebagai email yang umum digunakan, selebihnya bisa diberikan menu advance/other untuk alamat email selain gmail dan yahoo agar user dapat meng-konfigurasikan SMTP emailnya masing masing.

sekian, byee, happy coding  :D

Written by snippetjournal

May 22, 2015 at 7:10 am

Security Web Application Tools

leave a comment »

Written by snippetjournal

May 21, 2015 at 4:15 am

Composite Key reference

leave a comment »

Written by snippetjournal

May 8, 2015 at 10:22 am

Posted in Collection Link

Tagged with , ,

A Story of Meetting a Clipper era programmer.

leave a comment »

It is my new journey to surabaya met with some old programmer in clipper era, it was amusing yet frightened me about what he build, amaze and scary at the same time, he build an enterprise system using some clipper and delphi and he not the kind of person that like to update to new tech or new concept in software development.

He was explain about how he build the system, from technical point and concept in his era and his English is not so good, at that time internet not are wide spread like now and software dev reference and materials are  not easily accessed. I amazed that he can build a big system with limited knowledge, and yes he know the consequences and what he do is bad way to develop software.

He told me that doesn’t have standard when build software from technical and concept, and yet he is a good old man i think. but it was a horror story for my technical point of view, imagine if you get task to maintain the software and off course there is no documentation LOL.

Written by snippetjournal

May 8, 2015 at 10:18 am

Posted in Personal

Tagged with

BootStrap Dialog pop Up example

leave a comment »

I found some good resource about example bootstrap pop up dialog, you can find many good example from the link.

the credit to the kindly cooder who wrote the example :)

Written by snippetjournal

April 28, 2015 at 4:34 am

Posted in Collection Link

Tagged with , ,

Session in Spring MCV

leave a comment »

It good article about session in spring mvc, so i bookmarked in my blog :D

What is the HTTP session? What for it exist? I hope you know that HTTP is a stateless protocol, that’s mean that there is no permanent connection between a browser and server. And as the result server doesn’t know who is an initiator of a request, even if an application has just one user. The session is a tool for identifying of requests author. The previous sentence is rough enough, but it explains the main purpose of the sessions. Every user gets it own session with unique identifier when he visits site first time.

Written by snippetjournal

March 26, 2015 at 3:04 am

Posted in Programming

Tagged with ,

Follow

Get every new post delivered to your Inbox.

Join 80 other followers