Injects keypress listener to hijack pressed keys in a webview, demonstration purpose only.
- initiate a webview (
WKWebView
) with a configuration (WKWebViewConfiguration
) that allows getting updates from the injected javascript, ref - load a url into webview ref
- inject a javascript code and override
keypress
event handler ref - observe pressed keys ref
webview-keylogger-screencast.mp4
Erk Ekin 2022