(File f, String key)
| 15 | System.out.println(regrex_req); |
| 16 | } |
| 17 | public static String FileGetValue(File f, String key) { // 读取properties文件,根据key取出value |
| 18 | BufferedReader reader = null; |
| 19 | String value = ""; |
| 20 | StringBuffer sbf = new StringBuffer(); |
| 21 | String output = ""; |
| 22 | try { |
| 23 | reader = new BufferedReader(new FileReader(f)); |
| 24 | String tempStr; |
| 25 | while ((tempStr = reader.readLine()) != null) { |
| 26 | sbf.append(tempStr + '\n'); |
| 27 | } |
| 28 | reader.close(); |
| 29 | output = sbf.toString(); |
| 30 | } catch (IOException e) { |
| 31 | } |
| 32 | String[] properties_lists = output.split("\n"); |
| 33 | for (String str : properties_lists) { |
| 34 | String[] str_lists = str.split("=", 2); |
| 35 | if (str_lists[0].equals(key)) |
| 36 | value = str_lists[1]; |
| 37 | } |
| 38 | return value.trim(); |
| 39 | } |
| 40 | |
| 41 | public static String getwords() { // 明文关键字 |
| 42 | File f = new File( BurpExtender.getPath() ); |
no outgoing calls