Accessing wabpages with HTTPClient in C#

Website URL

Applies on all sites, but I can give you my url: http://site-mm.rf.gd/v/getFiles.php

Error Message

I want to get information with a C# program (C# → .exe) from my website. Normally, it just works with HttpClient, but when I do that on InfinityFree, I get as output this (error that HttpClient doesn’t support JavaScript):

This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support

Other Information

The output should be “0.1.5”, but it is that error message. How can I, using C#, get something that I can edit (0.1.5)?

I just noticed the error was in HTML format so it didn’t show the text. This is the error:

<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("d694f893a12ecccb55de7751353e9c76");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="http://site-mm.rf.gd/v/getVersion.php?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>

Also, the PHP in getVersion.php* (Its getVersion.php, not getFiles.php) is this, really simple (directly accessing version.txt didn’t work either):

<?php
$fileContents = file_get_contents('version.txt');
echo $fileContents;

The response you’re seeing is the result of this security system:

Unfortunately, this means that you cannot use free hosting for this application.

6 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.