Reliance Jio is now on another way, after offering unlimited 4G data, voice and SMS service under its Preview offer. The new and exciting news is …
As we all know that Jio, also known as Reliance Jio and officially as Reliance Jio Infocomm Limited, it is an upcoming provider of mobile telephony,…
A group of hackers going by the name “ The Shadow Brokers ” claims to have penetrated an NSA-backed hacking operation , and has leaked a bunch of …
A well know security researcher and mine good friend 'Rafay Baloch' have discovered another vulnerability on most popular web browsers, Go…
This year at I/O Google announced its video chatting app called Duo, along with a messaging app Allo. The release of both the app is by the end of…
Reliance Jio has been on headlines from last couple of months for is latest 4G free unlimited service on their preview offer. Again here we have…
A newly discovered vulnerability mainly in Linux system can terminate the connection between two parties remotely. Even if the connection betwee…
The Australian census website was shut down by what authorities said was a series of deliberate attacks from overseas hackers. Millions of Austr…
Recently an American Airlines named 'Delta Airlines' flights had been late and some of the flights had been suspended also. Although the r…
Another alert for all Android users, and again this alert for high severity vulnerability. On Sunday, security researcher at Def Con security co…
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();
})();