<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kareem Hesham</title>
    <description>The latest articles on DEV Community by Kareem Hesham (@kareemheshaam).</description>
    <link>https://dev.to/kareemheshaam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4102731%2Fa57eb118-0548-4f19-b24a-706d053a2696.png</url>
      <title>DEV Community: Kareem Hesham</title>
      <link>https://dev.to/kareemheshaam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kareemheshaam"/>
    <language>en</language>
    <item>
      <title>How to Trace Cookies and Tokens Across HTTP Requests with Reqvexa</title>
      <dc:creator>Kareem Hesham</dc:creator>
      <pubDate>Mon, 31 Aug 2026 12:50:20 +0000</pubDate>
      <link>https://dev.to/kareemheshaam/how-to-trace-cookies-and-tokens-across-http-requests-with-reqvexa-2olg</link>
      <guid>https://dev.to/kareemheshaam/how-to-trace-cookies-and-tokens-across-http-requests-with-reqvexa-2olg</guid>
      <description>&lt;p&gt;&lt;em&gt;An open-source Python HAR analyzer that reconstructs the state dependencies behind a target API request.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Browser DevTools can show you every request a page made. Charles Proxy and Burp Suite can show you the same traffic in much greater detail. But when one request succeeds only because five earlier requests prepared its cookies, tokens, and headers, the traffic log leaves a harder question unanswered:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why was this request able to work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That question becomes painful in a large HAR file. A target request may depend on a session cookie returned during login, a token embedded in a response body, a value that changed twice, and a header whose visible form has been URL-encoded or prefixed with &lt;code&gt;Bearer&lt;/code&gt;. The requests are all there, but the dependency chain is hidden inside their values.&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://github.com/kareemheshaam/Reqvexa" rel="noopener noreferrer"&gt;Reqvexa&lt;/a&gt; to trace that chain.&lt;/p&gt;

&lt;p&gt;Reqvexa is an open-source HTTP provenance analyzer. Give it a HAR file, select a target request, and it searches earlier traffic for the values that made the target possible. It then expands those relationships recursively into the smallest request flow supported by the capture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8cfnzy1w93b5j0lullfn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8cfnzy1w93b5j0lullfn.png" alt="Reqvexa analysis view showing traced and unresolved request values" width="799" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Reqvexa keeps supported, hypothetical, and unresolved values visible while masking sensitive values by default.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem hidden inside a HAR file
&lt;/h2&gt;

&lt;p&gt;Imagine that the request you care about is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /api/products
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It contains a session cookie, an access token, a CSRF token, and a custom signature. Looking at that request tells you what was sent. It does not tell you where each value came from.&lt;/p&gt;

&lt;p&gt;A representative Reqvexa result looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Target: POST /api/products

Required state
session       &amp;lt;- POST /login       SUPPORTED
csrf_token    &amp;lt;- GET /csrf         SUPPORTED
access_token  &amp;lt;- POST /refresh      SUPPORTED
x-signature   &amp;lt;- not observed       UNKNOWN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That state graph can then become a minimal prerequisite flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /login
    -&amp;gt; GET /csrf
    -&amp;gt; POST /refresh
    -&amp;gt; POST /api/products
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unrelated images, analytics calls, fonts, and API requests are left outside the flow unless their responses actually contain a required value.&lt;/p&gt;

&lt;p&gt;This is the difference between inspecting browser traffic and understanding HTTP request dependencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reqvexa searches for values, not field names
&lt;/h2&gt;

&lt;p&gt;The central idea is intentionally simple.&lt;/p&gt;

&lt;p&gt;If the target contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Authorization: Bearer eyJhbGciOi...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reqvexa does not search earlier traffic for the word &lt;code&gt;Authorization&lt;/code&gt;. It searches for the runtime token value itself.&lt;/p&gt;

&lt;p&gt;The same rule applies to cookies, query parameters, form fields, and nested JSON values. A field named &lt;code&gt;csrfToken&lt;/code&gt; is not useful evidence by itself. Finding its exact value in an earlier response is.&lt;/p&gt;

&lt;p&gt;Reqvexa treats earlier response material as searchable text, regardless of whether it came from JSON, HTML, plain text, a response header, or a cookie. This avoids making provenance depend on a response MIME type or a particular JSON schema.&lt;/p&gt;

&lt;p&gt;It also checks common alternate representations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The value as captured.&lt;/li&gt;
&lt;li&gt;URL-decoded forms.&lt;/li&gt;
&lt;li&gt;Base64 and base64url forms.&lt;/li&gt;
&lt;li&gt;Authorization values with and without the &lt;code&gt;Bearer&lt;/code&gt; prefix.&lt;/li&gt;
&lt;li&gt;Structured Base64 content, including useful JSON keys and values when the complete structure is not present.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only traffic that occurred before the request being analyzed is eligible as a source. That temporal boundary both improves accuracy and avoids scanning irrelevant future traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  From one match to the complete request flow
&lt;/h2&gt;

&lt;p&gt;Finding one token is only the beginning.&lt;/p&gt;

&lt;p&gt;Suppose Reqvexa finds the target access token in the response from &lt;code&gt;/refresh&lt;/code&gt;. The &lt;code&gt;/refresh&lt;/code&gt; request may itself require an older refresh token. Reqvexa analyzes that producer request next, finds the earlier response that supplied its state, and keeps walking backward.&lt;/p&gt;

&lt;p&gt;Conceptually, the graph is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;request -&amp;gt; response -&amp;gt; value version -&amp;gt; request
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This matters when values change during a session. Reqvexa tracks temporal versions instead of assuming that every cookie or header with the same name is the same state. A newer session value should not be attributed to a response that only contained an older one.&lt;/p&gt;

