Add more contact-update + better phone check

This commit is contained in:
Adhiraj Singh
2020-12-30 11:26:46 +05:30
parent ebaf9280b3
commit 100c8fd96d
5 changed files with 34 additions and 21 deletions

View File

@@ -3,8 +3,7 @@ import { decryptWA } from './WAConnection/WAConnection'
import Decoder from './Binary/Decoder'
interface BrowserMessagesInfo {
encKey: string,
macKey: string,
bundle: { encKey: string, macKey: string }
harFilePath: string
}
interface WSMessage {
@@ -14,8 +13,8 @@ interface WSMessage {
const file = fs.readFileSync ('./browser-messages.json', {encoding: 'utf-8'})
const json: BrowserMessagesInfo = JSON.parse (file)
const encKey = Buffer.from (json.encKey, 'base64')
const macKey = Buffer.from (json.macKey, 'base64')
const encKey = Buffer.from (json.bundle.encKey, 'base64')
const macKey = Buffer.from (json.bundle.macKey, 'base64')
const harFile = JSON.parse ( fs.readFileSync( json.harFilePath , {encoding: 'utf-8'}))
const entries = harFile['log']['entries']