403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.168
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/sysutils/hid-tools/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/sysutils/hid-tools/files/patch-hidtools_hidraw.py
Fix ioctl(2) definitions to match <sys/ioccom.h> and <dev/hid/hidraw.h>

--- hidtools/hidraw.py.orig	2019-03-29 01:29:29 UTC
+++ hidtools/hidraw.py
@@ -36,13 +36,14 @@ def _ioctl(fd, EVIOC, code, return_type, buf=None):
 
 
 # extracted from <asm-generic/ioctl.h>
-_IOC_WRITE = 1
+_IOC_VOID = 1
 _IOC_READ = 2
+_IOC_WRITE = 4
 
 _IOC_NRBITS = 8
 _IOC_TYPEBITS = 8
-_IOC_SIZEBITS = 14
-_IOC_DIRBITS = 2
+_IOC_SIZEBITS = 13
+_IOC_DIRBITS = 3
 
 _IOC_NRSHIFT = 0
 _IOC_TYPESHIFT = _IOC_NRSHIFT + _IOC_NRBITS
@@ -74,7 +75,7 @@ def _IOW(type, nr, size):
 
 # define HIDIOCGRDESCSIZE	_IOR('H', 0x01, int)
 def _IOC_HIDIOCGRDESCSIZE(none, len):
-    return _IOR('H', 0x01, len)
+    return _IOR('U', 30, len)
 
 
 def _HIDIOCGRDESCSIZE(fd):
@@ -85,7 +86,7 @@ def _HIDIOCGRDESCSIZE(fd):
 
 # define HIDIOCGRDESC		_IOR('H', 0x02, struct hidraw_report_descriptor)
 def _IOC_HIDIOCGRDESC(none, len):
-    return _IOR('H', 0x02, len)
+    return _IOC(_IOC_VOID, 'U', 31, 0)
 
 
 def _HIDIOCGRDESC(fd, size):
@@ -102,7 +103,7 @@ def _HIDIOCGRDESC(fd, size):
 
 # define HIDIOCGRAWINFO		_IOR('H', 0x03, struct hidraw_devinfo)
 def _IOC_HIDIOCGRAWINFO(none, len):
-    return _IOR('H', 0x03, len)
+    return _IOR('U', 32, len)
 
 
 def _HIDIOCGRAWINFO(fd):
@@ -113,7 +114,7 @@ def _HIDIOCGRAWINFO(fd):
 
 # define HIDIOCGRAWNAME(len)     _IOC(_IOC_READ, 'H', 0x04, len)
 def _IOC_HIDIOCGRAWNAME(none, len):
-    return _IOC(_IOC_READ, 'H', 0x04, len)
+    return _IOC(_IOC_READ, 'U', 33, len)
 
 
 def _HIDIOCGRAWNAME(fd):

Youez - 2016 - github.com/yon3zu
LinuXploit