Summary
This uses AppleEvents to list information about all of the open tabs in all of the open Chrome instances.
If Chrome is not currently running, this will launch Chrome (potential OPSEC issue) and might have a conflict with trying to access Chrome tabs as Chrome is starting. It’s recommended to not use this unless Chrome is already running.
Use the list_apps function to check if Chrome is running.
In Mojave+ (10.14+) this will cause a popup the first time asking for permission for your process to access Chrome.
- Needs Admin: False
- Version: 1
- Author: @its_a_feature_
Arguments
Usage
MITRE ATT&CK Mapping
Detailed Summary
This boils down to a few AppleEvents to enumerate the open tabs in Chrome instances:
let ch = Application("Google Chrome");
if(ch.running()){
for (let i = 0; i < ch.windows.length; i++){
let win = ch.windows[i];
tabs["Window " + i] = {};
for (let j = 0; j < win.tabs.length; j++){
let tab = win.tabs[j];
tabs["Window " + i]["Tab " + j] = {"title": tab.title(), "url": tab.url()};
}
}
}