Matthew17-21 / Newegg-Shuffle

Request based Python module(s) to help with the Newegg raffle.
MIT License
46 stars 7 forks source link

Error on: Submit Entries #4

Closed CarmeloCampos closed 3 years ago

CarmeloCampos commented 3 years ago
Captura de Pantalla 2021-05-08 a la(s) 12 44 13 p  m
Matthew17-21 commented 3 years ago

Is this via the Desktop or Mobile API? Would you be able to like 114 and print the response?

I'm no longer maintaining this repo unless Newegg pushes major changes.

CarmeloCampos commented 3 years ago

It is through the api for desktop.

CarmeloCampos commented 3 years ago

Response:


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Are you a human?</title>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" /><meta charset="UTF-8" />
<link rel="shortcut icon" type="image/x-icon" href="//c1.neweggimages.com/WebResource/Themes/2005/Nest/Newegg.ico">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,700,700italic|Open+Sans+Condensed:300,300italic,700">
<style type="text/css">
p{font-size:16px;color:#4d4d4d;padding:0;margin:0 0 5px}a img,a:hover img,a:visited img{border:0}.button-primary,.button-primary:focus,.button-primary:link,.button-primary:visited{font-family:'Open Sans Condensed','Arial Narrow','Helvetica Narrow',arial,helvetica,sans-serif;letter-spacing:1px;font-size:14px;font-weight:700;font-stretch:condensed;text-align:center;text-decoration:none;cursor:pointer;border-radius:4px;border:2px solid #E68626;display:inline-block;padding:9px 15px;margin:15px 0 0;outline:0;color:#552F00;background-color:#FFC010;background:linear-gradient(to bottom,#FFC010,#F9A21B);text-transform:uppercase}h1,h2{padding:0}.button-primary:active,.button-primary:hover{color:#552F00;background-color:#F9A21B;background:linear-gradient(to bottom,#F9A21B,#FFC010);border-color:#E68626}h1{margin:0;font-size:100px;line-height:120px;font-weight:700;color:#33425a}h2{color:#cc4e00;font-size:29px;margin:10px 0 20px}
.lds-ripple{display:inline-block;position:relative;width:64px;height:64px}.lds-ripple div{position:absolute;border:4px solid #cc4e00;opacity:1;border-radius:50%;animation:lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite}.lds-ripple div:nth-child(2){animation-delay:-.5s}@keyframes lds-ripple{0%{top:28px;left:28px;width:0;height:0;opacity:1}100%{top:-1px;left:-1px;width:58px;height:58px;opacity:0}}
</style>
<script type="text/javascript">
try{!function(e, t, n, r, i, o, a) {e.NAO = i,e[i] = e[i] || function() {
(e[i].q = e[i].q || []).push(arguments)},e[i].l = 1 * new Date,o = t.createElement(n),a = t.getElementsByTagName(n)[0],o.async = 1,o.src = "//www.newegg.com/gfplib.js",a.parentNode.insertBefore(o, a)}(window, document, "script", 0, "_na")}catch(e){
}
</script>
<script type="text/javascript" src="//c1.neweggimages.com/webResource/Scripts/WWW/jquery-3.5.1.min.js"></script>
<script type="text/javascript">
var win = jQuery(this);
if (win.width() < 900) {
    window.resizeTo(900, win.height());
}
var why = '0';
function getReferer() {
    var reg = new RegExp("(^|&)referer=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    var referer = window.location.origin;
    if (r) {
        referer = unescape(r[2]);
    }
    if (referer.indexOf('?') > 0) {
        referer += '&';
    } else {
        referer += '?';
    }
    referer += 'recaptcha=pass';

    return referer;
}

var postEventData = function (refer) {
    var items = location.hostname.split('.');
    items.shift();
    var topDomain = items.join('.');
    var reg = /^https?\:\/\/\w+\.([^\/\s]+)/;
    var match = refer.match(reg);
    if(match){
        if(match[1] !== topDomain) {
            refer = location.origin;
        }
    }
    else {
        refer = location.origin+'/'+refer.replace(/^\//,'');
    }
    jQuery.ajax({
        type: "POST",
        url: "https://pf.newegg.com/r3",
        data: JSON.stringify({c: document.cookie }),
        dataType: "json",
        contentType: "application/json",
        timeout:2000,
        success: function () {
            window.location.href = refer;
        }
    }).fail(function () {
        window.location.href = refer;
    });
};
function getretry(){
    var de='-8';
    var pec=1000;

    var ct = Math.random()*1000;
    if (ct <= pec) {
        window.location.href = window.location.origin + '/areyouahuman3?' + 'itn=true&' + (location.search || '?').substring(1);
        return;
    }

    return window.location.href = window.location.origin + window.location.pathname + '?' + 'itn=true&' + (location.search || '?').substring(1);;
}
setTimeout(function(){
    getretry();
}, 11500);
(function (i, s, o, g, r, a, m) {
    i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
        (i[r].q = i[r].q || []).push(arguments)
    }, i[r].l = 1 * new Date(); a = s.createElement(o),
    m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-1147542-13', 'auto');
ga('send', 'pageview');
</script>
</head>
<body style="font-family: 'Open Sans', Helvetica, Arial, sans-serif; line-height: 1.36;">
<div style="max-width: 1000px;min-width: 760px;overflow: hidden;margin:100px auto;">
    <div style="float: left;padding: 50px 10px 40px 10px; width: 250px; box-sizing: border-box;">
        <a style="border: none;" href="https://www.newegg.com/">
            <img alt="" width="216" src="//c1.neweggimages.com/WebResource/Themes/2005/Nest/logo_424x210.png" />
        </a>
    </div>
    <div style="border-left: 1px solid #ccc; padding: 30px 10px 70px 40px; margin-left: 250px;">
        <h1>Human?</h1>
        <h2>Are you a human?</h2>
        <p style="margin-bottom: 10px;">We apologize for the confusion, but we can't quite tell if you're a person or a script.</p>
        <p style="margin-bottom: 10px;">Please don't take this personally. Bots and scripts can be very much lifelike these days!</p>
        <p style="margin-bottom: 40px;">To help us better protect your account security, please check the CAPTCHA box below.</p>
        <div class="lds-ripple"><div></div><div></div></div>
        <p>detecting...</p>
        <script>var cookiesEnable="cookie" in document&&(document.cookie.length>0||(document.cookie="test").indexOf.call(document.cookie,"test")>-1);cookiesEnable||document.write('<p id="cookie" style="margin-top: 40px;">We use cookies to provide functionalities and bring better user experience to you. Please allow cookies for Newegg site.</p>');</script>
        <p style="margin-top: 40px;">If you're interested in accessing Newegg API service, please <a href="#" title="Request Access to Newegg API" onclick="javascript:newegg_inhouse_feedback2 && newegg_inhouse_feedback2.show();" style="cursor: pointer;text-decoration: underline; color: #000;">submit a request</a>.</p>
        <p style="margin-top: 40px;">We would love to hear your opinion. <a href="#" title="feedback" onclick="javascript:newegg_inhouse_feedback && newegg_inhouse_feedback.show();" id="newegg_footer_feedback" style="cursor: pointer;text-decoration: underline; color: #000;">Let us know your feedback</a>.</p>
    </div>
    <script type="text/javascript">
    var newegg_inhouse_feedback=null,newegg_inhouse_feedback2=null;!function(){var e=document.location.protocol;if("http:"==e||"https:"==e){var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src="//promotions.newegg.com/Newegg/Survey/newegg-feedback.min.js";var g=document.getElementsByTagName("head")[0].childNodes[0];g.parentNode.insertBefore(n,g),n.onload=function(){null==newegg_inhouse_feedback&&(newegg_inhouse_feedback=new neweggFeedback.NeweggSurvey({cardType:"Id",key:"027BC6DB"})),null==newegg_inhouse_feedback2&&(newegg_inhouse_feedback2=new neweggFeedback.NeweggSurvey({cardType:"Id",key:"D762FCF1"}))}}}();
    var Web={StateManager:{Cookies:{get:function(e){for(var t=document.cookie.split(";"),n=0;n<t.length;n++){var o=t[n].split("=");if(e==decodeURIComponent(o[0].trim()))return unescape(o[1])}return null},Name:{UTMA:"__utma",NVTC:"NVTC",NID:"NV_NID",SPT:"NV_SPT"}}}};
    </script>
</div>
<script>
var nemdpec=1000;
var nemdtoken='2f222d4572a376f1';
var randomct = Math.random()*1000;
    if (randomct > nemdpec) {
(function (s, o, g, r, a, m) {a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;
    a.addEventListener('load', function() {
grecaptcha.ready(function() {
    grecaptcha.execute('6LdAn3UUAAAAAKt8pKdAdZf83OwfA2QhtacSvywE', {action: 'recaptcha'})
    .then(function(token) {
        jQuery.post(window.location.href, { t: token,t2:'s1', cookieEnabled: !!navigator.cookieEnabled, why: why }, function (data, status) {
            if (data === 'success') {
                var refer = getReferer();
                postEventData(refer);
                var noprotocl = refer.replace("http://", "").replace("https://", "");
                var questionMarkLocation = noprotocl.indexOf("?");
                var label = questionMarkLocation > 0 ? noprotocl.slice(0, questionMarkLocation) : noprotocl;
                ga('send', 'event', 'Captcha', 'Click', label);

            } else {
                getretry();
            }
        });
    });
});
});
a.src=g;m.parentNode.insertBefore(a,m);
})(window, document, 'script', 'https://www.google.com/recaptcha/api.js?render=6LdAn3UUAAAAAKt8pKdAdZf83OwfA2QhtacSvywE');
    }
    else{
(function(e,t,l){function f(t,l){let n=0;for(let e=0;e<t.length;e++){n+=Math.pow(t[e]-l[e],2)}return Math.sqrt(n)}function n(t){let l=0;for(let e=0;e<t.length;e++){l+=t[e]}return l}function u(t){if(t.length>0){let e=n(t);return e/t.length}else{return 0}}function o(l,n){if(n.length>0){let t=0;for(let e=0;e<n.length;e++){t+=Math.pow(l-n[e],2)}return Math.sqrt(t/n.length)}return 0}var d={};d.t=new Array(3);d.l=new Array(2);d.i=250;d.u=300;d.o=1e3;d.h=t*1e3;d.M="_usereventdatas";d.S=.8;d.v=.09;d.g=.05;d.debug=false;d.A=function(e,t,l,n){return Math.sqrt(Math.pow(e-l,2)+Math.pow(t-n,2))};d.J=function(e,t){return e/t};d.N=function(e,t,l){return Math.abs(t-e)/l};d.O=function(e,t,l,n){return Math.atan2(n-t,l-e)*180/Math.PI};d.m=function(e,t,l){return Math.abs(t-e)/l};d.p=function(e){if(e>=0&&e<45){return 0}else if(e>=45&&e<90){return 1}else if(e>=90&&e<135){return 2}else if(e>=135&&e<180){return 3}else if(e>=180||e<-135){return 4}else if(e>=-135&&e<-90){return 5}else if(e>=-90&&e<-45){return 6}else{return 7}};d.I=function(u){let o=u.timeStamp;let a=u.pageX;let s=u.pageY;if(d.t[0]!==undefined){let e=o-d.t[0][2];if(e>d.i){d.t[0]=[u.pageX,u.pageY,o,0,0];return}let t=d.A(a,s,d.t[0][0],d.t[0][1]);if(e<=0||t<=0){return}let l=d.J(t,e);let n=d.N(d.t[0][3],l,e);let r=d.O(d.t[0][0],d.t[0][1],a,s);let f=d.p(r);let i=d.m(d.t[0][4],r,e);if(d.l[0]!==undefined){d.l[0].push([t,l,n,i,f])}else{d.l[0]=[[t,l,n,i,f]]}d.t[0]=[u.pageX,u.pageY,o,l,r]}else{d.t[0]=[u.pageX,u.pageY,o,0,0]}};d.T=function(e){d.t[1]=e.timeStamp;if(d.t[2]!==undefined){let e=d.t[1]-d.t[2];if(e<=d.u&&e>0){if(d.l[1]!==undefined){d.l[1].push(e)}else{d.l[1]=[e]}}}};d._=function(e){d.t[2]=e.timeStamp};d.j=function(){let t=0;let l=0;let n=0;let r=0;let f=0;let i=0;let u=0;let o=0;let a=[0,0,0,0,0,0,0,0];let s=0;let c=0;if(d.l[0]!==undefined){let e=d.l[0].length;if(e>0){for(var h=0;h<e;h++){t+=d.l[0][h][0];l+=d.l[0][h][1];n+=d.l[0][h][2];r+=d.l[0][h][3];a[d.l[0][h][4]]+=1}t=t/e;l=l/e;n=n/e;r=r/e;for(var h=0;h<e;h++){f+=Math.pow(t-d.l[0][h][0],2);i+=Math.pow(l-d.l[0][h][1],2);u+=Math.pow(n-d.l[0][h][2],2);o+=Math.pow(r-d.l[0][h][3],2)}f=Math.sqrt(f/e);i=Math.sqrt(i/e);u=Math.sqrt(u/e);o=Math.sqrt(o/e);for(var h=0;h<a.length;h++){a[h]=a[h]/e}}}if(d.l[1]!==undefined){let e=d.l[1].length;if(e>0){for(var h=0;h<e;h++){s+=d.l[1][h]}s=s/e;for(var h=0;h<e;h++){c+=Math.pow(s-d.l[1][h],2)}c=Math.sqrt(c/e)}}let e=[t,l,n,r,f,i,u,o,s,c];let M=e.concat(a);return M};d.clear=function(){d.t=new Array(3);d.l=new Array(2)};d.k=function(e,t){localStorage.removeItem(d.M);e.onmousedown=d._;e.onmouseup=d.T;e.onmousemove=d.I;let l=setInterval(function(){let e=d.getData();d.q(e)},d.o);setTimeout(function(){clearInterval(l);let e=d.detect();t(e)},d.h)};d.getData=function(){let e=d.j();d.clear();return e};d.B=function(l,n){let r=[0,0,0,0,0,0,0,0,0,0,0,0,0];for(let t=0;t<n.length;t++){let e=f(n[t],l);if(e<=1){r[0]+=1}else if(e>1&&e<=2){r[1]+=1}else if(e>2&&e<=4){r[2]+=1}else if(e>4&&e<=8){r[3]+=1}else if(e>8&&e<=50){r[4]+=1}else if(e>50&&e<=100){r[5]+=1}else if(e>100&&e<=200){r[6]+=1}else if(e>200&&e<=300){r[7]+=1}else if(e>300&&e<=400){r[8]+=1}else if(e>400&&e<=500){r[9]+=1}else if(e>500&&e<=600){r[10]+=1}else if(e>600&&e<=800){r[11]+=1}else{r[12]+=1}}for(let e=0;e<r.length;e++){r[e]=r[e]/n.length}return r};d.q=function(t){if(t!==undefined&&t!=null){if(localStorage[d.M]===undefined||localStorage[d.M]==null){localStorage[d.M]=JSON.stringify([t])}else{let e=JSON.parse(localStorage[d.M]);if(Array.isArray(e)){e.push(t);localStorage[d.M]=JSON.stringify(e)}}}};d.detect=function(){let r=false;let f=JSON.parse(localStorage[d.M]);let i=[0,0,0,0,0,0,0,0,0,0,0,0,0];if(Array.isArray(f)&&f.length>1){let n=0;for(let l=0;l<f.length;l++){for(let e=l+1;e<f.length;e++){let t=d.B(f[l],f);for(let e=0;e<i.length;e++){i[e]+=t[e]}n+=1}}for(let e=0;e<i.length;e++){i[e]=i[e]/n}let e=i[0]+i[1];let t=i[10]+i[11]+i[12];if(e>=d.S||t>=d.g){r=true}else if(e<.5){let e=i.slice(2,10);let t=u(e);let l=o(t,e);if(l<=d.v){r=true}}}return r};d.k(e,l)})(document.querySelector("body"),10,function(e) {
    if (!e) {
    var timestamp = Math.floor(Date.now() / 1000);
    jQuery.post(window.location.href, { t: timestamp+nemdtoken, t2:'md', cookieEnabled: !!navigator.cookieEnabled, why: why }, function (data, status) {
        if (data === 'success') {
            var refer = getReferer();
            postEventData(refer);
            var noprotocl = refer.replace("http://", "").replace("https://", "");
            var questionMarkLocation = noprotocl.indexOf("?");
            var label = questionMarkLocation > 0 ? noprotocl.slice(0, questionMarkLocation) : noprotocl;
            ga('send', 'event', 'Captcha', 'Click', label);

        } else {
            getretry();
        }
    });
    } else {
    getretry();
    }
});
}
</script>
</body>
</html>
Matthew17-21 commented 3 years ago

Thank you. Were you using proxies?

CarmeloCampos commented 3 years ago

No, I didn't find any usable proxies. I am using it directly from my IP.

Matthew17-21 commented 3 years ago

Got it.

That's definitely a IP/Proxy issue. Most likely sent way too many requests. I highly recommend using proxies as it will not only get rid of that issue, but it will make your entries more unique/better.

Closing this issue as it was not directly bot error.