Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

[noob]HTML agility Pack, XPath, and parsing html.

Soo, This is my first time posting for help and i hope you guys go easy on me. I'm at best an amateur programmer and very new to c#.

Currently im trying to write a tool box that does various functions i would need at a library computer. Things like, Show process list, open ports, open the hosts file, it shows the local and external IP... a bunch of things anyways. What I'm currently trying to do is grab a list of proxies from a website.

This is the website I am using.
Code
http://spys.ru/en/https-ssl-proxy/

It contains a few tables, which i have had trouble making an Xpath expression to find so i chose to base it on the font class, looking at the source here is the ip and port i want to extract.

Code
<font class="spy14">168.63.84.211<script type="text/javascript">document.write("<font class=spy2>:<\/font>"+(TwoFourThreeTwo^Five9Five)+(Three2SevenThree^Six6Two)+(Four4FiveEight^FourOneFour)+(Five7OneOne^FourEightThree))</script><font class="spy2">:</font>3128</font>

This is the Xpath im using

Code
*//font [@class=\"spy14\"]

This actually returns a bit more then i want however i was able to strip that away, what i have been working for the last day to fix and can't figure out is why im not getting the port and how to fix it. I assume it has to do with the </font>3128</font>.


Does anyone have a tip for me here? maybe a nudge in the right direction?

Pretty much full function below, please ignore the sloppy-ness of my code and the organization if-loops

Spoiler (Click to View)
Thanks a lot super helpful response!

I had some suspicions about it be obfuscated but i ruled that out as i didn't think the JS would print out in the source as well.

Just to make sure
Code
(TwoFourThreeTwo^Five9Five)+(Three2SevenThree^Six6Two)+(Four4FiveEight^FourOneF​​our)+(Five7OneOne^FourEightThree)

This is the actual port number in its obfuscated form not the conversion method?

Anyways thank you very much for the the right direction, now ill have some stuff to dig into later on tonight.
Once again, thanks alot for the quick and useful reply. Its good to know that i was on the right track as i was actually dumping the source code out to a text box just to see what the program was getting. What i ended up getting was
Code
<font class="spy2">:</font></font>


Anyways once again thanks for the help!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by outlawNov 28, 2020 04:25 AM 12 367 Nov 28, 2020 04:25 AM
Last Post: Rmdy
[C#] by DeadShot32Sep 15, 2019 02:36 AM 3 187 Sep 15, 2019 02:36 AM
Last Post: riu41776
[C] by int main()Feb 4, 2019 11:03 PM 3 204 Feb 4, 2019 11:03 PM
Last Post: int main()