Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lt_O

Pages: [1]
1
Projects and Discussion / Re: Need some help with reading AS code (Flash)
« on: October 30, 2015, 05:25:43 am »
Code: [Select]
              if (param2 == this.mNet.GetUserName())
                {
                    _loc_5.color = kFontColors[2];
                    _loc_6.color = kFontColors[4];
                }
                else
                {
                    _loc_5.color = kFontColors[3];
                    _loc_5.underline = false;
                    if (this.mIsFriendCB(_loc_8))
                    {
                        _loc_6.color = kFontColors[7];
                        _loc_6.underline = false;
                    }
                    else
                    {
                        _loc_6.color = kFontColors[4];
                        _loc_6.underline = false;
                    }
                }
                if (this.mNet.GetGame().GetLiveScript())
                {
                    _loc_11 = this.mNet.GetGame().GetLiveScript().GetTeamIdByNetId(param1);
                    if (_loc_11 == 0)
                    {
                        _loc_5.color = kFontColors[9];
                        _loc_6.color = kFontColors[9];
                        _loc_6.underline = false;
                    }
                    else if (_loc_11 == 1)
                    {
                        _loc_5.color = kFontColors[8];
                        _loc_6.color = kFontColors[8];
                        _loc_6.underline = false;
                    }
                }
            }

Looks like the colors are based on some number value, likes 1 - 10 or something to that extent. Look into color codes for the specific language and play around with that stuff. My guess would be all those kFontColors[?] and setting colors to certain things based off the conditions of the IF statements. A few was showing how they set color for server messages and so forth. Just change the numbers and give it a try.

Yeah those numbers probably refer to the Arrays that contain the color types which are defined in the code too, but the problem is I don't know how to use them in the chat? Like when I type on of those number in a combination with some parameters nothing happens... Im trying to find parameters or a trigger to alter the message im typing/posting in that chatbox.

2
Projects and Discussion / Re: Need some help with reading AS code (Flash)
« on: October 28, 2015, 04:31:47 pm »
btw did I post this in the right forum?

3
Projects and Discussion / Re: Need some help with reading AS code (Flash)
« on: October 26, 2015, 09:36:32 pm »
I forgot to mention something, I've been able to do cool stuff with this chat before :) There was a function to send messages as a moderator, which you can also see in the code, using the "!" marks, * was also used for that, and the [] marks. But so they totally removed taht "Support" after I played with it :p but there should be another way I suppose to change the nickname you write/post with, any ideas?

4
Web Oriented Coding / Re: Webhack/debug php/javascript
« on: October 26, 2015, 03:30:59 pm »
You are wasting your time, it's not gonna work.
Here's how it works.

You create account

GET /users/register_thank_you.php?saveGame=true&guestId=60447780
Then it triggers this
GET /users/ajax/daily_spin_popup.php?action_token=df1dd1d3c5ade92804693d81c77e3d6a

This action_token is nothing magical, as far as i could tell it's pretty much static, never the less. Server actually verifies how many times you have spinned, so there is no cheating.

And now it triggers this

GET /data/images/OWDailySweepstakes.swf?prize1=token:50&dayOfWeek=7&numOfDays=0&inTFActionToken=df1dd1d3c5ade92804693d81c77e3d6a


These arguments are just for flash, in reality nothing depends on it, besides showing that you won 50 tokens.

And now the last part.
GET /users/ajax/activate_promo_item.php?rewardSpin=1

I assume it does pretty much what it says it does, activates what you won.

Your price is created on the server side, you can't manipulate it just by editing some fields on the client side.

GET /users/ajax/daily_spin_popup.php?action_token=df1dd1d3c5ade92804693d81c77e3d6a

This is was creates your price, token is probably just your username and that's it.

End of story, but good luck anyways.

Thanks, about that action token I didn't know that :) but I've already found another way to hack those tokens ;)

5
Projects and Discussion / Need some help with reading AS code (Flash)
« on: October 26, 2015, 03:27:54 pm »
Hello, I've been trying to play a bit in a chatbox in an online game that I play often, it's all flash and I have decompiled it to look into the sourcecode, but I'm not really finding what I'm looking for or try to do...
I've succeeded in other tricks, quite a lot in fact already on that site :) But what I'd love to be able to do is change things in this flash based chatbox, like the color of what you write, the name with whom you post your message... etc. I'm sure there are ways but I failed up til now, I'm not too expierenced with actionscript code and therefore I thought maybe someone else would see more in this code for what I am trying to do.... Cuz I was tipped to read the code to find what I need, but I can't find it.

Code: [Select]
package
{
    import fl.controls.*;
    import flash.display.*;
    import flash.events.*;
    import flash.net.*;
    import flash.text.*;
    import flash.utils.*;
    import it.gotoandplay.smartfoxserver.util.*;

    public class Chat extends Object
    {
        private var mChatBuffer:String;
        private var mScrollMarqueeCB:Function;
        private var mFilterSpectators:Boolean;
        private var mFocusCB:Function;
        private var mIsFriendCB:Function;
        private var mIsPlayerCB:Function;
        private var mFocusTimer:Timer;
        private var mIsBlockedCB:Function;
        private var mLinkCB:Function;
        private var mFilterPlayers:Boolean;
        private var mChatWindow:MovieClip;
        private var mFilterGameMessages:Boolean;
        private var mFilterRoomNotices:Boolean;
        private var mIsMouseToFocus:Boolean;
        private var mFilterBlockedUsers:Boolean;
        private var mBeforeMessagePosition:int;
        private var mNet:LiveNet;
        private var mInputCB:Function;
        private static const kFontColors:Array = [16711680, 30464, 11154431, 255, 0, 11615759, 16742178, 26487, 11206913, 65963];

        public function Chat(param1:MovieClip, param2:LiveNet)
        {
            this.mIsMouseToFocus = false;
            this.mFocusTimer = new Timer(200);
            this.mFocusTimer.addEventListener(TimerEvent.TIMER, this.OnFocusTime);
            this.SetAsset(param1, true);
            this.mNet = param2;
            this.mNet.SetPublicMessageCB(this.OnMessage);
            this.mNet.SetChatBufferCB(this.SetChatBuffer);
            return;
        }// end function

        private function OnFocusEvent(event:FocusEvent) : void
        {
            if (event.type == FocusEvent.FOCUS_IN)
            {
                this.mChatWindow.stage.focus = this.mChatWindow.chatInput_txt;
                if (this.mFocusCB != null)
                {
                    this.mFocusCB(event);
                }
            }
            return;
        }// end function

        private function OnMessage(param1:int, param2:String, param3:String, param4:Boolean = false) : void
        {
            var _loc_5:* = null;
            var _loc_6:* = null;
            var _loc_7:* = 0;
            var _loc_8:* = null;
            var _loc_9:* = null;
            var _loc_11:* = 0;
            var _loc_12:* = null;
            var _loc_13:* = 0;
            var _loc_14:* = 0;
            var _loc_15:* = null;
            var _loc_16:* = null;
            _loc_5 = new TextFormat();
            _loc_5.url = "";
            _loc_5.underline = false;
            _loc_6 = new TextFormat();
            _loc_6.url = "";
            _loc_6.underline = false;
            if (param1 == NetBase.kDevToUserMessageId)
            {
                _loc_5.color = kFontColors[3];
                _loc_5.underline = true;
                _loc_6.color = kFontColors[4];
                _loc_6.underline = false;
            }
            else if (param1 == NetBase.kSystemMessageId)
            {
                _loc_5.color = kFontColors[1];
                _loc_6.color = kFontColors[1];
                if (this.mFilterRoomNotices && (param3.indexOf("entered") != -1 || param3.indexOf("left") != -1))
                {
                    return;
                }
                if (this.mFilterGameMessages && param3.indexOf("KO\'d") != -1)
                {
                    return;
                }
            }
            else if (param1 == NetBase.kSupportMessageId)
            {
                _loc_5.color = kFontColors[5];
                _loc_6.color = kFontColors[6];
            }
            else if (param1 == NetBase.kCriticalSupportMessageId)
            {
                _loc_5.color = kFontColors[5];
                _loc_6.color = kFontColors[0];
            }
            else
            {
                if (this.mFilterSpectators && this.mIsPlayerCB != null && !this.mIsPlayerCB(param1))
                {
                    return;
                }
                if (this.mFilterPlayers && (this.mIsPlayerCB == null || this.mIsPlayerCB(param1)))
                {
                    return;
                }
                _loc_7 = param3.indexOf("_");
                if (_loc_7 != -1)
                {
                    _loc_9 = param3;
                    _loc_8 = _loc_9.slice(0, _loc_7);
                    param3 = _loc_9.slice((_loc_7 + 1), _loc_9.length);
                }
                if (_loc_8 != null && this.mFilterBlockedUsers && this.mIsBlockedCB != null && this.mIsBlockedCB(_loc_8))
                {
                    return;
                }
                if (param2 == this.mNet.GetUserName())
                {
                    _loc_5.color = kFontColors[2];
                    _loc_6.color = kFontColors[4];
                }
                else
                {
                    _loc_5.color = kFontColors[3];
                    _loc_5.underline = false;
                    if (this.mIsFriendCB(_loc_8))
                    {
                        _loc_6.color = kFontColors[7];
                        _loc_6.underline = false;
                    }
                    else
                    {
                        _loc_6.color = kFontColors[4];
                        _loc_6.underline = false;
                    }
                }
                if (this.mNet.GetGame().GetLiveScript())
                {
                    _loc_11 = this.mNet.GetGame().GetLiveScript().GetTeamIdByNetId(param1);
                    if (_loc_11 == 0)
                    {
                        _loc_5.color = kFontColors[9];
                        _loc_6.color = kFontColors[9];
                        _loc_6.underline = false;
                    }
                    else if (_loc_11 == 1)
                    {
                        _loc_5.color = kFontColors[8];
                        _loc_6.color = kFontColors[8];
                        _loc_6.underline = false;
                    }
                }
            }
            if (this.mChatWindow.name != "chatInGame_mc" && param2 == "Tetris Support")
            {
                this.mScrollMarqueeCB(param3, param4);
                return;
            }
            if (param2 == this.mNet.GetUserName() || Math.max(1, this.mChatWindow.chat_txt.numLines - 17) == this.mChatWindow.chat_txt.scrollV)
            {
                this.mBeforeMessagePosition = -1;
            }
            else
            {
                this.mBeforeMessagePosition = this.mChatWindow.chat_txt.scrollV;
            }
            if (_loc_5.underline)
            {
                this.mChatWindow.chat_txt.htmlText = this.mChatWindow.chat_txt.htmlText + ("<a href=\'event:" + param2 + "\'>" + param2 + "</a>");
            }
            else
            {
                this.mChatWindow.chat_txt.appendText(param2);
                this.mChatWindow.chat_txt.setTextFormat(_loc_5, this.mChatWindow.chat_txt.text.length - param2.length - 1, this.mChatWindow.chat_txt.length);
            }
            this.mChatWindow.chat_txt.selectable = false;
            var _loc_10:* = _loc_9.indexOf("<a href");
            if (_loc_5.underline || (_loc_10 == -1 || param1 != NetBase.kSupportMessageId && param1 != NetBase.kCriticalSupportMessageId))
            {
                this.mChatWindow.chat_txt.appendText(": " + param3 + "\n");
                this.mChatWindow.chat_txt.setTextFormat(_loc_6, this.mChatWindow.chat_txt.text.length - _loc_9.length - 1, this.mChatWindow.chat_txt.length);
            }
            else
            {
                this.mChatWindow.chat_txt.appendText(": ");
                _loc_12 = _loc_9.substr(0, _loc_10);
                _loc_13 = _loc_9.indexOf("</a>", _loc_10);
                _loc_14 = this.mChatWindow.chat_txt.length;
                if (_loc_13 != -1)
                {
                    _loc_13 = _loc_13 + 4;
                    _loc_15 = _loc_9.substr(_loc_13, _loc_9.length - _loc_13);
                    if (_loc_12 != "")
                    {
                        this.mChatWindow.chat_txt.appendText(_loc_12);
                        this.mChatWindow.chat_txt.setTextFormat(_loc_6, _loc_14, _loc_14 + _loc_10);
                    }
                    _loc_16 = _loc_9.substr(_loc_10, _loc_13 - _loc_10);
                    _loc_13 = this.mChatWindow.chat_txt.length;
                    if (_loc_16 != "")
                    {
                        this.mChatWindow.chat_txt.htmlText = this.mChatWindow.chat_txt.htmlText + _loc_16;
                    }
                    if (_loc_15 != "")
                    {
                        _loc_13 = this.mChatWindow.chat_txt.length;
                        this.mChatWindow.chat_txt.appendText(_loc_15);
                        this.mChatWindow.chat_txt.setTextFormat(_loc_6, _loc_13, this.mChatWindow.chat_txt.length);
                    }
                    this.mChatWindow.chat_txt.appendText("\n");
                }
            }
            this.UpdateScroll();
            return;
        }// end function

        public function IsFilterRoomNotices() : Boolean
        {
            return this.mFilterRoomNotices;
        }// end function

        private function OnFocusTime(event:TimerEvent) : void
        {
            this.mFocusTimer.stop();
            this.mChatWindow.stage.focus = this.mChatWindow.chatInput_txt;
            return;
        }// end function

        public function SetInputCB(param1:Function) : void
        {
            this.mInputCB = param1;
            return;
        }// end function

        public function SetScrollMarqueeCB(param1:Function) : void
        {
            this.mScrollMarqueeCB = param1;
            return;
        }// end function

        public function SetFocusCB(param1:Function) : void
        {
            this.mFocusCB = param1;
            return;
        }// end function

        public function WriteChatToCookie() : void
        {
            var cookie:SharedObject;
            var str:String;
            cookie = SharedObject.getLocal("ChatToReport", "/");
            if (cookie)
            {
                try
                {
                    str = this.mChatWindow.chat_txt.text;
                    cookie.clear();
                    cookie.data.chat = encodeURIComponent(str.substring(str.length - 10000 >= 0 ? (0) : (str.length - 10000), str.length));
                    cookie.flush();
                }
                catch (error:Error)
                {
                    trace("Cookie Write Error : Error while writing data variables");
                }
            }
            return;
        }// end function

        public function SetIsBlockedCB(param1:Function) : void
        {
            this.mIsBlockedCB = param1;
            return;
        }// end function

        public function SetChatBuffer(param1:String) : void
        {
            this.mChatBuffer = null;
            this.mChatBuffer = param1;
            this.Clear();
            return;
        }// end function

        private function UpdateScroll() : void
        {
            if (this.mChatWindow.chat_txt.textHeight > UIScrollBar(this.mChatWindow.chat_sb).height)
            {
                this.mChatWindow.chat_sb.visible = true;
                this.mChatWindow.chat_sb.update();
            }
            else
            {
                this.mChatWindow.chat_sb.visible = false;
            }
            if (this.mBeforeMessagePosition == -1)
            {
                this.mChatWindow.chat_txt.scrollV = Math.max(0, this.mChatWindow.chat_txt.numLines - 12);
            }
            else
            {
                this.mChatWindow.chat_txt.scrollV = this.mBeforeMessagePosition;
            }
            return;
        }// end function

        public function SetIsFriendCB(param1:Function) : void
        {
            this.mIsFriendCB = param1;
            return;
        }// end function

        public function SetIsPlayerCB(param1:Function) : void
        {
            this.mIsPlayerCB = param1;
            return;
        }// end function

        public function Clear() : void
        {
            var _loc_1:* = null;
            var _loc_2:* = 0;
            var _loc_3:* = null;
            var _loc_4:* = null;
            var _loc_5:* = null;
            if (this.mChatWindow)
            {
                this.mChatWindow.chat_txt.text = "";
                this.mChatWindow.chatInput_txt.text = "";
                this.mChatWindow.chatInput_txt.setSelection(0, 0);
                this.UpdateScroll();
                if (this.mChatBuffer != null && this.mChatBuffer.length > 0)
                {
                    _loc_1 = this.mChatBuffer.slice(0, (this.mChatBuffer.length - 1)).split("|");
                    _loc_2 = 0;
                    for each (_loc_3 in _loc_1)
                    {
                       
                        _loc_4 = _loc_3.split("~");
                        _loc_5 = _loc_4[0];
                        if (_loc_5.indexOf("TetrisSupport") != -1 || _loc_5.indexOf("Tetris Support") != -1)
                        {
                            if (_loc_5.charAt(0) == 1)
                            {
                                _loc_2 = NetBase.kCriticalSupportMessageId;
                            }
                            else
                            {
                                _loc_2 = NetBase.kSupportMessageId;
                            }
                            _loc_5 = "Tetris Support";
                        }
                        else
                        {
                            _loc_2 = 0;
                        }
                        this.OnMessage(_loc_2, _loc_5, Entities.decodeEntities(String(_loc_4[1]).replace("&", "&#38;")));
                    }
                }
            }
            return;
        }// end function

        private function OnMouseDown(event:MouseEvent) : void
        {
            this.mFocusTimer.reset();
            this.mFocusTimer.start();
            this.mIsMouseToFocus = true;
            return;
        }// end function

        public function WriteFilters() : void
        {
            var so:SharedObject;
            so = SharedObject.getLocal(this.mNet.GetUserName() + "chatfilters");
            try
            {
                so.data.block = this.mFilterBlockedUsers;
                so.data.gm = this.mFilterGameMessages;
                so.data.player = this.mFilterPlayers;
                so.data.rn = this.mFilterRoomNotices;
                so.data.spec = this.mFilterSpectators;
                so.flush();
            }
            catch (e:Error)
            {
            }
            return;
        }// end function

        public function SendMessage(param1:String) : void
        {
            var _loc_2:* = null;
            var _loc_3:* = 0;
            var _loc_6:* = false;
            var _loc_7:* = false;
            var _loc_8:* = false;
            var _loc_9:* = null;
            var _loc_4:* = /~/g;
            var _loc_5:* = /\|/g;
            param1 = param1.replace(_loc_4, "").replace(_loc_5, "");
            if (param1.charAt(0) == "!" && OWUser.GetUser().GetIsDeveloper())
            {
                _loc_2 = param1;
                _loc_6 = false;
                _loc_7 = false;
                _loc_8 = false;
                _loc_3 = _loc_2.indexOf("!!");
                if (_loc_3 == 0)
                {
                    _loc_2 = _loc_2.slice(2, _loc_2.length);
                    _loc_6 = true;
                }
                else
                {
                    _loc_2 = _loc_2.slice(1, _loc_2.length);
                }
                if (_loc_2.charAt(0) == "*")
                {
                    _loc_7 = true;
                    _loc_2 = _loc_2.slice(1, _loc_2.length);
                }
                this.mNet.SendModeratorMessage(_loc_2 + "\n", _loc_6, _loc_7, _loc_8);
            }
            else if (param1.charAt(0) == "[" && param1.charAt(1) != "]" && OWUser.GetUser().GetIsDeveloper())
            {
                _loc_2 = param1;
                _loc_3 = _loc_2.indexOf("]");
                if (_loc_3 != -1)
                {
                    _loc_9 = _loc_2.slice(1, _loc_3);
                    _loc_2 = _loc_2.slice((_loc_3 + 1), _loc_2.length);
                    this.mNet.SendModeratorMessage(_loc_2 + "\n", false, false, _loc_8, _loc_9);
                }
            }
            else
            {
                this.mNet.SendPublicChat(param1);
            }
            return;
        }// end function

        public function SetAsset(param1:MovieClip, param2:Boolean = false) : void
        {
            if (param1)
            {
                this.mChatWindow = param1;
                this.mChatWindow.chat_txt.addEventListener(TextEvent.LINK, this.OnTextLink);
                this.mChatWindow.chatInput_txt.maxChars = OWUser.GetUser().GetIsDeveloper() ? (null) : (120);
                this.mChatWindow.chatInput_txt.text = "";
                if (!OWUser.GetUser().GetIsEmailVerified())
                {
                    this.mChatWindow.chatInput_txt.type = TextFieldType.DYNAMIC;
                }
                this.mChatWindow.chatInput_txt.addEventListener(TextEvent.TEXT_INPUT, this.OnTextInput);
                this.mChatWindow.chatInput_txt.restrict = " -~";
                this.mChatWindow.addEventListener(FocusEvent.FOCUS_IN, this.OnFocusEvent, false, 0, true);
                this.mChatWindow.addEventListener(MouseEvent.MOUSE_DOWN, this.OnMouseDown, false, 0, true);
                if (param2)
                {
                    this.Clear();
                }
                if (param2)
                {
                    this.mFilterBlockedUsers = false;
                    this.mFilterGameMessages = false;
                    this.mFilterPlayers = false;
                    this.mFilterRoomNotices = false;
                    this.mFilterSpectators = false;
                    this.mIsBlockedCB = null;
                    this.mIsPlayerCB = null;
                    this.mLinkCB = null;
                    this.mIsFriendCB = null;
                    this.mFocusTimer.stop();
                }
            }
            else
            {
                this.mFocusTimer.stop();
                this.mChatWindow.chat_txt.removeEventListener(TextEvent.LINK, this.OnTextLink);
                this.mChatWindow.removeEventListener(FocusEvent.FOCUS_IN, this.OnFocusEvent);
                this.mChatWindow.chat_txt.removeEventListener(MouseEvent.MOUSE_DOWN, this.OnMouseDown);
                this.mChatWindow.chatInput_txt.removeEventListener(TextEvent.TEXT_INPUT, this.OnTextInput);
                this.mChatWindow = null;
            }
            return;
        }// end function

        public function SetLinkCB(param1:Function) : void
        {
            this.mLinkCB = param1;
            return;
        }// end function

        public function GetIsMouseToFocus() : Boolean
        {
            return this.mIsMouseToFocus;
        }// end function

        public function SetFilters(param1:Boolean, param2:Boolean, param3:Boolean, param4:Boolean, param5:Boolean) : void
        {
            this.mFilterRoomNotices = param1;
            this.mFilterGameMessages = param2;
            this.mFilterBlockedUsers = param3;
            this.mFilterPlayers = param5;
            this.mFilterSpectators = param4;
            this.WriteFilters();
            return;
        }// end function

        public function Fini() : void
        {
            if (this.mFocusTimer)
            {
                this.mFocusTimer.stop();
                this.mFocusTimer.removeEventListener(TimerEvent.TIMER, this.OnFocusTime);
                this.mFocusTimer = null;
            }
            this.mChatWindow.removeEventListener(FocusEvent.FOCUS_IN, this.OnFocusEvent);
            this.mChatWindow.chat_txt.removeEventListener(MouseEvent.MOUSE_DOWN, this.OnMouseDown);
            this.mChatWindow.chatInput_txt.removeEventListener(TextEvent.TEXT_INPUT, this.OnTextInput);
            this.mChatWindow = null;
            this.mNet = null;
            this.mFocusCB = null;
            return;
        }// end function

        public function ReadFilters() : void
        {
            var _loc_1:* = null;
            _loc_1 = SharedObject.getLocal(this.mNet.GetUserName() + "chatfilters");
            if (_loc_1 && _loc_1.data && _loc_1.data.block)
            {
                this.mFilterBlockedUsers = _loc_1.data.block;
                this.mFilterGameMessages = _loc_1.data.gm;
                this.mFilterPlayers = _loc_1.data.player;
                this.mFilterRoomNotices = _loc_1.data.rn;
                this.mFilterSpectators = _loc_1.data.spec;
            }
            else
            {
                this.mFilterBlockedUsers = true;
                this.mFilterGameMessages = false;
                this.mFilterPlayers = false;
                this.mFilterRoomNotices = false;
                this.mFilterSpectators = false;
            }
            return;
        }// end function

        public function IsFilterSpectators() : Boolean
        {
            return this.mFilterSpectators;
        }// end function

        public function IsFilterGameMessages() : Boolean
        {
            return this.mFilterGameMessages;
        }// end function

        public function GetAsset() : MovieClip
        {
            return this.mChatWindow;
        }// end function

        public function SetIsMouseToFocus(param1:Boolean) : void
        {
            this.mIsMouseToFocus = param1;
            return;
        }// end function

        private function OnTextInput(event:TextEvent) : void
        {
            var _loc_2:* = false;
            var _loc_3:* = 0;
            if (event.text == "\n")
            {
                event.preventDefault();
                if (this.mChatWindow.chatInput_txt.text != "")
                {
                    _loc_2 = false;
                    _loc_3 = 0;
                    while (_loc_3 < this.mChatWindow.chatInput_txt.text.length)
                    {
                       
                        if (this.mChatWindow.chatInput_txt.text.charAt(_loc_3) != " ")
                        {
                            _loc_2 = true;
                            break;
                        }
                        _loc_3++;
                    }
                    if (_loc_2)
                    {
                        this.SendMessage(this.mChatWindow.chatInput_txt.text);
                    }
                    this.mChatWindow.chatInput_txt.text = "";
                    this.mChatWindow.chatInput_txt.setSelection(0, 0);
                }
                if (this.mInputCB != null)
                {
                    this.mInputCB();
                }
            }
            return;
        }// end function

        public function OnTextLink(event:TextEvent) : void
        {
            if (this.mLinkCB != null)
            {
                this.mLinkCB(event);
            }
            return;
        }// end function

        public function IsFilterPlayers() : Boolean
        {
            return this.mFilterPlayers;
        }// end function

        public function GetInputTextField() : TextField
        {
            return this.mChatWindow.chatInput_txt;
        }// end function

        public function IsFilterBlockedUsers() : Boolean
        {
            return this.mFilterBlockedUsers;
        }// end function

    }
}

I think this part of code is the most important in this... though there is more code but this looks the most interesting...
Any help would be greatly appreciated!
So the thing I would like to do the most with this is change the name which im posting messages with :)

6
Web Oriented Coding / Webhack/debug php/javascript
« on: September 24, 2015, 05:11:50 am »
Hello, I'm new here and I'd like some help to modify some values in an online application...

 I think I know how the procedure works, but I'm still having trouble to get to the source of it to be able to modify the things I want...
The website is tetrisfriends.com

It's a little flash application, that rewards the users with gifts, after you spin it... However the flash app itself only is being used to show the user what he won, and show your prices... The stuff you have won is being defined earlier in the process I found out...
First it triggers this link: /users/ajax/daily_spin_popup.php?action_token=ab75e41f11dbb00f 612a403cfa58a2c0 (the token being a random value), I think the token also doesn't have to do with the prize you will earn... It's just to verify your session I guess.
Then it generates a page like this (I intercept them with my webdebug proxy, Charles...)

Code: (html) [Select]
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Tetris - Daily Spin</title>
<link rel='stylesheet' href='http://tetrisow-a.akamaihd.net/data4_0_0_1/stylesheets/combined.min.css' type='text/css' media='screen' /> <script type='text/javascript' src='http://tetrisow-a.akamaihd.net/data4_0_0_1/javascripts/combined.min.js' charset='utf-8'></script> </head>
<body class='popup_body'>
<div id='daily_spin_container'>
<a id='daily_spin_close_btn' class='button button_small_grey button_small_grey_close user_stats_close_btn floatright' href='javascript:void(0)' onclick='closeDailySpinPopup()'></a>

<div id="daily_spin_content"></div>
</div>


<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
var swf = "/data/images/OWDailySweepstakes.swf?prize1=token:15&prize2=toke n:15&dayOfWeek=6&numOfDays=1&inTFActionToken=cdec8 58480c6553124bbc2edde21f968";
var vPage = "/daily_spin_popup";
var spinCount = 2;
var prizeTags = "token:15&token:15";

$(document).ready(function() {
swfobject.embedSWF(swf, "daily_spin_content", 640, 500, "9.0.0", {}, {}, {wmode: "transparent"}, {allowscriptaccess: "always"}, {id:"dailySpinSwf", name:"dailySpinSwf"});

try {
pageTracker = _gat._getTracker("UA-886022-5");
pageTracker._trackPageview(vPage);
} catch(err) {}

toggleAd(false);
});

function toggleAd(showAd) {
try {
if (showAd) {
$(window.top.document.getElementById("home_custom_ ad_content")).css({ 'left': 0, 'position': 'relative' });
$(window.top.document.getElementById("home_adverti sement")).css('left', 0);
} else {
$(window.top.document.getElementById("home_custom_ ad_content")).css({ 'left': -9999, 'position': 'relative' });
$(window.top.document.getElementById("home_adverti sement")).css('left', -9999);
}
} catch(err) {}
}

function closeDailySpinPopup() {
try {
pageTracker = _gat._getTracker("UA-886022-5");
pageTracker._trackPageview(vPage + '/close');
} catch(err) {}

setTimeout("window.top.Shadowbox.close()", 250);

toggleAd(true);
}
</script>


</body>
</html>

You can see where it shows and defines the price tags etc in this page... So it seemed easy to edit, however if I'm changing the prizes to what I want, which perfectly works, the flash spinner starts, gives me those prizes, but when I leave, it doesn't reward me those gifts... Instead it gives me the ones that were originally meant to be given to me...
So I suppose what you will earn with the daily spinner on that site, is defined before this page is created or the flash application starts...I would have to access that information to change the stuff I want  But so the problem is I cannot find where that info is stored, like that you will receive 10 tokens and 10 armor with the daily spinner, for example... in my webdebugging proxy I'm not finding any config files, or links to, where it says what you will get there... I'm not an expert with javascript, maybe someone can see some more in these functions... There is a file "combined.js" which contains the function of the dailyspinner... and of the link it gets than to reward the gifts.... :

Code: (html) [Select]
function popUpDailySpin(a){popUpBoxByUrl("/users/ajax/daily_spin_popup.php?action_token="+a,640,510,"",f unction(){setTimeout("refreshMiniProfile()",0)})}f unction refreshMiniProfile(){addLoadingAnimation("#home_mi ni_profile_container");$("#home_mini_profile_conta iner").load("/users/_inc/mini_profile.php",function(){removeLoadingAnimatio n("#home_mini_profile_container")})}

