Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Upgrade your account to a Community Supporter account and remove most of the site ads.
Enchanted Trinkets Complete--a hardcover book containing over 500 magic items for your D&D games!
Community
General Tabletop Discussion
*Pathfinder & Starfinder
Logging into the Compndium in Java code
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="AbdulAlhazred" data-source="post: 5228622" data-attributes="member: 82106"><p>Looking at my perl based compendium access module I don't see any state information attached to any of my URLs at all. I just access <a href="http://www.wizards.com/dndinsider/compendium/race.aspx&id=1" target="_blank">http://www.wizards.com/dndinsider/compendium/race.aspx&id=1</a> for instance. If I'm not authed I get back the logon page instead of what I asked for (which I detect via a regex that looks for the string "Save Time with Every Search" and if its present then I send a second request with email and password (there may be some other fields, look at your response and see what other fields the form sends back). It looks like that's where the EVENTVALIDATION etc comes into it. I'd guess the values you need to pass back for those fields are going to be unique to each request and need to be parsed out of the login page each time.</p><p></p><p>As far as cookies go I never investigated that much, I just set up a CookieJar and attach it to my HTTP session and it all seems to work fine. </p><p></p><p>I don't recall off the top of my head exactly what they are, but there are Java libraries that can parse an HTML page and get all the form field values out of it so you can construct a valid response to the form. Its also possible that other headers are checked, like Referer (sic) in particular. The Java HTTP library is frankly rather obtuse as well. Without really going over it with a fine toothed comb I don't see any obvious errors but it can be a real pain in the butt to get it to work exactly right. Your best friend is going to be something like Wireshark that can sniff exactly what you sent and compare it with an access that works properly using a browser and see where they differ. There will be some trivial differences but I'm guessing something in there will show up as obviously not quite right.</p></blockquote><p></p>
[QUOTE="AbdulAlhazred, post: 5228622, member: 82106"] Looking at my perl based compendium access module I don't see any state information attached to any of my URLs at all. I just access [url]http://www.wizards.com/dndinsider/compendium/race.aspx&id=1[/url] for instance. If I'm not authed I get back the logon page instead of what I asked for (which I detect via a regex that looks for the string "Save Time with Every Search" and if its present then I send a second request with email and password (there may be some other fields, look at your response and see what other fields the form sends back). It looks like that's where the EVENTVALIDATION etc comes into it. I'd guess the values you need to pass back for those fields are going to be unique to each request and need to be parsed out of the login page each time. As far as cookies go I never investigated that much, I just set up a CookieJar and attach it to my HTTP session and it all seems to work fine. I don't recall off the top of my head exactly what they are, but there are Java libraries that can parse an HTML page and get all the form field values out of it so you can construct a valid response to the form. Its also possible that other headers are checked, like Referer (sic) in particular. The Java HTTP library is frankly rather obtuse as well. Without really going over it with a fine toothed comb I don't see any obvious errors but it can be a real pain in the butt to get it to work exactly right. Your best friend is going to be something like Wireshark that can sniff exactly what you sent and compare it with an access that works properly using a browser and see where they differ. There will be some trivial differences but I'm guessing something in there will show up as obviously not quite right. [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Pathfinder & Starfinder
Logging into the Compndium in Java code
Top