On Wed, Jul 12, 2017 at 06:42:57PM +0700, Robert Elz wrote: > Whether it works or not (I have no current means to test it either) > parrt of the issue is that it needs to work using only what is available > in NetBSD release - so starting with #!/usr/pkg/bin/lua5.2 is not a good > sign! >
Yeah, didn't want to figure out how to point base lua into pkgsrc lua libraries. > Beyond that: > > -- assumes the fields are called 'username' and 'password' > > they probably aren't, they can be anything. You really need to parse > the form. There are also often "hidden input" fields, where the form > provides the value to be sent back (which a normal browser user never > sees.) > Sure, will do that. That will probably require an XML library. amusing bit on the topic: https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags