Git Product home page Git Product logo

302faker's Introduction

302faker

Simple HTTP 302 Location-Header fake redirector with file:// support

curl http://patch.rip/t/302/http

Simple 302 Location redirector that redirects to the netloc part with some tricks:

    curl -I https://redirect_me__dev___etc___passwd.patch.rip/t/302/http


    HTTP/2 302 
    date: Wed, 05 Oct 2022 11:26:41 GMT
    content-type: text/plain
    content-length: 33
    location: https://redirect_me.dev/etc/passwd
    fn-call-id: 01GEKY95TJNG8G010ZJ000001K
    x-served-by: redirect_me__dev___etc___passwd.patch.rip
    cf-cache-status: DYNAMIC
    report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=kSsgESvJJWwWoAuAW%2BAac6Z8JA1T9m26ucscfUbc5vAmwU7UU34oSQmmgQC0OBUttwJF1g9PTMRYd9ROZaN8%2F8Vyw3VOwhNP0nNYoc0adaHFgE88UCg6vPT0YAjrZYDYM7YQy05Rqwz23FxpwFdYQPFS0ca6MebVBTo7IQ%3D%3D"}],"group":"cf-nel","max_age":604800}
    nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    server: cloudflare
    cf-ray: 7555cdbd289d3762-MXP
    alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400


Following replacements take place:

redirect = redirect.replace('___', '/')
redirect = redirect.replace('__', '.')

If you want to redirect to plain http:// start with prepend _
Finally, starting with ___ will use file:// as handler

Examples:
http(s)://_169__254__169__254___latest___user-data.patch.rip/t/302/http
http(s)://_localhost___manager___html.patch.rip/t/302/http
https(s)://___etc___passwd.patch.rip/t/302/http


302faker's People

Contributors

schniggie avatar svennergr avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

bbhunter bbhunty

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.