elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


+  Foro de elhacker.net
|-+  Sistemas Operativos
| |-+  GNU/Linux (Moderador: MinusFour)
| | |-+  como parchar mouse con este patch
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: como parchar mouse con este patch  (Leído 3,091 veces)
Farahon3

Desconectado Desconectado

Mensajes: 55



Ver Perfil
como parchar mouse con este patch
« en: 10 Abril 2011, 21:51 pm »

Que onda folks, apenas estoy empezando a usar linux(debian) y estoy teniendo problemas con mi mouse, es un cyborg rat 5 y encontre un codigo para parcharlo, pero no se como se usa, me podrian decir como se compila porfavor

gracias

este es el codigo:
Código:
diff -ur linux-2.6.38.orig/drivers/hid/hid-ids.h linux-2.6.38/drivers/hid/hid-ids.h 
--- linux-2.6.38.orig/drivers/hid/hid-ids.h 2011-03-22 17:27:45.628320449 +0000
+++ linux-2.6.38/drivers/hid/hid-ids.h 2011-03-22 17:29:01.844925858 +0000
@@ -502,6 +502,7 @@
#define USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS 0x2cf6

#define USB_VENDOR_ID_SAITEK 0x06a3
+#define USB_DEVICE_ID_SAITEK_RAT7 0x0ccb
#define USB_DEVICE_ID_SAITEK_RUMBLEPAD 0xff17

#define USB_VENDOR_ID_SAMSUNG 0x0419
diff -ur linux-2.6.38.orig/drivers/hid/hid-input.c linux-2.6.38/drivers/hid/hid-input.c
--- linux-2.6.38.orig/drivers/hid/hid-input.c 2011-03-22 17:27:45.644319741 +0000
+++ linux-2.6.38/drivers/hid/hid-input.c 2011-03-22 20:07:20.254290914 +0000
@@ -790,6 +790,22 @@

if ((field->flags & HID_MAIN_ITEM_RELATIVE) && (usage->type == EV_KEY))
input_event(input, usage->type, usage->code, 0);
+
+ /* hack for Saitek RAT mice which report release events for their
+ * mode button on the NEXT press event: instant release
+ */
+ if ((*quirks & HID_QUIRK_RAT_BROKEN_BUTTON_RELEASE) &&
+ value && usage->type == EV_KEY &&
+ usage->code >= BTN_MOUSE + 8 && usage->code <= BTN_MOUSE + 10 &&
+ test_bit(usage->code, input->key)) {
+ input_event(input, usage->type, usage->code, 0);
+ /* we'll get a real release event from the mouse anyway, and
+ * userspace should cope with the extra input-layer
+ * button-up events anyway; just re-set the bit to stop
+ * spurious button-down events
+ */
+ set_bit(usage->code, input->key);
+ }
}

void hidinput_report_event(struct hid_device *hid, struct hid_report *report)
diff -ur linux-2.6.38.orig/drivers/hid/usbhid/hid-quirks.c linux-2.6.38/drivers/hid/usbhid/hid-quirks.c
--- linux-2.6.38.orig/drivers/hid/usbhid/hid-quirks.c 2011-03-22 17:27:45.652319385 +0000
+++ linux-2.6.38/drivers/hid/usbhid/hid-quirks.c 2011-03-22 17:29:01.844925858 +0000
@@ -85,6 +85,8 @@

{ USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH, HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS, HID_QUIRK_MULTI_INPUT },
+
+ { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7, HID_QUIRK_RAT_BROKEN_BUTTON_RELEASE },
{ 0, 0 }
};

diff -ur linux-2.6.38.orig/include/linux/hid.h linux-2.6.38/include/linux/hid.h
--- linux-2.6.38.orig/include/linux/hid.h 2011-03-22 17:27:45.692317595 +0000
+++ linux-2.6.38/include/linux/hid.h 2011-03-22 17:29:01.884924059 +0000
@@ -312,6 +312,7 @@
#define HID_QUIRK_BADPAD 0x00000020
#define HID_QUIRK_MULTI_INPUT 0x00000040
#define HID_QUIRK_HIDINPUT_FORCE 0x00000080
+#define HID_QUIRK_RAT_BROKEN_BUTTON_RELEASE 0x00000100
#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
#define HID_QUIRK_NO_INIT_REPORTS 0x20000000


En línea

Farahon3

Desconectado Desconectado

Mensajes: 55



Ver Perfil
Re: como parchar mouse con este patch
« Respuesta #1 en: 13 Abril 2011, 03:45 am »

estaba pensando guardar ese codigo en un archivo .bin y luego ejecutarlo desde la consola, eso funcionaria?


En línea

lawish

Desconectado Desconectado

Mensajes: 29



Ver Perfil
Re: como parchar mouse con este patch
« Respuesta #2 en: 22 Abril 2011, 16:30 pm »

man patch


En línea

GML group
Slacker
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Como crair um Patch para destribuir o crack?
Ingeniería Inversa
meluzzi 3 2,010 Último mensaje 29 Mayo 2005, 03:28 am
por pERICOTE
[SOURCE] Parchar MSN2009 MultiSesion =)
Programación Visual Basic
ssccaann43 © 5 2,668 Último mensaje 10 Febrero 2010, 13:21 pm
por ssccaann43 ©
¿Que tan difícil es parchar este programa con lo que tiene?
Ingeniería Inversa
samsam1 2 2,518 Último mensaje 27 Diciembre 2016, 21:07 pm
por samsam1
Se puede crackear o parchar este programa.
Ingeniería Inversa
kaswend 2 3,493 Último mensaje 2 Abril 2020, 21:20 pm
por karmany
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines