Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Java] Unfinished CEF RS Spammer [SRC]

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
TROLOLOLOLOLOLOLOLOLOLOLO
Expert Cheater
Reputation: -1

Joined: 27 Dec 2009
Posts: 100

PostPosted: Wed Aug 25, 2010 4:07 pm    Post subject: [Java] Unfinished CEF RS Spammer [SRC] Reply with quote

Code:
package rsspammer;

public class Main {

    public static void main(String[] args) {
        UI userInterface = new UI();
        userInterface.setLocationRelativeTo(null);
        userInterface.setVisible(true);
    }
}

Code:
package rsspammer;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import javax.swing.JOptionPane;

public class UI extends javax.swing.JFrame {

    private URL url;
    private URLConnection conn;
    private OutputStreamWriter wr;
    private BufferedReader rd;
    private String response, data, sid;
    private StringBuilder strBuild;
    private Boolean blSpamming = false;
    private short s = 0;

    public UI() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
    private void initComponents() {

        btnLogin = new javax.swing.JButton();
        txtUsername = new javax.swing.JTextField();
        txtPassword = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        txtMsg = new javax.swing.JTextArea();
        txtSub = new javax.swing.JTextField();
        btnStop = new javax.swing.JButton();
        btnStart = new javax.swing.JButton();
        lblPosted = new javax.swing.JLabel();
        mnuBar = new javax.swing.JMenuBar();
        mnuFile = new javax.swing.JMenu();
        mnuItemAbout = new javax.swing.JMenuItem();
        mnuItemExit = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("CEF RS Spammer by CometJack");
        setResizable(false);

        btnLogin.setText("Login");
        btnLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLoginActionPerformed(evt);
            }
        });

        txtUsername.setText("Username...");

        txtPassword.setText("Password...");

        txtMsg.setColumns(20);
        txtMsg.setRows(5);
        txtMsg.setText("Message...");
        jScrollPane1.setViewportView(txtMsg);

        txtSub.setText("Subject...");

        btnStop.setText("Stop");
        btnStop.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStopActionPerformed(evt);
            }
        });

        btnStart.setText("Start");
        btnStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStartActionPerformed(evt);
            }
        });

        lblPosted.setText("Threads Posted: 0");

        mnuFile.setText("File");

        mnuItemAbout.setText("About");
        mnuItemAbout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemAboutActionPerformed(evt);
            }
        });
        mnuFile.add(mnuItemAbout);

        mnuItemExit.setText("Exit");
        mnuItemExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemExitActionPerformed(evt);
            }
        });
        mnuFile.add(mnuItemExit);

        mnuBar.add(mnuFile);

        setJMenuBar(mnuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE)
                    .addComponent(txtSub, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(btnLogin)
                                .addGap(18, 18, 18)
                                .addComponent(txtUsername, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(btnStart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnStop, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE)
                            .addComponent(txtPassword, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE)))
                    .addComponent(lblPosted))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnLogin)
                    .addComponent(txtUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnStop)
                    .addComponent(btnStart))
                .addGap(18, 18, 18)
                .addComponent(txtSub, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(lblPosted)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>                       

    private void mnuItemAboutActionPerformed(java.awt.event.ActionEvent evt) {                                             
        JOptionPane.showMessageDialog(null, "Programmed in Java by CometJack", "About", 1);
    }                                           

    private void mnuItemExitActionPerformed(java.awt.event.ActionEvent evt) {                                           
        System.exit(0);
    }                                           

    private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {                                         
        try {
            data = "&" + URLEncoder.encode("username", "UTF-8") + "=" + URLEncoder.encode(txtUsername.getText(), "UTF-8");
            data += "&" + URLEncoder.encode("password", "UTF-8") + "=" + URLEncoder.encode(txtPassword.getText(), "UTF-8");
            data += "&" + URLEncoder.encode("autologin", "UTF-8") + "=" + URLEncoder.encode("on", "UTF-8");
            data += "&" + URLEncoder.encode("redirect", "UTF-8") + "=" + URLEncoder.encode("", "UTF-8");
            data += "&" + URLEncoder.encode("login", "UTF-8") + "=" + URLEncoder.encode("Log+in", "UTF-8");

            url = new URL("http://forum.cheatengine.org/login.php");
            conn = url.openConnection();
            conn.setDoInput(true);
            conn.setDoOutput(true);
            wr = new OutputStreamWriter(conn.getOutputStream());
            wr.write(data);
            wr.flush();

            rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            strBuild = new StringBuilder();
            while ((response = rd.readLine()) != null) {
                strBuild.append(response);
            }
            if (!strBuild.toString().contains("You have specified an incorrect or inactive username, or an invalid password.")) {
                JOptionPane.showMessageDialog(null, "You have successfully logged in!", "Success", 1);
                sid = conn.getURL().toString().split("=")[1];
            } else {
                JOptionPane.showMessageDialog(null, "You have failed to logged in!", "Failure", 0);
            }
            strBuild.delete(0, strBuild.length());
            wr.close();
            rd.close();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e.getMessage(), "Exception", 0);
        }
    }                                       

    private void btnStartActionPerformed(java.awt.event.ActionEvent evt) {                                         
        if (!txtSub.getText().isEmpty() && !txtMsg.getText().isEmpty()) {
            blSpamming = true;
            try {
                data = URLEncoder.encode("mode", "UTF-8") + "=" + URLEncoder.encode("newtopic", "UTF-8");
                data += "&" + URLEncoder.encode("f", "UTF-8") + "=" + URLEncoder.encode("16", "UTF-8");
                data += "&" + URLEncoder.encode("sid", "UTF-8") + "=" + URLEncoder.encode(sid, "UTF-8");
                data += "&" + URLEncoder.encode("subject", "UTF-8") + "=" + URLEncoder.encode(txtSub.getText(), "UTF-8");
                data += "&" + URLEncoder.encode("message", "UTF-8") + "=" + URLEncoder.encode(txtMsg.getText(), "UTF-8");
                data += "&" + URLEncoder.encode("post", "UTF-8") + "=" + URLEncoder.encode("true", "UTF-8");

                url = new URL("http://forum.cheatengine.org/posting.php");
                conn = url.openConnection();
                conn.setDoInput(true);
                conn.setDoOutput(true);
                wr = new OutputStreamWriter(conn.getOutputStream());
                wr.write(data);
                wr.flush();
                wr.close();
                rd.close();
                s++;
                lblPosted.setText(String.format("Threads Posted: %d", s));
            } catch (Exception e) {
                blSpamming = false;
                JOptionPane.showMessageDialog(null, e.getMessage(), "Exception", 0);
            }
        } else {
            blSpamming = false;
            JOptionPane.showMessageDialog(null, "Please fill out all fields!", "Error", 0);
        }
    }                                       

    private void btnStopActionPerformed(java.awt.event.ActionEvent evt) {                                       
        blSpamming = false;
    }                                       

    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new UI().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify                     
    private javax.swing.JButton btnLogin;
    private javax.swing.JButton btnStart;
    private javax.swing.JButton btnStop;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblPosted;
    private javax.swing.JMenuBar mnuBar;
    private javax.swing.JMenu mnuFile;
    private javax.swing.JMenuItem mnuItemAbout;
    private javax.swing.JMenuItem mnuItemExit;
    private javax.swing.JTextArea txtMsg;
    private javax.swing.JTextField txtPassword;
    private javax.swing.JTextField txtSub;
    private javax.swing.JTextField txtUsername;
    // End of variables declaration                   
}


