Coder Social home page Coder Social logo

includesecurity / safeurl-python Goto Github PK

View Code? Open in Web Editor NEW
11.0 0.0 4.0 17 KB

Python implementation of SafeURL (Anti-SSRF Lib)

Home Page: https://github.com/IncludeSecurity

License: MIT License

Python 100.00%
safeurl ssrf antissrf appsec whitelist blacklist

safeurl-python's People

Contributors

includesec-kris avatar includesec-ltennant avatar jordanmilne avatar momopranto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

safeurl-python's Issues

Add address check inside OPENSOCKET callback

pycurl has a hook that can run whenever a socket is opened, with one of the parameters being the resolved IP of the address to connect to (at least according to this unit test.)

If you check the address passed into the callback against the IP whitelist / blacklist you should be able to get rid of the manual DNS pinning, resolving your problems with the CN validation failing with HTTPS.

Unfortunately this callback isn't exposed in PHP so it can't be used in safeurl-php.

Corrupts query strings with %25 → %2525 → %252525 → ⋯

>>> url = 'http://example.com/?q=%25'
>>> url = Url.validateUrl(url, Options())['cleanUrl']; url
'http://example.com/?q=%2525'
>>> url = Url.validateUrl(url, Options())['cleanUrl']; url
'http://example.com/?q=%252525'
>>> url = Url.validateUrl(url, Options())['cleanUrl']; url
'http://example.com/?q=%25252525'
>>> url = Url.validateUrl(url, Options())['cleanUrl']; url
'http://example.com/?q=%2525252525'

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.