Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( SMSCSVHeaders = []string{ "ID", "THREAD_ID", "ADDRESS", "ADDRESS_DEVICE_ID", "PERSON", "DATE_RECEIVED", "DATE_SENT", "PROTOCOL", "READ", "STATUS", "TYPE", "REPLY_PATH_PRESENT", "DELIVERY_RECEIPT_COUNT", "SUBJECT", "BODY", "MISMATCHED_IDENTITIES", "SERVICE_CENTER", "SUBSCRIPTION_ID", "EXPIRES_IN", "EXPIRE_STARTED", "NOTIFIED", "READ_RECEIPT_COUNT", } MMSCSVHeaders = []string{ "ID", "THREAD_ID", "DATE_SENT", "DATE_RECEIVED", "MESSAGE_BOX", "READ", "m_id", "sub", "sub_cs", "BODY", "PART_COUNT", "ct_t", "CONTENT_LOCATION", "ADDRESS", "ADDRESS_DEVICE_ID", "EXPIRY", "m_cls", "MESSAGE_TYPE", "v", "MESSAGE_SIZE", "pri", "rr", "rpt_a", "resp_st", "STATUS", "TRANSACTION_ID", "retr_st", "retr_txt", "retr_txt_cs", "read_status", "ct_cls", "resp_txt", "d_tm", "DELIVERY_RECEIPT_COUNT", "MISMATCHED_IDENTITIES", "NETWORK_FAILURE", "d_rpt", "SUBSCRIPTION_ID", "EXPIRES_IN", "EXPIRE_STARTED", "NOTIFIED", "READ_RECEIPT_COUNT", } )
CSV column headers.
var ProtoCommitHash = "d6610f0"
ProtoCommitHash is the commit hash of the Signal Protobuf spec.
Functions ¶
func StatementToStringArray ¶
func StatementToStringArray(sql *signal.SqlStatement) []string
StatementToStringArray formats a SqlStatement fairly literally as an array. Null parameters are left empty.
Types ¶
type BackupFile ¶
type BackupFile struct { File *bytes.Buffer CipherKey []byte MacKey []byte Mac hash.Hash IV []byte Counter uint32 }
BackupFile holds the internal state of decryption of a Signal backup.
func NewBackupFile ¶
func NewBackupFile(path, password string) (*BackupFile, error)
NewBackupFile initialises a backup file for reading using the provided path and password.
func (*BackupFile) DecryptAttachment ¶
func (bf *BackupFile) DecryptAttachment(a *signal.Attachment, out io.Writer) error
DecryptAttachment reads the attachment immediately next in the file's bytes.
func (*BackupFile) Frame ¶
func (bf *BackupFile) Frame() (*signal.BackupFrame, error)
Frame returns the next frame in the file.
func (*BackupFile) Slurp ¶
func (bf *BackupFile) Slurp() ([]*signal.BackupFrame, error)
Slurp consumes the entire BackupFile and returns a list of all frames contained in the file. Note that after calling this function, the underlying file buffer will be empty and the file should be considered dropped. Calling any function on the backup file after calling Slurp will fail.
Note that any attachments in the backup file will not be handled.
type MMS ¶
type MMS struct { XMLName xml.Name `xml:"mms"` Parts []MMSPart `xml:"parts,attr"` TextOnly *uint64 `xml:"text_only,attr"` // optional Sub *string `xml:"sub,attr"` // optional RetrSt string `xml:"retr_st,attr"` // required Date uint64 `xml:"date,attr"` // required CtCls string `xml:"ct_cls,attr"` // required SubCs string `xml:"sub_cs,attr"` // required Read uint64 `xml:"read,attr"` // required CtL string `xml:"ct_l,attr"` // required TrID string `xml:"tr_id,attr"` // required St string `xml:"st,attr"` // required MsgBox uint64 `xml:"msg_box,attr"` // required Address uint64 `xml:"address,attr"` // required MCls string `xml:"m_cls,attr"` // required DTm string `xml:"d_tm,attr"` // required ReadStatus string `xml:"read_status,attr"` // required CtT string `xml:"ct_t,attr"` // required RetrTxtCs string `xml:"retr_txt_cs,attr"` // required DRpt uint64 `xml:"d_rpt,attr"` // required MId string `xml:"m_id,attr"` // required DateSent uint64 `xml:"date_sent,attr"` // required Seen uint64 `xml:"seen,attr"` // required MType uint64 `xml:"m_type,attr"` // required V uint64 `xml:"v,attr"` // required Exp string `xml:"exp,attr"` // required Pri uint64 `xml:"pri,attr"` // required Rr uint64 `xml:"rr,attr"` // required RespTxt string `xml:"resp_txt,attr"` // required RptA string `xml:"rpt_a,attr"` // required Locked uint64 `xml:"locked,attr"` // required RetrTxt string `xml:"retr_txt,attr"` // required RespSt string `xml:"resp_st,attr"` // required MSize string `xml:"m_size,attr"` // required ReadableDate *string `xml:"readable_date,attr"` // optional ContactName *string `xml:"contact_name,attr"` // optional }
MMS represents a Multimedia Messaging Service record.
type MMSPart ¶
type MMSPart struct { XMLName xml.Name `xml:"part"` Seq uint64 `xml:"seq,attr"` // required Ct uint64 `xml:"ct,attr"` // required Name string `xml:"name,attr"` // required ChSet string `xml:"chset,attr"` // required Cd string `xml:"cd,attr"` // required Fn string `xml:"fn,attr"` // required CID string `xml:"cid,attr"` // required Cl string `xml:"cl,attr"` // required CttS string `xml:"ctt_s,attr"` // required CttT string `xml:"ctt_t,attr"` // required Text string `xml:"text,attr"` // required Data *string `xml:"data,attr"` // optional }
MMSPart holds a data blob for an MMS.
type MultiWriter ¶
MultiWriter is a convenience wrapper around an io.Writer to allow multiple consecutive (safe) writes.
func NewMultiWriter ¶
func NewMultiWriter(w io.Writer) *MultiWriter
NewMultiWriter returns a new instance of a multi writer.
func (*MultiWriter) Error ¶
func (w *MultiWriter) Error() error
Error returns the final error message of the writer.
func (*MultiWriter) W ¶
func (w *MultiWriter) W(p []byte)
W writes a slice of bytes to the underlying writer, or silently fails if there was a previous error.
type SMS ¶
type SMS struct { XMLName xml.Name `xml:"sms"` Protocol *uint64 `xml:"protocol,attr"` // optional Address string `xml:"address,attr"` // required Date string `xml:"date,attr"` // required Type SMSType `xml:"type,attr"` // required Subject *string `xml:"subject,attr"` // optional Body string `xml:"body,attr"` // required TOA *string `xml:"toa,attr"` // optional SCTOA *string `xml:"sc_toa,attr"` // optional ServiceCenter *string `xml:"service_center,attr"` // optional Read uint64 `xml:"read,attr"` // required Status int64 `xml:"status,attr"` // required Locked *uint64 `xml:"locked,attr"` // optional DateSent *uint64 `xml:"date_sent,attr"` // optional ReadableDate *string `xml:"readable_date,attr"` // optional ContactName *string `xml:"contact_name,attr"` // optional }
SMS represents a Short Message Service record.