| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 
 | public class parse4 {
 
  public static void HandleChannelTag(Document document) throws IOException {
 
 
NodeList nodeList = document.getElementsByTagName("urls");
HandleTopicTag(nodeList, "\t");
 
 
  }
 
 
 private static void HandleTopicTag(NodeList nodeList, String tab) throws IOException{
 
   for (int i = 0; i < nodeList.getLength(); i++) {
 
            Node node = nodeList.item(i);
 
       if (node.getNodeType() == Node.ELEMENT_NODE){
 
           Element element = (Element) node;
 
	   System.out.println(HandleTextTag("url", element, "\t"));
 
 
}
 
}
}
 
 
private static String HandleTextTag(String tagName, Element element, String tab) throws IOException{
 
 StringBuilder returnValue = new StringBuilder();
 
 
 for (int i = 0; i < element.getElementsByTagName(tagName).getLength(); i++) {
 
  NodeList nodeList = element.getElementsByTagName(tagName).item(i).getChildNodes();
 
 Node node = (Node) nodeList.item(0);
 
 
    String[] cmd4 = {"/bin/sh","-c", "cd /pentest/web/joomscan/;perl joomscan.pl -u "+node.getNodeValue()};
 
     Runtime r6 = Runtime.getRuntime();
 
       Process p6 =r6.exec(cmd4);
 
  BufferedReader bfr6 = new BufferedReader(new InputStreamReader(p6.getInputStream()));
 
 
       String line6 = "";
 
 
 
final List<String> CMS = new ArrayList<String>();
 
 
 
 
            while ((line6 = bfr6.readLine()) != null){
 
 
            if (line6.contains("There is a vulnerable point")) {
 
                    CMS.add(line6);
 
             }
 
         }
}
return returnValue.toString();
 
}
} | 
Partager