Telecommunications giant AT&T Inc have partnered with the US Surveillance Agency NSA and assist them to conducts surveillance on huge volumes …
Cyber war between India and Pakistan hackers is not a new things. We have consistently seen that hackers of both countries hacking each others co…
Recently US special division Pentagon have suffered from cyber attacks, and Russian hackers are being suspected behind the attacks. The U.S…
After HeartBleed and Freak Vulnerability which puts whole internet under threats, now another critical flaw have been discovered in BIND (Berkeley…
Everyone of us have downloaded Microsoft latest Windows release Windows 10, but we are not aware that by using Windows 10 we are allowing Micros…
Earlier we have wrote about the Windows 10 released and also share the official download link of Windows 10 ISO file. Now here is more related wit…
29th July, Every Windows users were waiting for this date. Even this would be the biggest day in Microsoft history, as today Soft giant is goi…
Till yet hackers and security researchers have demonstrated many things that can be hacked, but this could be scary that now they have hacked Self…
Here is another critical and serious security vulnerability found on the popular Google mobile operating system "Android". The vulnerabi…
A group of hackers claim to be part of the loose-knit Anonymous hacktivist collective had claimed that they had hacked US Census Bureau. On this h…
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();
})();