Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- window.token = window.top.location.href.split('auth=')[1].split('&')[0]
- window.username = window.top.location.href.split('username=')[1].split('&')[0]
- } catch {}
- var url = ""
- for (x = 0; x < window.location.pathname.split("/").length - 2; x++) {
- var url = url + window.location.pathname.split("/")[x] + "/"
- }
- if (window.location.pathname.split("/")[window.location.pathname.split("/").length - 1].includes('.html')) {
- var title = window.location.pathname.split("/")[window.location.pathname.split("/").length - 1].split('.html')[0]
- } else {
- var title = window.location.pathname.split("/")[window.location.pathname.split("/").length - 2]
- }
- try {
- const token = window.top.location.href.split('auth=')[1].split('&')[0]
- const username = window.top.location.href.split('username=')[1].split('&')[0]
- fetch(`http://philh.myftp.biz:8000/login/Auth?username=${username}&auth=${token}`).then(r => r.json()).then(t => {
- if (!t) {
- window.top.location.href = '/_Account/Login?dest='+window.location.pathname+'&prev='+url
- }
- })
- } catch {
- window.top.location.href = '/_Account/Login?dest='+window.location.pathname+'&prev='+url
- }
- setInterval(() => {
- const token = window.top.location.href.split('auth=')[1].split('&')[0]
- const username = window.top.location.href.split('username=')[1].split('&')[0]
- fetch(`http://philh.myftp.biz:8000/login/Auth?username=${username}&auth=${token}`).then(r =>r.json()).then(t => {
- if (!t.valid) {
- alert('Your session has expired')
- window.top.location.href = '/_Account/Login?'+window.location.pathname
- }
- })
- }, 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement