Exploit database

GH-2eaf101944de20815f835485e7135243

1120362990/paper

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2018-8174

11 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files8

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

study-note/python相关学习记录/python多线程/多线程样例-queue.py

Python · 1,268 bytes
# -*- coding: utf-8 -*-
import threading
import time
import queue
#python2
#from Queue import Queue

#queue 队列学习   生产者消费者模型,消息对列  数据产生的速度和消费的速度不对等    

#生产者函数
class Producer(threading.Thread):
    def run(self):
        # global q
        count = 0
        while True:
            if q.qsize() < 1000:
                for i in range(100):
                    count = count + 1
                    msg = '生成产品'+str(count)
                    q.put(msg)
                    print(msg)
            time.sleep(0.5)

#消费者函数
class Consumer(threading.Thread):
    def run(self):
        # global q
        while True:
            if q.qsize() > 100:
                for i in range(3):
                    lock.acquire()
                    msg = self.name + '消费了'+q.get()
                    print(msg)
                    print(q.qsize())
                    lock.release()
                time.sleep(1)

if __name__ == "__main__":
    q = queue.Queue()
    lock = threading.Lock()
    for i in range(5000):
        q.put('初始产品'+str(i))
    for i in range(2):
        p = Producer()
        p.start()
    for i in range(5):
        c = Consumer()
        c.start()