Ridesharing firm Uber, have acknowledged that they had hidden the massive data breach of about 60 million records, which includes personal informa…
Almost for 17 years, a critical security bug was present in Microsoft Office package which was even didn't knew by Microsoft. Embedi - a sec…
Recently OnePlus have been pointed for collecting users data without any user information, and again OnePlus in an eye for breaking users trus…
After releasing tonnes of leaked documents, data and tools within Vault 7 , now Wikileaks cameup with the new series named Vault 8 . Today, in V…
Sometimes the data loss can be depressing. The hardware failure and human error are common reasons for data loss. Happily, recovering data is achi…
An acidently triggered bug in a source code of Parity Ethereum wallet permanently freezes all the Ethereum within a wallet. The bug affected onl…
If you are a using a Tor service in Linux or Mac then here is an important updates for you all. Today, Tor project team have released a patch for …
We have seen many times that hackers hacked any individual or organisation for Ransome but, what if one hacker asked ransome to another hacker? Is…
Today Kaspersky has posted a transparency initiative reports which explains that Kaspersky has fetched the source code of NSA hacking tools via it…
A crypto mining service CoinHive DNS server has been hijacked by an unknown hacker and replaced with attackers' own DNS which helps in generat…
const config = {
safeID = 'safelink',
safeURL: ['/p/safelink.html'],
timer: 15,
redirect: true,
text: {
wait: 'The link will appear in 0 second',
direct: 'You’ll be redirected to the download link in 0 second',
shifted: 'Redirecting... [link] if you’re not redirected automatically.',
click: 'Click here',
btn: 'Direct to link.'
}
};
(() => {
const randomURL = url => url[Math.floor(Math.random() * url.length)];
const safeLink = () => config.safeURL.some(path => location.pathname.endsWith(path));
const safeMessage = (text, time) => {
const [start, end] = text.split('0');
return `${start} ${time} ${end}.
`;
};
const outboundLinks = () => {
const links = document.querySelectorAll('a.safeurl[href]');
if (!links.length) return;
links.forEach(anchor => {
const encoded = encodeURIComponent(btoa(anchor.href));
Object.assign(anchor, {
href: `${location.origin}${randomURL(config.safeURL)}?go=${encoded}`,
target: '_self',
rel: 'noopener'
})
})
};
const handleLink = () => {
const params = new URLSearchParams(location.search);
const encoded = params.get('go');
if (!encoded) return;
const link = atob(decodeURIComponent(encoded))
params.delete('go');
history.replaceState({}, '', location.pathname + (params.toString() ? '?' + params : ''));
let counter = config.timer;
const label = config.redirect ? config.text.direct : config.text.wait;
const box = document.getElementById(config.safeID);
if (!box) return;
box.removeAttribute('hidden');
box.innerHTML = safeMessage(label, counter);
const countdown = setInterval(() => {
counter--;
box.innerHTML = safeMessage(label, counter);
if (counter > 0) return;
clearInterval(countdown);
if (config.redirect) {
box.innerHTML = `${config.text.shifted.replace('[link]', `${config.text.click}`)}
`;
location.href = link;
} else {
box.innerHTML = '';
const btn = document.createElement('a');
//btn.className = 'btn';
btn.href = link;
btn.target = '_blank';
btn.rel = 'nofollow noopener noreferrer';
btn.innerHTML = `${config.text.btn}`;
box.appendChild(btn);
}
}, 1000)
};
safeLink() ? handleLink() : outboundLinks();
})();