I got bored and gave up, feel free to continue my work or make any changes to it at all. I might continue to work on it once I get enough motivation lol.
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Wed Aug 25, 2010 5:20 pm    Post subject: Reply with quote

If you're going to point worthless source, you might as well post the 10-line simplistic version so we don't have to wade through all the scaffolding just to see what the darn thing does.
Back to top
View user's profile Send private message
TROLOLOLOLOLOLOLOLOLOLOLO
Expert Cheater
Reputation: -1

Joined: 27 Dec 2009
Posts: 100

PostPosted: Wed Aug 25, 2010 5:52 pm    Post subject: Reply with quote

justa_dude wrote:
If you're going to point worthless source, you might as well post the 10-line simplistic version so we don't have to wade through all the scaffolding just to see what the darn thing does.


If you're not smart enough to see the difference, you shouldn't be here.
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Wed Aug 25, 2010 6:01 pm    Post subject: Reply with quote

Did you use a builder to make this? It's hideous to read
Back to top
View user's profile Send private message MSN Messenger
TROLOLOLOLOLOLOLOLOLOLOLO
Expert Cheater
Reputation: -1

Joined: 27 Dec 2009
Posts: 100

PostPosted: Wed Aug 25, 2010 6:04 pm    Post subject: This post has 1 review(s) Reply with quote

Noz3001 wrote:
Did you use a builder to make this? It's hideous to read


Yeah, I used NetBeans to build the GUI. It looks better in the IDE haha.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Wed Aug 25, 2010 6:41 pm    Post subject: Reply with quote

vomited a little reading that code
_________________
Back to top
View user's profile Send private message
TROLOLOLOLOLOLOLOLOLOLOLO
Expert Cheater
Reputation: -1

Joined: 27 Dec 2009
Posts: 100

PostPosted: Wed Aug 25, 2010 7:11 pm    Post subject: Reply with quote

HomerSexual wrote:
vomited a little reading that code


It all gets the job done Wink Sure it isn't easy on the eyes, NetBeans is free, so what do you expect? Don't complain to me, complain to them Rolling Eyes

Anyways, feel free to edit it, so you don't vomit anymore haha.

EDIT: Oh and it's not finished, I got bored and gave up. So you'll have to change/add a few things to make it work.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Wed Aug 25, 2010 8:24 pm    Post subject: Reply with quote

I don't know how the CEF posting system works so i can't really help you . I made a program in java awhile ago to login to a webpage for my school grades
_________________
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Thu Aug 26, 2010 11:23 am    Post subject: This post has 2 review(s) Reply with quote

What is the point of this? I dont think db will like if you used a bot to spam stuff?
_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
TROLOLOLOLOLOLOLOLOLOLOLO
Expert Cheater
Reputation: -1

Joined: 27 Dec 2009
Posts: 100

PostPosted: Thu Aug 26, 2010 8:29 pm    Post subject: Reply with quote

NINTENDO wrote:
What is the point of this? I dont think db will like if you used a bot to spam stuff?


What's the point of your post? It's UNFINISHED meaning it's INCOMPLETE meaning it DOESN'T WORK 100% You'd have to change and possibly add a few things, not much at all.

I think only the login works.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Aug 27, 2010 5:16 pm    Post subject: Reply with quote

Closing this, crap like this is not needed or wanted in the world. Use your time to actually make something worth mentioning and not a spamming piece of shit.

@DB: If you feel this is ok, go ahead and unlock.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites