The world's largest professional social network LinkedIn, which has more than 500 million users was suffering from a vulnerability that allows …
Serving the nation is a matter of immense pride for everybody! Being a part of the Defense Academy of India has its own set of perks and benefits…
In first half of 2017, Indian Computer Emergency Response Team (CERT-In) have received more than 27,000 cyber incidence. In the report that was …
Today digital currency have dropped by $2,000 after a very long time. And here we have got another updates that Blockchain startup Coindash Sales …
WikiLeaks published another document under Vault 7 series which revealed another project of CIA named HighRise. According to WikiLeaks, HighRis…
PSY Gangnam Style is one which is mostly watch on YouTube it have crossed 2.5 millions of views. Back in December 2014, this video have also cra…
Couple of days ago, a news came up with the data breach of Reliance Jio, where someone have pushed up the data of Jio customer on a site Magicapk.…
Israel technology company, Nice system exposed millions of Verizon customers data openly available for everyone. About 14 millions data of subsc…
After making many headlines, Jio once again back with the great offer for it's users. As company have already told that Jio will provide data …
In the Vault 7 series of CIA leaks, WikiLeaks have published another documents. Within this release, WikiLeaks have published about the two projec…
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();
})();