Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help] GetElementById , Simple question

[Help] GetElementById , Simple question

Posts 1–15 of 17 · Page 1 of 2
LY
Lyoto Machida
[Help] GetElementById , Simple question
Code:
If MyForm.Contains(WebBrowser) = False And I.Can.GetElementById = True Then
Msgbox(How?)
End if
#1 · edited 15y ago · 15y ago
VernK
VernK
Can you elaborate I'm not sure I get your question, I think if you want to get the ElementByID use
Code:
Webbrowser1.Document.GetElementbyID ("?")
#2 · 15y ago
LY
Lyoto Machida
Lol NO, I want to getElementById without Webbrowser xD
If possible..
#3 · 15y ago
VernK
VernK
THen
Code:
Imports System.net
Dim e as String = New Webclient().Downloadstring("?")
Then just use the Get Element by ID
#4 · 15y ago
LY
Lyoto Machida
Quote Originally Posted by VernK View Post
THen
Code:
Imports System.net
Dim e as String = New Webclient().Downloadstring("?")
Then just use the Get Element by ID
YAh , How -_-
Not that easy, You cant do e.GetElementById("BLABLA")
#5 · 15y ago
VernK
VernK
Didn't Jason help you to make your IP manager without WB? Try PMing him he probably knows

@Jason @Hassan
#6 · 15y ago
LY
Lyoto Machida
Quote Originally Posted by VernK View Post
Didn't Jason help you to make your IP manager without WB? Try PMing him he probably knows

@Jason @Hassan
lol That was with XML...
#7 · 15y ago
freedompeace
freedompeace
if (browser.Document.GetElementbyID("freedompeace") != null)
// element exists..
#8 · 15y ago
IA
Iamazn1
Quote Originally Posted by freedompeace View Post
if (browser.Document.GetElementbyID("freedompeace") != null)
// element exists..
He's trying to use the Function GetElementByID without using a webbrowser. Basically like calling Form1.Show() without Form1...

1) If this is for your IP manager, you can try downloading the webpage's source using a WebClient and then loading the HTML/XML into an XMLDocument or whatever its called.
2) mshtml.
#9 · 15y ago
LY
Lyoto Machida
Quote Originally Posted by Iamazn1 View Post
He's trying to use the Function GetElementByID without using a webbrowser. Basically like calling Form1.Show() without Form1...

1) If this is for your IP manager, you can try downloading the webpage's source using a WebClient and then loading the HTML/XML into an XMLDocument or whatever its called.
2) mshtml.
I DIDN SAY NOTHING ABOUT IP MANAGER.

Im just asking if is possible getElementbyId without a webbrowser.
#10 · 15y ago
Hassan
Hassan
Use the library Jason released few days ago. And learn string manipulation.
#11 · 15y ago
Jason
Jason
You can do it, but it means using a COM object called HTML Object Library. It renders text into a HTML document which you can then call getElementById...etc. IMO you should just create a custom function to find it, or as Hassan said, use my library.

Here's some code that I'd start with, using RegEx

[highlight=vb.net]
Imports System.Text.RegularExpressions
[/highlight]

[highlight=vb.net]
Private Function ReplaceMetachars(ByVal input As String) As String
Dim output As String = input
Dim chars As String = "[\+*?(|$^.)"
For Each s As String In chars
output = output.Replace(s, "\" & s)
Next
Return output
End Function

Private Function GetElementByID(ByVal ID As String, ByVal src As String) As String
Dim idPattern As String = "<([a-zA-Z]*)\s.*?id=""" & ReplaceMetachars(ID) & """[\s\S]*?</\1>"
Dim m As Match = Regex.Match(src, idPattern, RegexOptions.Compiled)
Return m.Value
End Function
[/highlight]

And after that I'd probably build a custom "Element" class to do various operations on the value so that it's similar to a HTMLElement in terms of functionality. Then I'd make the function return an "Element" instead of a raw string.
#12 · 15y ago
Hassan
Hassan
Jason, what if the tag contains numbers ?

Modified a bit to support numbers in tag:

[highlight=vbnet]Dim idPattern As String = "<([a-zA-Z0-9]*)\s.*?id=""" & ReplaceMetachars(ID) & """[\s\S]*?</\1>"[/highlight]
#13 · 15y ago
Jason
Jason
Quote Originally Posted by Hassan View Post
Jason, what if the tag contains numbers ?

Modified a bit to support numbers in tag:

[highlight=vbnet]Dim idPattern As String = "<([a-zA-Z0-9]*)\s.*?id=""" & ReplaceMetachars(ID) & """[\s\S]*?</\1>"[/highlight]
DERP, i forgot that the "h" tags have numbers. My bad. Seeing as you're using the whole character class, may as well just do

[highlight=vbnet]Dim idPattern As String = "<(\w*)\s.*?id=""" & ReplaceMetachars(ID) & """[\s\S]*?</\1>"[/highlight]
#14 · 15y ago
freedompeace
freedompeace
Quote Originally Posted by Iamazn1 View Post
He's trying to use the Function GetElementByID without using a webbrowser. Basically like calling Form1.Show() without Form1...

1) If this is for your IP manager, you can try downloading the webpage's source using a WebClient and then loading the HTML/XML into an XMLDocument or whatever its called.
2) mshtml.
"I.Can.GetElementById = True"

Then what on earth does that mean? :/
#15 · 15y ago
Posts 1–15 of 17 · Page 1 of 2

Post a Reply

Tags for this Thread

None