Exploit databaseDownload repository ZIP
GH-6b6057e48941ec7e0988d1ab08178590
2402221619/tool
Sources for CVE-2013-0422
8 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files21
2402221619/toolRevision e1de8defa93c
- ↑..Parent directory
- __init__.py
- __init__.pyc
- checkpayload.py
- checkpayload.pyc
- crawler.py
- crawler.pyc
- deps.py
- deps.pyc
- getch.py
- google.py
- google.pyc
- hash.py
- hash.pyc
- hashdb.py
- hashdb.pyc
- pivotdumptable.py
- pivotdumptable.pyc
- timeout.py
- timeout.pyc
- xmlrpc.py
- xmlrpc.pyc
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
渗透工具/sqlmap GUI/lib/utils/timeout.py
Python · 850 bytes#!/usr/bin/env python
"""
Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import threading
from lib.core.data import logger
from lib.core.enums import CUSTOM_LOGGING
def timeout(func, args=(), kwargs={}, duration=1, default=None):
class InterruptableThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.result = None
def run(self):
try:
self.result = func(*args, **kwargs)
except Exception, msg:
logger.log(CUSTOM_LOGGING.TRAFFIC_IN, msg)
self.result = default
thread = InterruptableThread()
thread.start()
thread.join(duration)
if thread.isAlive():
return default
else:
return thread.result