[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Form filling, etc.



On Wed, 12 May 2021 Dennis Wicks wrote:
Greetings,

My bank and credit company use javascript or something similar to
build the login screen so my password manager can't find the user-id
and password fields to fill them in. The fields don't show up in the
downloaded source code or in the <ctl-U> source code so that is no
help.

Can anybody point me to some software, tutorials, etc. that will
discover the fields displayed on the screen and enable me to fill
them in?

% Method A

The web browser qutebrowser has a command :inspector (or in more
recent versions :devtools) which launches an elaborate environment for
inspecting all kinds of things about the page in the current tab.

The tool once launched presents different tabs for inspecting
different things. One of them --Elements-- shows a pretty view of the
DOM tree that constitutes the current tab's document.

At least, I think that's what it is. It looks like the page source,
except that it also includes modifications made by scripts to the
page.

So it could be the sort of thing you are looking for.

Other web browsers like firefox and chromium probably have similar
tools (and qutebrowser's own is probably based on one of
these). Depending on the browser, it might be called something like
"Web Inspector" or "DOM inspector".


% Method B

In the past I occasionally used a web browser called uzbl[1] and socat
like so...

 $ uzbl http://somesite.com/something.html 2>/dev/null & uzbl_pid=$!
 $ echo js document.documentElement.outerHTML |
    socat - unix-connect:/tmp/uzbl_socket_${uzbl_pid} > something_more.html

...after which something_more.html might contain items of interest
dynamically created by scripts (and so not present in something.html).

I prefered this method to "DOM Inspector" or whatever it's called,
because I got a text file with what I wanted right away without
needing to mess around learning how to use the gui interface.

But it is mostly just magic to me[2], so I do not know how to
accomplish the same with tools currently packaged in debian stable,
since the last debian release that included a uzbl package (AFAIK) was
stretch.

I do notice that like uzbl, qutebrowser has a socket in

 /run/$UID/qutebrowser/ipc-<md5sum of $USER>

but I have not yet figured out whether or how it can be used in a
similar way.

REFERENCES

1. https://www.uzbl.org/
2. Method cribbed from
https://web.archive.org/web/20160412024355/www.uzbl.org/wiki/dump

--
Ce qui est important est rarement urgent
et ce qui est urgent est rarement important
-- Dwight David Eisenhower


Reply to: