voicemail.js 1008 B

12345678910111213141516171819202122232425262728293031323334
  1. module.exports.name = 'voicemail'
  2. module.exports.description = 'List all or extract voicemails on device'
  3. // Specify this reporter requires a backup.
  4. // The second parameter to func() is now a backup instead of the path to one.
  5. module.exports.requiresBackup = true
  6. // Specify this only works for iOS 10+
  7. module.exports.supportedVersions = '>=9.0'
  8. module.exports.func = function (program, backup) {
  9. backup.getVoicemailsList()
  10. .then((items) => {
  11. program.formatter.format(items, {
  12. color: program.color,
  13. columns: {
  14. 'ID': el => el.ROWID,
  15. 'Date': el => el.XFORMATTEDDATESTRING,
  16. 'Sender': el => el.sender,
  17. 'Token': el => el.token,
  18. 'Duration': el => el.duration,
  19. 'Expiration': el => el.expiration,
  20. 'Duration': el => el.duration,
  21. 'Trashed': el => el.trashed_date,
  22. 'Flags': el => el.flags
  23. }
  24. })
  25. })
  26. .catch((e) => {
  27. console.log('[!] Encountered an Error:', e)
  28. })
  29. }