GithubHelp home page GithubHelp logo

alexcambose / x-frame-options Goto Github PK

View Code? Open in Web Editor NEW
45.0 4.0 36.0 43 KB

x-frame-options bypass

Home Page: https://medium.com/@alexcambose/bypassing-x-frame-options-4934dd852618

License: MIT License

JavaScript 100.00%
javascript html x-frame-options header headers website bypass

x-frame-options's Introduction

x-frame-options

x-frame-options bypass

Installation

npm install

Usage

npm run start

instead of using iframe source with the actual link of the website:

<iframe src="https://example.com/"></iframe>

use

<iframe src="http://localhost:3000?url=https://example.com/"></iframe>

Demo

live demo


nodejs

stackoverflow

github

x-frame-options's People

Contributors

alexcambose avatar dependabot[bot] avatar jhk avatar ritiksahni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

x-frame-options's Issues

Cookies not Supported

Hello,

i am uaable to load youtube and netflix.Receiving the error your browser is not supported or i am guessing cookies are not processed correctly.
Is there a way to fix this?

Regards,
Markus

Sites will not load properly. Many Errors.

The project works initially but overall fails. It does not load fonts, CSS, and JS. Below are the errors I got from testing one site.

Please fix!

Thanks,

JAS

Refused to load the stylesheet '<URL>' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' <URL>". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

localhost/:1 Refused to load the stylesheet 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/css/site.light.min.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://lichess1.org". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

localhost/:1 Refused to load the stylesheet 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/css/lobby.light.min.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://lichess1.org". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

localhost/:1 Refused to load the stylesheet 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/piece-css/cburnett.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://lichess1.org". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

localhost/:1 Refused to load the stylesheet 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/css/site.light.min.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://lichess1.org". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

localhost/:1 Refused to load the stylesheet 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/css/lobby.light.min.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://lichess1.org". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

localhost/:1 Refused to load the stylesheet 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/piece-css/cburnett.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://lichess1.org". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

localhost/:1 Refused to load the font 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/font/lichess.woff2' because it violates the following Content Security Policy directive: "default-src 'self' https://lichess1.org". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.

localhost/:1 Refused to load the font 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/font/lichess.chess.woff2' because it violates the following Content Security Policy directive: "default-src 'self' https://lichess1.org". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.

localhost/:1 Refused to load the script 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/compiled/lichess.min.js' because it violates the following Content Security Policy directive: "script-src 'nonce-UXzA4tay8Sk8VgDorZCKymGw' 'self' https://lichess1.org". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

localhost/:1 Refused to load the script 'http://localhost/?url=https://lichess1.org/assets/_jq4ChM/compiled/lobby.min.js' because it violates the following Content Security Policy directive: "script-src 'nonce-UXzA4tay8Sk8VgDorZCKymGw' 'self' https://lichess1.org". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

localhost/:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
localhost/:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
localhost/:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
1:3 Refused to load the script 'https://ssl.google-analytics.com/ga.js' because it violates the following Content Security Policy directive: "script-src 'nonce-UXzA4tay8Sk8VgDorZCKymGw' 'self' https://lichess1.org". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

(anonymous) @ 1:3
1:3 Refused to load the script 'http://www.pagespeed-mod.com/v1/taas?id=cs&ak=55c85bbdd6e4d21e7278fbbbb89a9502&si=fb4741a02e044f61940836e20590e7f6&tag=1005&rand=75159da722950d6d1bed603b1040529e&ord=1372444829828016.8' because it violates the following Content Security Policy directive: "script-src 'nonce-UXzA4tay8Sk8VgDorZCKymGw' 'self' https://lichess1.org". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

(anonymous) @ 1:3
?url=http://lichess.org/:6 Uncaught (in promise) ReferenceError: LichessLobby is not defined
    at ?url=http://lichess.org/:6
localhost/:1 Refused to load manifest from 'http://localhost/?url=http://lichess.org/manifest.json' because it violates the following Content Security Policy directive: "default-src 'self' https://lichess1.org". Note that 'manifest-src' was not explicitly set, so 'default-src' is used as a fallback.

/?url=https://lichess1.org/assets/_jq4ChM/logo/lichess-favicon-32.png:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
/?url=https://lichess1.org/assets/_jq4ChM/logo/lichess-favicon-64.png:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
/?url=https://lichess1.org/assets/_jq4ChM/logo/lichess-favicon-128.png:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
/?url=https://lichess1.org/assets/_jq4ChM/logo/lichess-favicon-192.png:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
/?url=https://lichess1.org/assets/_jq4ChM/logo/lichess-favicon-256.png:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
/?url=https://lichess1.org/assets/_jq4ChM/logo/lichess-favicon-512.png:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
localhost/:1 Refused to load manifest from 'http://localhost/?url=http://lichess.org/manifest.json' because it violates the following Content Security Policy directive: "default-src 'self' https://lichess1.org". Note that 'manifest-src' was not explicitly set, so 'default-src' is used as a fallback.

Multiple issues i ran into

  • everything besides the actual site is not requested with the port so does not display
    a fix would be adding the port to theline which alters the request urls
    return ` ${p1}="${req.protocol}://${req.hostname}:${port}?url=${newUrl}"`;

  • encoding does not seem right
    i used "iso88592" and data = iso88592.decode(data.toString('binary')); to decode the content but that does not seem to work always

  • google and many other sites dont use their full url to redirect but only use /?searchquery=something which does not get processed by express and axios.

It would be awesome if you could spend a few minutes and update this repository!

Refusal To Connect

Pinging back the following:

[root@secure ~]# npm run start

[email protected] start /root
node index.js

Listening on port 3000!
GET /?url=https://example.com/ 200 1291 - 119.475 ms
TypeError: URL is not a constructor
at data.toString.replace (/root/index.js:40:43)
at RegExp.[Symbol.replace] (native)
at RegExp.[Symbol.replace] (native)
at String.replace (native)
at axios.get.then (/root/index.js:33:40)
at process._tickCallback (internal/process/next_tick.js:109:7)

No response of any website

Hello,

when i try to load any website with the iframe code the website goes in loading loop. Theres no response. In wireshark i see successfull tls handshake, but after it a connection RST.

in npm cli this is displayed:
GET /?url=http://url.com - - - - ms

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.