F
F
foxlye2019-03-19 21:08:04
C++ / C#
foxlye, 2019-03-19 21:08:04

How to get a value from a file on a website?

Welcome all!
I have this code:

WebClient wc = new WebClient();
            string url = "link.domain/ver.txt";
            string save_path = fpath;
            string name = "ver.txt";
            MessageBox.Show(save_path);
            wc.DownloadFile(url, save_path + name);

Everything seems to work, but the fact is that on the server the txt file contains information, and the downloaded one is empty.
Downloaded file:
5c8bd8b09e16e394182941.png
File on the server:
5c8bd8c374d9c877906029.png
Downloading the line will not work, because it requires JavaScript to be enabled.
It turns out the file contains:
<html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("a5924840b474b8715e22ced44fb5ebf9");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="http://xwqewqerrt.epizy.com/ver.txt?i=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question