remove unused contrib files, update usbenum to python 3
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ibuddy access log client
|
||||
# contributed by pablo muñoz-chapuli
|
||||
#
|
||||
|
||||
HOST=nowhere.com
|
||||
APACHE_LOG=/var/log/apache2/access.log
|
||||
|
||||
tail -f $APACHE_LOG | awk '
|
||||
/ 200 / {
|
||||
system("echo MACRO_GREEN|nc -u -q 0 $HOST 8888")
|
||||
}
|
||||
/ 404 / {
|
||||
system("echo MACRO_RED|nc -u -q 0 $HOST 8888")
|
||||
}
|
||||
/ 500 / {
|
||||
system("echo MACRO_BEAT2|nc -u -q 0 $HOST 8888")
|
||||
}'
|
||||
|
||||
@@ -11,30 +11,29 @@ busses = usb.busses()
|
||||
for bus in busses:
|
||||
devices = bus.devices
|
||||
for dev in devices:
|
||||
print "Device:", dev.filename
|
||||
print " Device class:",dev.deviceClass
|
||||
print " Device sub class:",dev.deviceSubClass
|
||||
print " Device protocol:",dev.deviceProtocol
|
||||
print " Max packet size:",dev.maxPacketSize
|
||||
print " idVendor:",dev.idVendor
|
||||
print " idProduct:",dev.idProduct
|
||||
print " Device Version:",dev.deviceVersion
|
||||
print('Device:', dev.filename)
|
||||
print(' Device class:',dev.deviceClass)
|
||||
print(' Device sub class:',dev.deviceSubClass)
|
||||
print(' Device protocol:',dev.deviceProtocol)
|
||||
print(' Max packet size:',dev.maxPacketSize)
|
||||
print(' idVendor:',dev.idVendor)
|
||||
print(' idProduct:',dev.idProduct)
|
||||
print(' Device Version:',dev.deviceVersion)
|
||||
for config in dev.configurations:
|
||||
print " Configuration:", config.value
|
||||
print " Total length:", config.totalLength
|
||||
print " selfPowered:", config.selfPowered
|
||||
print " remoteWakeup:", config.remoteWakeup
|
||||
print " maxPower:", config.maxPower
|
||||
print(' Configuration:', config.value)
|
||||
print(' Total length:', config.totalLength)
|
||||
print(' selfPowered:', config.selfPowered)
|
||||
print(' remoteWakeup:', config.remoteWakeup)
|
||||
print(' maxPower:', config.maxPower)
|
||||
for intf in config.interfaces:
|
||||
print " Interface:",intf[0].interfaceNumber
|
||||
print(' Interface:',intf[0].interfaceNumber)
|
||||
for alt in intf:
|
||||
print " Alternate Setting:",alt.alternateSetting
|
||||
print " Interface class:",alt.interfaceClass
|
||||
print " Interface sub class:",alt.interfaceSubClass
|
||||
print " Interface protocol:",alt.interfaceProtocol
|
||||
print(' Alternate Setting:',alt.alternateSetting)
|
||||
print(' Interface class:',alt.interfaceClass)
|
||||
print(' Interface sub class:',alt.interfaceSubClass)
|
||||
print(' Interface protocol:',alt.interfaceProtocol)
|
||||
for ep in alt.endpoints:
|
||||
print " Endpoint:",hex(ep.address)
|
||||
print " Type:",ep.type
|
||||
print " Max packet size:",ep.maxPacketSize
|
||||
print " Interval:",ep.interval
|
||||
|
||||
print(' Endpoint:',hex(ep.address))
|
||||
print(' Type:',ep.type)
|
||||
print(' Max packet size:',ep.maxPacketSize)
|
||||
print(' Interval:',ep.interval)
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
|
||||
my $account='lala@lalalala.com';
|
||||
my $log_path=' /var/log/httpd/combined_log';
|
||||
|
||||
|
||||
use IO::Socket;
|
||||
my $sock = IO::Socket::INET->new(PeerPort => 8888,
|
||||
PeerAddr => "127.0.0.1",
|
||||
Proto => "udp",
|
||||
LocalAddr => 'localhost'
|
||||
)
|
||||
or die "Can't bind : $@\n";
|
||||
|
||||
|
||||
|
||||
open(LOG,"ssh $account tail -f $log_path |");
|
||||
|
||||
while(<LOG>) {
|
||||
chomp;
|
||||
if(/HTTP\/\d.\d\"\s200/) {
|
||||
print "OK:$_\n";
|
||||
$sock->send("MACRO_GREEN");
|
||||
} elsif (/HTTP\/\d.\d\"\s404/) {
|
||||
print "NOTFOUND:$_\n";
|
||||
$sock->send("MACRO_RED");
|
||||
} elsif (/HTTP\/\d.\d\"\s403/) {
|
||||
print "FORBIDDEN:$_\n";
|
||||
$sock->send("MACRO_RED");
|
||||
} elsif(/HTTP\/\d.\d\"\s500/) {
|
||||
print "ERROR:$_\n";
|
||||
$sock->send("MACRO_BEAT");
|
||||
} else {
|
||||
print "RECVD:$_\n";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user