Primarily for checking the HTTP response on all links on a page

PyAnchor Dead links are an annoyance for websites with an extensive amount of content. A side from the negative impact on SEO, dead links are an annoyance for any user that clicks on one. PyAnchor is primarily for checking the HTTP response on all links on a page. You can integrate it into your development workflow so that users never see a 404 in the first place. Install PyAnchor requires Python 3.6 and above. MacOS / Linux: $ python3 -m […]

Read more

HTTP Protocol Stack Remote Code Execution Vulnerability

CVE-2021-31166 This is a proof of concept for CVE-2021-31166 (“HTTP Protocol Stack Remote Code Execution Vulnerability”), a use-after-free dereference in http.sys patched by Microsoft in May 2021. According to this tweet the vulnerability has been found by @_mxms and @fzzyhd1. The bug itself happens in http!UlpParseContentCoding where the function has a local LIST_ENTRY and appends item to it. When it’s done, it moves it into the Request structure; but it doesn’t NULL out the local list. The issue with that […]

Read more

HTTP client mocking tool for Python

HTTPretty HTTP Client mocking tool for Python created by Gabriel Falcão . It provides a full fake TCP socket module. Inspired by FakeWeb Install pip install httpretty Common Use Cases Test-driven development of API integrations Fake responses of external APIs Record and playback HTTP requests Simple Example import sure import httpretty import requests @httpretty.activate def test_httpbin(): httpretty.register_uri( httpretty.GET, “https://httpbin.org/ip”, body='{“origin”: “127.0.0.1”}’ ) response = requests.get(‘https://httpbin.org/ip’) response.json().should.equal({‘origin’: ‘127.0.0.1’}) httpretty.latest_requests().should.have.length_of(1) httpretty.last_request().should.equal(httpretty.latest_requests()[0]) httpretty.last_request().body.should.equal(‘{“origin”: “127.0.0.1”}’) checking multiple responses @httpretty.activate def test_post_bodies(): url = ‘http://httpbin.org/post’ […]

Read more
1 2