Skip to content

Instantly share code, notes, and snippets.

@sl0ki
Created March 18, 2016 14:17
Show Gist options
  • Save sl0ki/a6a183b4eff7891e5e1d to your computer and use it in GitHub Desktop.
Save sl0ki/a6a183b4eff7891e5e1d to your computer and use it in GitHub Desktop.
how to restore deleted vk messages
// got to vk.im/ page
// copy paste this js to console and run
// profit
var lastMsgId = parseInt(geByClass('dialogs_row ')[0].className.match(/dialogs_msg(.*)/)[1]);
var lastMsgId = lastMsgId + 10;
for (var i = lastMsgId; i > lastMsgId - 100; i--) {
var id = i;
console.log('try restore message: ' + id);
ajax.post('al_mail.php', {act: 'a_restore', id: i, from: 'im', hash: cur.mark_hash, gid: cur.gid});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment