cose perdute

This commit is contained in:
encrypt 2020-04-06 13:29:25 +02:00
parent 875e26d767
commit c01cd3daff
5 changed files with 69 additions and 0 deletions

4
bell/bell.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
xbacklight -set 0
xbacklight -set 100

View file

@ -0,0 +1 @@
xsxs

View file

@ -0,0 +1,10 @@
from xml.etree import ElementTree as ET
tree = ET.parse('package.opf')
root = tree.getroot()
ns = {'opf': 'http://www.idpf.org/2007/opf'}
manifest = root.find('opf:manifest', ns)
base_url = ""
for item in manifest.findall('opf:item', ns):
print(base_url+item.attrib['href'])

42
mumble-bot/bot.py Normal file
View file

@ -0,0 +1,42 @@
import shout
import pymumble_py3 as pymumble
from pymumble_py3.callbacks import PYMUMBLE_CLBK_SOUNDRECEIVED as PCS
import subprocess as sp
from time import sleep
import sys
import os
import fcntl
import pyaudio
pwd = "" # password
server = "mumble.esiliati.org" # server address
nick = "TubiaBot"
channel = "chiacchiere"
port = 64738 # port number
# pyaudio set up
CHUNK = 1024
FORMAT = pyaudio.paInt16 # pymumble soundchunk.pcm is 16 bits
CHANNELS = 1
RATE = 48000 # pymumble soundchunk.pcm is 48000Hz
# mumble client set up
def sound_received_handler(user, soundchunk):
""" play sound received from mumble server upon its arrival """
sys.stdout.buffer.write(soundchunk.pcm)
# Spin up a client and connect to mumble server
mumble = pymumble.Mumble(server, nick, password=pwd, port=port)
# set up callback called when PCS event occurs
mumble.callbacks.set_callback(PCS, sound_received_handler)
mumble.set_receive_sound(1) # Enable receiving sound from mumble server
mumble.start()
mumble.is_ready() # Wait for client is ready
mumble.channels.find_by_name("radiospore").move_in()
mumble.users.myself.mute()
# constant capturing sound and sending it to mumble server
while True:
sleep(0.1)

12
surveymonkey-bot/bot.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
# pew pew pew
# per farlo martellare, da root
# while true; do torsocks ./bot.sh; kill -HUP $(pidof tor); sleep 1; done
tempfile=$(mktemp)
cookie_jar=$(mktemp)
user_agent="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
survey_url="https://it.surveymonkey.com/r/LYCK7TZ"
curl --silent $survey_url -o $tempfile -c $cookie_jar
survey_data=$(cat $tempfile | grep survey_data | sed 's/ /\n/g' | grep value | cut -d '"' -f 2)
curl --silent -L -c $cookie_jar -H "$user_agent" -F "324391492=2147689223" -F "324391492_other=XM24" -F "survey_data=$survey_data" -F "is_previous=false" -F "disable_survey_buttons_on_submit=" 'https://it.surveymonkey.com/r/LYCK7TZ' | grep -E "(thanks-message|error-id)" | cut -d ">" -f 2 | cut -d '<' -f 1
rm $tempfile $cookie_jar