├── README.md ├── Extract JSON ├── Extract Emails └── Twitter User ID /README.md: -------------------------------------------------------------------------------- 1 | # osint-bookmarklets 2 | Bookmarklets created for OSINT applications 3 | -------------------------------------------------------------------------------- /Extract JSON: -------------------------------------------------------------------------------- 1 | javascript:(function()%7B%2F%2F Extract all text content from the page%0Avar allText %3D document.body.innerText%3B%0A%0A%2F%2F Create a Blob containing the text data%0Avar blob %3D new Blob(%5BallText%5D%2C %7B type%3A 'application%2Fjson' %7D)%3B%0A%0A%2F%2F Create a download link%0Avar a %3D document.createElement('a')%3B%0Aa.href %3D URL.createObjectURL(blob)%3B%0Aa.download %3D 'text_data.json'%3B%0A%0A%2F%2F Simulate a click to trigger the download%0Aa.click()%3B%7D)()%3B 2 | -------------------------------------------------------------------------------- /Extract Emails: -------------------------------------------------------------------------------- 1 | // This will extract emails and source domain from a page, save it as a CSV, and name the CSV the URL of the page. 2 | 3 | javascript:(function(){var e=/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,t=new Set,o=window.location.hostname.match(/[a-zA-Z0-9]+\.[a-zA-Z0-9]+$/),n=document.createElement("a"),urlName=window.location.href.replace(/[^a-zA-Z0-9]/g, '_');document.querySelectorAll("*").forEach(function(n){var r=n.innerHTML.match(e);r&&r.forEach(function(e){t.add([e,o].join(","))})}),t=Array.from(t).join("\n"),t&&((n.href="data:text/csv;charset=utf-8,"+escape(t),n.target="_blank",n.download=urlName+".csv",n.click()))})(); 4 | 5 | -------------------------------------------------------------------------------- /Twitter User ID: -------------------------------------------------------------------------------- 1 | javascript:(function()%7Bjavascript%3A(function()%20%7B%0A%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20var%20scriptContent%20%3D%20document.evaluate(%0A%20%20%20%20%20%20%20%20%20%20%20%20'%2F%2Fscript%5B%40type%3D%22application%2Fld%2Bjson%22%5D'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20document.lastChild%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20null%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20XPathResult.ANY_TYPE%2C%20null%0A%20%20%20%20%20%20%20%20).iterateNext().textContent%3B%0A%0A%20%20%20%20%20%20%20%20var%20jsonData%20%3D%20JSON.parse(scriptContent)%3B%0A%20%20%20%20%20%20%20%20var%20identifier%20%3D%20jsonData.author%20%26%26%20jsonData.author.identifier%3B%0A%20%20%20%20%20%20%20%20if%20(identifier)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20userChoice%20%3D%20confirm(%22Twitter%20User%20ID%3A%20%22%20%2B%20identifier%20%2B%20%22%5Cn%5CnClick%20OK%20to%20copy%20to%20clipboard.%22)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if(userChoice)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20navigator.clipboard.writeText(identifier).then(function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20console.log('Identifier%20copied%20to%20clipboard.')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D).catch(function(err)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20console.error('Could%20not%20copy%20identifier%20using%20clipboard%20API%3A'%2C%20err)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20prompt(%22Unable%20to%20access%20clipboard.%20Please%20copy%20manually%3A%22%2C%20identifier)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20alert(%22Identifier%20not%20found!%22)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%20catch%20(err)%20%7B%0A%20%20%20%20%20%20%20%20alert(%22Error%20fetching%20or%20processing%20data%3A%20%22%20%2B%20err.message)%3B%0A%20%20%20%20%7D%0A%7D)()%3B%7D)()%3B 2 | 3 | H/T: @GONZOs_int 4 | --------------------------------------------------------------------------------