Created
March 19, 2017 21:01
-
-
Save dhyegocalota/b8710b799eba08d5b170aacc6456131d to your computer and use it in GitHub Desktop.
[Hackflag] Web server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wrongContent = 'nadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaanadanadaaaannaannaanndnna'; | |
var filesToTest = Array.from(document.querySelectorAll('td a')).filter(x => x.href.match(/\.php$/)); | |
const testContent = (file) => { | |
return (response) => { | |
response.text() | |
.then(text => { | |
if (text.trim() != wrongContent) { | |
console.log(`O arquivo '${file.href}' tem o content: '${text}'`); | |
filesToTest = []; | |
} | |
}); | |
}; | |
}; | |
while (filesToTest.length > 0) { | |
var file = filesToTest.shift(); | |
fetch(file.href) | |
.then(testContent(file)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment