import RPi.GPIO as GPIO
import time
import pygame
import random
GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.OUT)
GPIO.setup(16, GPIO.OUT)
GPIO.setup(18, GPIO.IN, GPIO.PUD_UP)
p = GPIO.PWM(11, 50)
p.start(0)
def waitButton():
GPIO.wait_for_edge(18, GPIO.RISING)
def sound():
sounds = [
"Female_Scream_Horror-NeoPhyTe-138499973.mp3",
"Monster_Gigante-Doberman-1334685792.mp3",
"Scary Scream-SoundBible.com-1115384336.mp3",
"Sick_Villain-Peter_De_Lang-1465872262.mp3",
]
choice = random.choice(sounds)
pygame.mixer.init()
pygame.mixer.music.load(choice)
pygame.mixer.music.play()
# Wait for the sound to finish
while pygame.mixer.music.get_busy():
continue
time.sleep(0.3)
# Main program section
while True: # Forever loop (until you hit ctrl+c)
try:
waitButton() # Wait until the button is pushed
p.ChangeDutyCycle(3)
time.sleep(0.1) # Allow the servo to move
sound() # Play a sound file
time.sleep(2)
waitButton() # Wait until the button is pushed
p.ChangeDutyCycle(12)
time.sleep(1)
except(KeyboardInterrupt):
p.stop() # Stop the PWM
GPIO.cleanup() # Resets the GPIO pins
Linux Foundation:你能简单介绍一下Red Team项目及其与Fedora Red Team SIG的历史吗?
Jason Callaway:我在Def Con 25与Red Hatters的同事一起创建了Fedora Red Team SIG。我们有一些想要构建的漏洞利用映射工具,我受到了Mudge和Sarah Zatko的Cyber-ITL项目的启发。我想对他们的方法进行开源实现。Fedora项目慷慨地提供托管,并且是极大的倡导者。现在我在谷歌,我很幸运能够将Red Team作为我的20%项目,我希望能够扩大其影响力并建立一个更加供应商中立的社区。Fedora正在与LF合作,支持我们的项目分支,并将在我们的技术指导委员会中有代表。