Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [+] Simple Program : Java [+]
- * Send Text / SMS Bomber via Javax Mail
- This could be I guess converted into a Java SMS bomber if you want to add a bit to the source.
- You will need to add an External Jar "The javax.mail jar which can be found here:
- https://java.net/projects/javamail/pages/Home
- ====================================
- import java.util.*;
- import javax.mail.*;
- import javax.mail.internet.*;
- public class Main {
- //Using Gmail for this Entire Example
- private static String USER_NAME = "4nti@gmail.com"; // Gmail Username (example only)
- private static String PASSWORD = "YourPassword"; // GMail password (example only)
- private static String RECIPIENT = "PHONENUMBERHERE"; //Targets Phone number + Provider such as 1112223333@vtext.com (I'm Using Verizon as example)
- public static void main(String[] args) {
- String from = USER_NAME;
- String pass = PASSWORD;
- String[] to = { RECIPIENT@gmail.com }; // list of recipient email address(es)
- String subject = "Subject Of Your Message";
- String body = "YourMessageHere"; // Message that will be Sent
- sendFromGMail(from, pass, to, subject, body);
- }
- private static void sendFromGMail(String from, String pass, String[] to, String subject, String body) {
- Properties props = System.getProperties();
- String host = "smtp.gmail.com"; //Using gmail for this example if you have your own setup you could use this to spam a persons phone
- props.put("mail.smtp.starttls.enable", "true");
- props.put("mail.smtp.host", host);
- props.put("mail.smtp.user", from);
- props.put("mail.smtp.password", pass);
- props.put("mail.smtp.port", "587"); //If you change from gmail they might use a different port
- props.put("mail.smtp.auth", "true");
- Session session = Session.getDefaultInstance(props);
- MimeMessage message = new MimeMessage(session);
- try {
- message.setFrom(new InternetAddress(from));
- InternetAddress[] toAddress = new InternetAddress[to.length];
- // Getting the Array of Addresses
- for( int i = 0; i < to.length; i++ ) {
- toAddress[i] = new InternetAddress(to[i]);
- }
- for( int i = 0; i < toAddress.length; i++) {
- message.addRecipient(Message.RecipientType.TO, toAddress[i]);
- }
- message.setSubject(subject);
- message.setText(body);
- Transport transport = session.getTransport("smtp");
- transport.connect(host, from, pass);
- transport.sendMessage(message, message.getAllRecipients());
- transport.close();
- }
- catch (AddressException ae) {
- ae.printStackTrace();
- }
- catch (MessagingException me) {
- me.printStackTrace();
- }
- }
- }
- ================
- -End-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement