Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Solved Why is my topic locked???

bernd7

Coder
Hello,
I posted this topic today at about 6:30 am:
I got a response at around 9:30 am which I already saw but didnt have time to answer.

Now as it's evening, I jsut wanted to answer the response and go into some more details.
However the topic (as literally the only one in hundreds of javascript topics(?!?) is locked, so I cant wirte anything?

checked messages and notfications, literally nothing anywhere, so I cant find any "your topic was locked because ..." message or something.
so I don't get it, why was it locked?
how am I supoposed to respond to the given answer there?

Did I miss something?
Also sorry for posting this in the javascript area but I also cant find any "issues with this website" kind of area, only announcement channel, hello world and smalltalk area.
so I didnt find any better place to post this than here next to the locked thread.

So can anyone tell me WTF is going on?
I am deeply confused. and slightly angered.
Cause my topic got closed without even mentioning a f'ing damn reason.
 
Hello,
I posted this topic today at about 6:30 am:
I got a response at around 9:30 am which I already saw but didnt have time to answer.

Now as it's evening, I jsut wanted to answer the response and go into some more details.
However the topic (as literally the only one in hundreds of javascript topics(?!?) is locked, so I cant wirte anything?

checked messages and notfications, literally nothing anywhere, so I cant find any "your topic was locked because ..." message or something.
so I don't get it, why was it locked?
how am I supoposed to respond to the given answer there?

Did I miss something?
Also sorry for posting this in the javascript area but I also cant find any "issues with this website" kind of area, only announcement channel, hello world and smalltalk area.
so I didnt find any better place to post this than here next to the locked thread.

So can anyone tell me WTF is going on?
I am deeply confused. and slightly angered.
Cause my topic got closed without even mentioning a f'ing damn reason.
First of all sir, I am going to need you to lower your attitude down. Second, I was the one who responded and locked down the post. As to my reasoning, I replied to your other post in regards to this, but I will reiterate here. I posed a question to you on the post about your intentions with wanting to inject files in a http request. If you will be so kind to respond here, then and only then will I unlock the thread so that the community can help you in your endeavour.
 
First of all madam, I need you to lower your cockiness. I dont see the issue with your question, I see an issue with the locked thread.
Too bad so many extensions out there inject code into a website and change the DOM...
all malicious, right? ;-)


Secondly, I wanna inject this file here to the site, so it draws colored boxes based on values within 2 specific request responses.
JavaScript:
function test(){
    console.log("This is a Test!");
}

test();

var prevBalance=0;
var thisBalance=0;

(function(xhr) {
        console.log("recognizing a new http request...");
    var XHR = XMLHttpRequest.prototype;
        console.log("XHR");
    var open = XHR.open;
    var send = XHR.send;
    var setRequestHeader = XHR.setRequestHeader;

    XHR.open = function(method, url) {
        this._method = method;
        this._url = url;
        this._requestHeaders = {};
        this._startTime = (new Date()).toISOString();

        return open.apply(this, arguments);
    };

    XHR.setRequestHeader = function(header, value) {
        this._requestHeaders[header] = value;
        return setRequestHeader.apply(this, arguments);
    };

    XHR.send = function(postData) {

        this.addEventListener('load', function() {
            var endTime = (new Date()).toISOString();

            var myUrl = this._url ? this._url.toLowerCase() : this._url;
            if(myUrl) {

                if (postData) {
                    if (typeof postData === 'string') {
                        try {
                            // here you get the REQUEST HEADERS, in JSON format, so you can also use JSON.parse
                            this._requestHeaders = postData;   
                        } catch(err) {
                            console.log('Request Header JSON decode failed, transfer_encoding field could be base64');
                            console.log(err);
                        }
                    } else if (typeof postData === 'object' || typeof postData === 'array' || typeof postData === 'number' || typeof postData === 'boolean') {
                            // do something if you need
                    }
                }

                // here you get the RESPONSE HEADERS
                var responseHeaders = this.getAllResponseHeaders();
                                console.log("responseHeaders:"+responseHeaders);
                                console.log("this.responseType:"+this.responseType);
                                
                if ( this.responseType != 'blob') {
                    // responseText is string or null
                    try {
                                                /*
                                                <input class="form-input ng-pristine ng-empty ng-invalid ng-invalid-required ng-touched" id="form-pass" type="password" name="password" ng-model="credentials.password" placeholder="Password" required="required" style="">
                                                */

                        // here you get RESPONSE TEXT (BODY), in JSON format, so you can use JSON.parse
                        var arr = this.response;
                                                console.log(arr);

                        // printing url, request headers, response headers, response body, to console
                                                console.log(" ");
                        console.log(this._url);
                                                this._requestHeaders
                        //console.log(this._requestHeaders.toLocaleString());
                        //console.log(responseHeaders);
                                                                
                                                
                                                
                                                
                                                if(arr.includes("numbers=")){
                                                    
                                                    //second box
                                                    const test21 = document.getElementById("insertedDiv21");
                                                    if(test21!=null){
                                                        test21.remove();
                                                    }
                                                    const div21=document.createElement("div");
                                                    div21.setAttribute("id","insertedDiv21");
                                                    div21.setAttribute("style","position:fixed; top: 40px; left: 0px; width:20px; height:20px;");
                                                    div21.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(255, 255, 255);'></p>";
                                                    document.body.appendChild(div21);
                                                                                                        
                                                }
//*************************************************************************************************************************                                               
                                                if(arr.includes("winnumber=")){
                                                    
                                                    
                                                    //get result
                                                    let wintext=arr.match(/&winnumber=[0-9]+/g);
                                                    let result = arr.match(/&winnumber=[0-9]+/)[0].substring(11, (arr.length-1));
                                                    let rot=["1","3","5","7","9","12","14","16","18","19","21","23","25","27","30","32","34","36"];
                                                    
                                                    //get balance and balance change
                                                    let tempBalance=arr.match(/&credit=[0-9]+/)[0].substring(8, (arr.length-1));
                                                    let diff=tempBalance-prevBalance;
                                                    console.log("diff="+diff+"!");
                                                    
                                                    
                                                    //first box, color of last drawn number
                                                    const test11 = document.getElementById("insertedDiv11");
                                                    if(test11!=null){
                                                        test11.remove();
                                                    }
                                                    const div11=document.createElement("div");
                                                    div11.setAttribute("id","insertedDiv11");
                                                    div11.setAttribute("style","position:fixed; top: 0px; left: 0px; width:20px; height:20px;");
                                                    if(rot.includes(result)){
                                                        div11.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(255, 0, 0);'></p>";}
                                                    else if((result=="0")){
                                                        div11.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 255, 0);'></p>";}
                                                    else{
                                                    div11.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 0, 0);'></p>";}
                                                    document.body.appendChild(div11);


                                                    //second box, are controls usable again? white yes, black no
                                                    const test21 = document.getElementById("insertedDiv21");
                                                    if(test21!=null){
                                                        test21.remove();
                                                    }
                                                    const div21=document.createElement("div");
                                                    div21.setAttribute("id","insertedDiv21");
                                                    div21.setAttribute("style","position:fixed; top: 40px; left: 0px; width:20px; height:20px;");
                                                    div21.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 0, 0);'></p>";
                                                    document.body.appendChild(div21);

                                           //third box, balance change white=bigger, blue=equal and black=less than before
                                                    const test12 = document.getElementById("insertedDiv12");
                                                    if(test12!=null){
                                                        test12.remove();
                                                    }
                                                    const div12=document.createElement("div");
                                                    div12.setAttribute("id","insertedDiv12");
                                                    div12.setAttribute("style","position:fixed; top: 0px; left: 40px; width:20px; height:20px;");
                                                    if((prevBalance==0)||(parseInt(diff)==0)){
                                                        div12.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 0, 255);'></p>";
                                                    }
                                                    else if(parseInt(diff)>0){
                                                        div12.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(255, 255, 255);'></p>";
                                                    }
                                                    else{
                                                        div12.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 0, 0);'></p>";
                                                    }
                                                    prevBalance=tempBalance;
                                                    
                                                    document.body.appendChild(div12);
                                                    
                                                }
//***************************************************************************************************************************************************                                               

                    } catch(err) {
                        //console.log("Error in responseType try catch");
                        //console.log(err);
                    }
                }

            }
        });

        return send.apply(this, arguments);
    };

})(XMLHttpRequest);


background is that I am building a java bot to play roulette for me.
and in order to make my life easier, I wanna use a chrome extension (that is to be built here)
that catches each and every request , if it's one of t2 specific ones, it will draw certain boxes (deleting old ones if there are already any).
so it basically displays one box showing the last draws color,
one box to display wether the wheel is spinning or if I can currently place bets and stuff (handily the time certsin requests come in corresponds to the monet buttons on the roulette wheel are usable again9,
and other stuff.
oh and one box that visually shows how the balance changed in the last draw (so if we lost, won or no change).

While the whole concept worked when trying it on a website with a roulette simulator

it sadly didnt work on the actual casino website.
requests were console.logged the whole time the site was loading the roulette room (while the visual loading bar was on the screen) however
as soon as the actual roulette table was on screen, jsut no network requests were caught anymore.
(in chrome developer tools, in the network tab, I can clearly see the basically same requests and responses happening when playing that I also did in the simulator. so aside from very small differences its the very same. well, the table is from netent too, so was to be expected)

my random guess was that, since the website url didnt change but the visual website content (and therefor the DOM) changed, I would assume that at some point somehow the injected script got somehow deleted.
aand without it being in there, it obviously wouldnt catch and react to requests either.

so I wanted to check if somethign different happens if I inject the script each time a new request is made.
Cause, as I wrote in the original post, currently the script is only injected onvce at the very beginning.
if the injected script somehow gets deleted along the way, it's gone.

so injecting it every now and then might give me some clue on wtf is happening in there.
well, was the plan but couldnt manage to get the right order for the eventlistener and executescript thing and some handicapped ones told me my code was malicious. after locking the tpopic without zero explanation or anything, leaving one to random guess....
 
Because it seems like malicous code.
Malicious, yeah.
Will soon write google an email that they should immediately stop using those malicious content scripts and background scripts that need to be injected into the website.
Evil shit, for real.

Guess as usual in life, I can only depend on myself and try to somehow learn stuff with googling mediocre explanations and outdated ways of doing stuff..
since you apparently cant get any help in dedicated forums.
 
First of all madam, I need you to lower your cockiness. I dont see the issue with your question, I see an issue with the locked thread.
Too bad so many extensions out there inject code into a website and change the DOM...
all malicious, right? ;-)


Secondly, I wanna inject this file here to the site, so it draws colored boxes based on values within 2 specific request responses.
JavaScript:
function test(){
    console.log("This is a Test!");
}

test();

var prevBalance=0;
var thisBalance=0;

(function(xhr) {
        console.log("recognizing a new http request...");
    var XHR = XMLHttpRequest.prototype;
        console.log("XHR");
    var open = XHR.open;
    var send = XHR.send;
    var setRequestHeader = XHR.setRequestHeader;

    XHR.open = function(method, url) {
        this._method = method;
        this._url = url;
        this._requestHeaders = {};
        this._startTime = (new Date()).toISOString();

        return open.apply(this, arguments);
    };

    XHR.setRequestHeader = function(header, value) {
        this._requestHeaders[header] = value;
        return setRequestHeader.apply(this, arguments);
    };

    XHR.send = function(postData) {

        this.addEventListener('load', function() {
            var endTime = (new Date()).toISOString();

            var myUrl = this._url ? this._url.toLowerCase() : this._url;
            if(myUrl) {

                if (postData) {
                    if (typeof postData === 'string') {
                        try {
                            // here you get the REQUEST HEADERS, in JSON format, so you can also use JSON.parse
                            this._requestHeaders = postData;  
                        } catch(err) {
                            console.log('Request Header JSON decode failed, transfer_encoding field could be base64');
                            console.log(err);
                        }
                    } else if (typeof postData === 'object' || typeof postData === 'array' || typeof postData === 'number' || typeof postData === 'boolean') {
                            // do something if you need
                    }
                }

                // here you get the RESPONSE HEADERS
                var responseHeaders = this.getAllResponseHeaders();
                                console.log("responseHeaders:"+responseHeaders);
                                console.log("this.responseType:"+this.responseType);
                               
                if ( this.responseType != 'blob') {
                    // responseText is string or null
                    try {
                                                /*
                                                <input class="form-input ng-pristine ng-empty ng-invalid ng-invalid-required ng-touched" id="form-pass" type="password" name="password" ng-model="credentials.password" placeholder="Password" required="required" style="">
                                                */

                        // here you get RESPONSE TEXT (BODY), in JSON format, so you can use JSON.parse
                        var arr = this.response;
                                                console.log(arr);

                        // printing url, request headers, response headers, response body, to console
                                                console.log(" ");
                        console.log(this._url);
                                                this._requestHeaders
                        //console.log(this._requestHeaders.toLocaleString());
                        //console.log(responseHeaders);
                                                               
                                               
                                               
                                               
                                                if(arr.includes("numbers=")){
                                                   
                                                    //second box
                                                    const test21 = document.getElementById("insertedDiv21");
                                                    if(test21!=null){
                                                        test21.remove();
                                                    }
                                                    const div21=document.createElement("div");
                                                    div21.setAttribute("id","insertedDiv21");
                                                    div21.setAttribute("style","position:fixed; top: 40px; left: 0px; width:20px; height:20px;");
                                                    div21.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(255, 255, 255);'></p>";
                                                    document.body.appendChild(div21);
                                                                                                       
                                                }
//*************************************************************************************************************************                                              
                                                if(arr.includes("winnumber=")){
                                                   
                                                   
                                                    //get result
                                                    let wintext=arr.match(/&winnumber=[0-9]+/g);
                                                    let result = arr.match(/&winnumber=[0-9]+/)[0].substring(11, (arr.length-1));
                                                    let rot=["1","3","5","7","9","12","14","16","18","19","21","23","25","27","30","32","34","36"];
                                                   
                                                    //get balance and balance change
                                                    let tempBalance=arr.match(/&credit=[0-9]+/)[0].substring(8, (arr.length-1));
                                                    let diff=tempBalance-prevBalance;
                                                    console.log("diff="+diff+"!");
                                                   
                                                   
                                                    //first box, color of last drawn number
                                                    const test11 = document.getElementById("insertedDiv11");
                                                    if(test11!=null){
                                                        test11.remove();
                                                    }
                                                    const div11=document.createElement("div");
                                                    div11.setAttribute("id","insertedDiv11");
                                                    div11.setAttribute("style","position:fixed; top: 0px; left: 0px; width:20px; height:20px;");
                                                    if(rot.includes(result)){
                                                        div11.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(255, 0, 0);'></p>";}
                                                    else if((result=="0")){
                                                        div11.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 255, 0);'></p>";}
                                                    else{
                                                    div11.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 0, 0);'></p>";}
                                                    document.body.appendChild(div11);


                                                    //second box, are controls usable again? white yes, black no
                                                    const test21 = document.getElementById("insertedDiv21");
                                                    if(test21!=null){
                                                        test21.remove();
                                                    }
                                                    const div21=document.createElement("div");
                                                    div21.setAttribute("id","insertedDiv21");
                                                    div21.setAttribute("style","position:fixed; top: 40px; left: 0px; width:20px; height:20px;");
                                                    div21.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 0, 0);'></p>";
                                                    document.body.appendChild(div21);

                                           //third box, balance change white=bigger, blue=equal and black=less than before
                                                    const test12 = document.getElementById("insertedDiv12");
                                                    if(test12!=null){
                                                        test12.remove();
                                                    }
                                                    const div12=document.createElement("div");
                                                    div12.setAttribute("id","insertedDiv12");
                                                    div12.setAttribute("style","position:fixed; top: 0px; left: 40px; width:20px; height:20px;");
                                                    if((prevBalance==0)||(parseInt(diff)==0)){
                                                        div12.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 0, 255);'></p>";
                                                    }
                                                    else if(parseInt(diff)>0){
                                                        div12.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(255, 255, 255);'></p>";
                                                    }
                                                    else{
                                                        div12.innerHTML="<p style='border-width:1px; border-style:solid; border-color:white; padding: 1em; color:white; background-color:rgb(0, 0, 0);'></p>";
                                                    }
                                                    prevBalance=tempBalance;
                                                   
                                                    document.body.appendChild(div12);
                                                   
                                                }
//***************************************************************************************************************************************************                                              

                    } catch(err) {
                        //console.log("Error in responseType try catch");
                        //console.log(err);
                    }
                }

            }
        });

        return send.apply(this, arguments);
    };

})(XMLHttpRequest);


background is that I am building a java bot to play roulette for me.
and in order to make my life easier, I wanna use a chrome extension (that is to be built here)
that catches each and every request , if it's one of t2 specific ones, it will draw certain boxes (deleting old ones if there are already any).
so it basically displays one box showing the last draws color,
one box to display wether the wheel is spinning or if I can currently place bets and stuff (handily the time certsin requests come in corresponds to the monet buttons on the roulette wheel are usable again9,
and other stuff.
oh and one box that visually shows how the balance changed in the last draw (so if we lost, won or no change).

While the whole concept worked when trying it on a website with a roulette simulator

it sadly didnt work on the actual casino website.
requests were console.logged the whole time the site was loading the roulette room (while the visual loading bar was on the screen) however
as soon as the actual roulette table was on screen, jsut no network requests were caught anymore.
(in chrome developer tools, in the network tab, I can clearly see the basically same requests and responses happening when playing that I also did in the simulator. so aside from very small differences its the very same. well, the table is from netent too, so was to be expected)

my random guess was that, since the website url didnt change but the visual website content (and therefor the DOM) changed, I would assume that at some point somehow the injected script got somehow deleted.
aand without it being in there, it obviously wouldnt catch and react to requests either.

so I wanted to check if somethign different happens if I inject the script each time a new request is made.
Cause, as I wrote in the original post, currently the script is only injected onvce at the very beginning.
if the injected script somehow gets deleted along the way, it's gone.

so injecting it every now and then might give me some clue on wtf is happening in there.
well, was the plan but couldnt manage to get the right order for the eventlistener and executescript thing and some handicapped ones told me my code was malicious. after locking the tpopic without zero explanation or anything, leaving one to random guess....
You know, if life has taught me anything lol, is that you get a lot more done and taken care of, when you are cordial and respectful. Once you start acting with ego and bravado, the less likely you will get the best of outcomes. :) Friendly tip of the day.

Now, on to business, please tell me you understand how your post can be taken as malicious, with no context of the intended purpose.
 
You know, if I literally register in a javascript forum, post my very first topic, get an answer and get it almost instantly locked anc losed within half a day.
And the mods locking it DONT EVEN HAVE THE GUTS TO FUCKING SAY WHY THEY LOCKD THE ThREAD (other forums out there at least have that decency, senting you a pm telling you that you claimly violated §7 of this or that rulebook or used clearname or whatever).

Let alone expecting me to give an explanation when answering is downright impossible due to the topic being locked (didnt think that through, eh?)

I already feel that cordiality and respect to my core.
And obviously repeat it outward, as deserved.
 
You know, if I literally register in a javascript forum, post my very first topic, get an answer and get it almost instantly locked anc losed within half a day.
And the mods locking it DONT EVEN HAVE THE GUTS TO FUCKING SAY WHY THEY LOCKD THE ThREAD (other forums out there at least have that decency, senting you a pm telling you that you claimly violated §7 of this or that rulebook or used clearname or whatever).

Let alone expecting me to give an explanation when answering is downright impossible due to the topic being locked (didnt think that through, eh?)

I already feel that cordiality and respect to my core.
And obviously repeat it outward, as deserved.
Again, do yourself, and us a favor, and lower that attitude down to the lowest it can go. That is not helping your case out bud
 
Back
Top Bottom