HACKING 120% {Hacking, programmazione, computer & molto altro}

Posts written by Wet Water

view post Posted: 14/9/2014, 09:50     [Haskell] Connessione WiFi - I nostri programmi
Troppo facile così, ifup lo devi fare eseguire tu :D
view post Posted: 10/9/2014, 11:24     Presentazione - Presentazioni
Wet si aspettava python :(

Comunque, ci posteresti qualche tuo source per farci vedere di cosa sei capace? :)
view post Posted: 10/9/2014, 00:49     Byzanz, registrare gif su linux - Linux
Byzanz è un'utility da riga di comando che permette di registrare .gif di ciò che stiamo facendo, possiamo registrare una finestra, un'area o tutto lo schermo.

Per installare:

CODICE
sudo add-apt-repository -y ppa:fossfreedom/byzanz
sudo apt-get update
sudo apt-get install -y byzanz


Parametri di chiamata:

CODICE
Application Options:

      -a, --audio
             Record audio from the default input device. This only  works  if
             the output format supports it and will otherwise cause an error.

      -c, --cursor
             Record mouse cursor

      -d, --duration=SECS
             Duration of animation (default: 10 seconds)

      --delay=SECS
             Delay before start (default: 1 second)

      --display=DISPLAY
             X display to use

      -h, --height=PIXEL
             Height of recording rectangle

      -v, --verbose
             Be verbos

      -w, --width=PIXEL
             Width of recording rectangle

      -x, --x=PIXEL
             X coordinate of rectangle to record

      -y, --y=PIXEL
             Y coordinate of rectangle to record


Esempio di chiamata:

CODICE
byzanz-record --duration=15 --x=400 --y=400 --width=800 --height=600 output.gif



Il problema di byzanz, come si può ben capire, è che come parametri di posizione vuole i pixel e le dimensioni e questo può essere un problema, ecco quindi due script che fanno al caso nostro (presi da askubuntu: http://askubuntu.com/questions/107726/how-...of-a-screencast)

Per registrare una finestra:

CODICE
#!/bin/bash

# Delay before starting
DELAY=10

# Sound notification to let one know when recording is about to start (and ends)
beep() {
   paplay /usr/share/sounds/KDE-Im-Irc-Event.ogg &
}

# Duration and output file
if [ $# -gt 0 ]; then
   D="--duration=$@"
else
   echo Default recording duration 10s to /tmp/recorded.gif
   D="--duration=10 /tmp/recorded.gif"
fi
XWININFO=$(xwininfo)
read X < <(awk -F: '/Absolute upper-left X/{print $2}' <<< "$XWININFO")
read Y < <(awk -F: '/Absolute upper-left Y/{print $2}' <<< "$XWININFO")
read W < <(awk -F: '/Width/{print $2}' <<< "$XWININFO")
read H < <(awk -F: '/Height/{print $2}' <<< "$XWININFO")

echo Delaying $DELAY seconds. After that, byzanz will start
for (( i=$DELAY; i>0; --i )) ; do
   echo $i
   sleep 1
done

beep
byzanz-record --verbose --delay=0 --x=$X --y=$Y --width=$W --height=$H $D
beep


Registrare con gui:

CODICE
#!/bin/bash

# AUTHOR:   (c) Rob W 2012, modified by MHC (http://askubuntu.com/users/81372/mhc)
# NAME:     GIFRecord 0.1
# DESCRIPTION:  A script to record GIF screencasts.
# LICENSE:  GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# DEPENDENCIES:   byzanz,gdialog,notify-send (install via sudo add-apt-repository ppa:fossfreedom/byzanz; sudo apt-get update && sudo apt-get install byzanz gdialog notify-osd)

# Time and date
TIME=$(date +"%­Y-%­m-%d_%­H%­M%­S")

# Delay before starting
DELAY=10

# Standard screencast folder
FOLDER="$HOME/Pictures"

# Default recording duration
DEFDUR=10

# Sound notification to let one know when recording is about to start (and ends)
beep() {
   paplay /usr/share/sounds/freedesktop/stereo/message-new-instant.oga &
}

# Custom recording duration as set by user
USERDUR=$(gdialog --title "Duration?" --inputbox "Please enter the screencast duration in seconds" 200 100 2>&1)

# Duration and output file
if [ $USERDUR -gt 0 ]; then
   D=$USERDUR
else
   D=$DEFDUR
fi

# Window geometry
XWININFO=$(xwininfo)
read X < <(awk -F: '/Absolute upper-left X/{print $2}' <<< "$XWININFO")
read Y < <(awk -F: '/Absolute upper-left Y/{print $2}' <<< "$XWININFO")
read W < <(awk -F: '/Width/{print $2}' <<< "$XWININFO")
read H < <(awk -F: '/Height/{print $2}' <<< "$XWININFO")

# Notify the user of recording time and delay
notify-send "GIFRecorder" "Recording duration set to $D seconds. Recording will start in $DELAY seconds."

#Actual recording
sleep $DELAY
beep
byzanz-record -c --verbose --delay=0 --duration=$D --x=$X --y=$Y --width=$W --height=$H "$FOLDER/GIFrecord_$TIME.gif"
beep

# Notify the user of end of recording.
notify-send "GIFRecorder" "Screencast saved to $FOLDER/GIFrecord_$TIME.gif"



Se avete domande, chiedete pure :)
view post Posted: 10/9/2014, 00:25     Crack Wi-Fi WPA2 - Hacking e computer
Bel video, bravo!
Ti consiglio solo di ingrandire i caratteri della console in modo da rendere tutto più leggibile.

Usavo un metodo molto simile tempo fa.
view post Posted: 10/9/2014, 00:15     Presentazione - Presentazioni
Benvenuto, mi fa piacere che tu sia un '98 e che tu sia così avanti :)

Che linguaggio preferisci?
view post Posted: 9/9/2014, 19:52     xiaomi mi3 - Android
www.gsmarena.com/xiaomi_mi_3-reviews-5678.php

Lo xiaomi è veramente un bel cellulare a quanto dicono.
view post Posted: 4/9/2014, 09:30     Richiesta Abilitazione sezione 68:61:63:6b:73 - Regolamento e Annunci
Nessuna in particolare, basta che tu dimostri di essere attivo e interessato :)
view post Posted: 4/9/2014, 09:28     [bash] Lista comandi più utilizzati - Linux
Ok, ma perché ad esempio conta le chiamate ad nmap, ma non le chiamate a kate o vi o qualsiasi altra cosa?
view post Posted: 4/9/2014, 09:27     Salve - Presentazioni
Guide su python molto buone sono l'easytut (facile e veloce), l'howtothink (una mazza assurda) e, poco conosciuti, ma molto carini, i tutorial di niktorthenat su youtube. Nella nostra sezione di programmazione->locale->python dovresti trovare tutto ;)
view post Posted: 3/9/2014, 11:10     Salve - Presentazioni
Togliti dalla testa php e inizia python che ho bisogno di un aiutante :D

Anyway, benvenuto!
view post Posted: 3/9/2014, 11:06     [bash] Lista comandi più utilizzati - Linux
Penso che il risultato sia sbagliato (mi mancano un bel po' di comandi).

Comunque killall lo uso quando l'harddisk non si scollega perché è aperto da qualche parte, quindi killall dragon, killall amarok in genere risolve; altrimenti ogni tanto dragon impazzisce e va fermato.
view post Posted: 3/9/2014, 11:01     Ottimo iCloud - Off Topic
Io sono sempre stato contro il cloud perché senza internet sei senza dati, quindi preferisco avere il mio harddisk casalingo serverizzabile con samba e bom.
Riguardo a icloud posso dire che a mio fratello hanno rubato l'iphone e icloud l'ha rintracciato appena l'hanno acceso due settimane dopo (dove fanno i mercatini di roba rubata :asd:), STRANAMENTE la polizia non è nemmeno andata a controllare.
view post Posted: 3/9/2014, 00:41     [bash] Lista comandi più utilizzati - Linux
CODICE
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head


Fuori i risultatoni!


CODICE
194 sudo
155 cd
88 ls
67 python
37 find
22 cat
19 php
18 killall
18 chmod
17 nmap
2744 replies since 12/2/2011