&lt;p&gt;The result is an evidence-bearing flow, not a guess based on URL names or request proximity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4nirfnprd5uydzkf2xxd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4nirfnprd5uydzkf2xxd.png" alt="Reqvexa required request flow with request and response inspection" width="799" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The Analysis tab isolates the requests required by the traced flow and keeps their request and response data available for inspection.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Supported evidence is different from a hypothesis
&lt;/h2&gt;

&lt;p&gt;Traffic analysis tools can become misleading when every correlation is presented as certainty. Reqvexa makes the distinction visible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SUPPORTED
producer: POST /login
evidence: compatible value found in an earlier response

UNKNOWN / HYPOTHETICAL
source: not established by this capture
evidence: request-side value with no matching earlier response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;SUPPORTED&lt;/code&gt; means the capture contains evidence for the relationship. &lt;code&gt;UNKNOWN&lt;/code&gt; does not mean the value is invalid. It means the HAR file does not reveal its source.&lt;/p&gt;

&lt;p&gt;An unresolved value may have been generated by client-side JavaScript, loaded before recording began, derived cryptographically, or stored outside the captured flow. Reqvexa keeps it unresolved instead of inventing a producer.&lt;/p&gt;

&lt;p&gt;That distinction is especially useful during API reverse engineering and browser automation work: it tells you which parts of a workflow are explained by network evidence and which parts still require investigation.&lt;/p&gt;

&lt;h2&gt;
  
  
  A desktop workflow for large captures
&lt;/h2&gt;

&lt;p&gt;Reqvexa includes an optional Flet desktop interface designed for working through real traffic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Traffic tab lists captured requests and opens the request and response side by side.&lt;/li&gt;
&lt;li&gt;A Logs tab streams analysis progress while the scan is running.&lt;/li&gt;
&lt;li&gt;An Analysis tab appears as soon as analysis starts and fills with discovered results.&lt;/li&gt;
&lt;li&gt;Each analysis gets its own tab containing only the requests required for that flow.&lt;/li&gt;
&lt;li&gt;Values can be ignored and the analysis can be rerun without them.&lt;/li&gt;
&lt;li&gt;Sensitive values are masked by default and can be revealed deliberately during local inspection.&lt;/li&gt;
&lt;li&gt;Long response bodies are bounded so that accidentally opening a large JavaScript file does not freeze the interface.&lt;/li&gt;
&lt;li&gt;Analysis can be stopped while it is running.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The CLI exposes the same core engine for scripts and repeatable reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try Reqvexa with the included synthetic capture
&lt;/h2&gt;

&lt;p&gt;Reqvexa currently requires Python 3.12 or newer. The repository includes a synthetic HAR fixture, so you can try it without sharing or recording real traffic.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/kareemheshaam/Reqvexa.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Reqvexa
python &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Activate the environment on Linux or macOS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or on Windows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;venv&lt;/span&gt;&lt;span class="n"&gt;\Scripts\Activate.ps1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the project with its GUI dependency and open the fixture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;".[gui]"&lt;/span&gt;
reqvexa gui fixtures/minimal.har.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the command line workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;reqvexa analyze fixtures/minimal.har.json
reqvexa trace fixtures/minimal.har.json &lt;span class="nt"&gt;--request&lt;/span&gt; REQUEST_ID
reqvexa plan fixtures/minimal.har.json &lt;span class="nt"&gt;--request&lt;/span&gt; REQUEST_ID
reqvexa report fixtures/minimal.har.json &lt;span class="nt"&gt;--request&lt;/span&gt; REQUEST_ID &lt;span class="nt"&gt;--format&lt;/span&gt; markdown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The included example resolves an observed session value and leaves an unobserved signature value unknown. That small fixture demonstrates the most important behavior: explain what the evidence supports and preserve what it does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Reqvexa is useful
&lt;/h2&gt;

&lt;p&gt;Reqvexa is built for developers who need to understand stateful HTTP workflows, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Debugging a multi-step authenticated API flow.&lt;/li&gt;
&lt;li&gt;Finding where cookies and tokens first appeared.&lt;/li&gt;
&lt;li&gt;Reducing a large browser capture to the requests required by one operation.&lt;/li&gt;
&lt;li&gt;Investigating why a replayed request is missing state.&lt;/li&gt;
&lt;li&gt;Documenting request dependencies for QA, scraping, or browser automation.&lt;/li&gt;
&lt;li&gt;Comparing observed server-provided values with unresolved client-side state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It analyzes the capture locally and does not send requests to the recorded site.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the alpha does not claim to do
&lt;/h2&gt;

&lt;p&gt;Reqvexa is currently an alpha release focused on explanation. It does not yet replay requests, generate an API client, record a browser session, execute JavaScript, or reconstruct cryptographic signatures.&lt;/p&gt;

&lt;p&gt;Those boundaries are deliberate. Before automating a workflow, I want the tool to produce a request plan whose dependencies can be inspected and defended with evidence.&lt;/p&gt;

&lt;p&gt;The current release includes 28 tests and 16 deterministic synthetic benchmark cases. The benchmark is a regression suite, not a claim that every real-world HAR can be fully resolved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open source and looking for real feedback
&lt;/h2&gt;

&lt;p&gt;Reqvexa is available under the MIT license:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub: &lt;a href="https://github.com/kareemheshaam/Reqvexa" rel="noopener noreferrer"&gt;kareemheshaam/Reqvexa&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If state provenance would help your debugging or automation workflow, try the synthetic fixture, inspect the implementation, and open an issue for a reproducible case the engine does not cover. A star also helps other developers discover the project while it is still young.&lt;/p&gt;

&lt;p&gt;Browser traffic already tells us what happened. Reqvexa is an attempt to make it explain why.&lt;/p&gt;

</description>
      <category>python</category>
      <category>opensource</category>
      <category>webscraping</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
