Git Product home page Git Product logo

getbyethostcookie's Introduction

GetByetHostCookie

This is a small project that can get the ( __test ) cookie of any ByetHost website.

Contents

What's this project?

A lot of people want to host APIs, etc. on ByetHost but they can't ... Why? Because as ByetHost is free web hosting, they added a limitation which is only the web browsers can access the ByetHost sites, you can't use it to host API service or the similar things So if you hosted an API on ByetHost, no one will be able to use it using cURL, Postman, etc. Because they will get a JavaScript code saying This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support. How can this be bypassed? : This can be bypassed by adding a Cookie called __test in all your requests that you will do using cURL, Postman, etc. But the value of this cookie is hard to get as it is highly encrypted by a secret key... So, this project made it possible to get the __test cookie easily!

Tutorial

Assuming that the ByetHost site is http://example.com

  1. You've to do a request to the ByetHost site that you want ( http://example.com )... the response of the request that we created should be a JavaScript code like this:
<html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("5d0828234733628dc4be8a604efd66ba");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="http://fakedto.epizy.com/?i=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>
  1. Simply, take this response and do a POST request to https://getbyethostcookie.glitch.me/ , The POST variable should be:
jscode: The JavaScript code that we got in step 1.

Now you should get a response containing:

__test=1e27a81afa3459fc3f407befb92bce41

Congratulations! This is the __test that we wanted!

Now you can do any request to http://example.com and add the cookie that we got in the HTTP headers of your requests - You'll notice that you won't get the JavaScript code but you will get the response that you wanted :)

VERY IMPORTANT!

  • The __test cookie differs from a device to another and changes by the time, so you've to get the cookie on every request you're doing to a ByetHost website.

Examples

You can find examples of integrations of this project here.

Hosting your own GetByetHostCookie

You can find the Node.js server used by GetByetHostCookie here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.