And

Code: (html) [Select]
function activateRewards(b){if(!activateSent){activateSent= true;try{if(typeof(spinCount)==undefined||typeof(s pinCount)=="undefined"){spinCount=1}var e=prizeTags.split("&");pageTracker=_gat._getTracke r("UA-886022-5");pageTracker._trackPageview("/daily_spin_popup/spin"+spinCount);for(var a=0;a<e.length;a++){var d=e[a].split(":");pageTracker._trackEvent("DailySpin",d[0],d[1])}}catch(c){}$.get("/users/ajax/activate_promo_item.php?rewardSpin=1",function(f){ })}}function toggleTroubleElements(b){var a=["select","object","embed","canvas"];for(var d=0;d<a.length;d++){var e=document.getElementsByTagName(a[d]);for(var c=0;c<e.length;c++){if(b){$(e[c]).css("visibility","visible")}else{$(e[c]).css("visibility","hidden")}}}}
Those are the javascript codes taht are being used on the site and I also see them in my proxy so these are being used to run the spinner... I've been looking into this a lot, so I would be really happy if someone could help me with this... So it basically gives you the rewards that were originally picked for you, when you finish the spin... even if you let the spinner give you something else... So I'd have to access the source where the original gifts are defined, or what links to it...

Thanks
 ::)

Pages: [1]