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

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ... 53
151  Programación / Programación C/C++ / Re: Como resolver estos errores? en: 14 Marzo 2017, 15:14 pm
La librería es la siguiente:
Código
  1. #pragma once
  2.  
  3. #if !(defined _M_IX86) && !(defined _M_X64) && !(defined __i386__) && !(defined __x86_64__)
  4.    #error MinHook supports only x86 and x64 systems.
  5. #endif
  6.  
  7. #include <windows.h>
  8.  
  9. // MinHook Error Codes.
  10. typedef enum MH_STATUS
  11. {
  12.    // Unknown error. Should not be returned.
  13.    MH_UNKNOWN = -1,
  14.  
  15.    // Successful.
  16.    MH_OK = 0,
  17.  
  18.    // MinHook is already initialized.
  19.    MH_ERROR_ALREADY_INITIALIZED,
  20.  
  21.    // MinHook is not initialized yet, or already uninitialized.
  22.    MH_ERROR_NOT_INITIALIZED,
  23.  
  24.    // The hook for the specified target function is already created.
  25.    MH_ERROR_ALREADY_CREATED,
  26.  
  27.    // The hook for the specified target function is not created yet.
  28.    MH_ERROR_NOT_CREATED,
  29.  
  30.    // The hook for the specified target function is already enabled.
  31.    MH_ERROR_ENABLED,
  32.  
  33.    // The hook for the specified target function is not enabled yet, or already
  34.    // disabled.
  35.    MH_ERROR_DISABLED,
  36.  
  37.    // The specified pointer is invalid. It points the address of non-allocated
  38.    // and/or non-executable region.
  39.    MH_ERROR_NOT_EXECUTABLE,
  40.  
  41.    // The specified target function cannot be hooked.
  42.    MH_ERROR_UNSUPPORTED_FUNCTION,
  43.  
  44.    // Failed to allocate memory.
  45.    MH_ERROR_MEMORY_ALLOC,
  46.  
  47.    // Failed to change the memory protection.
  48.    MH_ERROR_MEMORY_PROTECT,
  49.  
  50.    // The specified module is not loaded.
  51.    MH_ERROR_MODULE_NOT_FOUND,
  52.  
  53.    // The specified function is not found.
  54.    MH_ERROR_FUNCTION_NOT_FOUND
  55. }
  56. MH_STATUS;
  57.  
  58. // Can be passed as a parameter to MH_EnableHook, MH_DisableHook,
  59. // MH_QueueEnableHook or MH_QueueDisableHook.
  60. #define MH_ALL_HOOKS NULL
  61.  
  62. #ifdef __cplusplus
  63. extern "C" {
  64. #endif
  65.  
  66.    // Initialize the MinHook library. You must call this function EXACTLY ONCE
  67.    // at the beginning of your program.
  68.    MH_STATUS WINAPI MH_Initialize(VOID);
  69.  
  70.    // Uninitialize the MinHook library. You must call this function EXACTLY
  71.    // ONCE at the end of your program.
  72.    MH_STATUS WINAPI MH_Uninitialize(VOID);
  73.  
  74.    // Creates a Hook for the specified target function, in disabled state.
  75.    // Parameters:
  76.    //   pTarget    [in]  A pointer to the target function, which will be
  77.    //                    overridden by the detour function.
  78.    //   pDetour    [in]  A pointer to the detour function, which will override
  79.    //                    the target function.
  80.    //   ppOriginal [out] A pointer to the trampoline function, which will be
  81.    //                    used to call the original target function.
  82.    //                    This parameter can be NULL.
  83.    MH_STATUS WINAPI MH_CreateHook(LPVOID pTarget, LPVOID pDetour, LPVOID *ppOriginal);
  84.  
  85.    // Creates a Hook for the specified API function, in disabled state.
  86.    // Parameters:
  87.    //   pszModule  [in]  A pointer to the loaded module name which contains the
  88.    //                    target function.
  89.    //   pszTarget  [in]  A pointer to the target function name, which will be
  90.    //                    overridden by the detour function.
  91.    //   pDetour    [in]  A pointer to the detour function, which will override
  92.    //                    the target function.
  93.    //   ppOriginal [out] A pointer to the trampoline function, which will be
  94.    //                    used to call the original target function.
  95.    //                    This parameter can be NULL.
  96.    MH_STATUS WINAPI MH_CreateHookApi(
  97.        LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal);
  98.  
  99.    // Creates a Hook for the specified API function, in disabled state.
  100.    // Parameters:
  101.    //   pszModule  [in]  A pointer to the loaded module name which contains the
  102.    //                    target function.
  103.    //   pszTarget  [in]  A pointer to the target function name, which will be
  104.    //                    overridden by the detour function.
  105.    //   pDetour    [in]  A pointer to the detour function, which will override
  106.    //                    the target function.
  107.    //   ppOriginal [out] A pointer to the trampoline function, which will be
  108.    //                    used to call the original target function.
  109.    //                    This parameter can be NULL.
  110.    //   ppTarget   [out] A pointer to the target function, which will be used
  111.    //                    with other functions.
  112.    //                    This parameter can be NULL.
  113.    MH_STATUS WINAPI MH_CreateHookApiEx(
  114.        LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal, LPVOID *ppTarget);
  115.  
  116.    // Removes an already created hook.
  117.    // Parameters:
  118.    //   pTarget [in] A pointer to the target function.
  119.    MH_STATUS WINAPI MH_RemoveHook(LPVOID pTarget);
  120.  
  121.    // Enables an already created hook.
  122.    // Parameters:
  123.    //   pTarget [in] A pointer to the target function.
  124.    //                If this parameter is MH_ALL_HOOKS, all created hooks are
  125.    //                enabled in one go.
  126.    MH_STATUS WINAPI MH_EnableHook(LPVOID pTarget);
  127.  
  128.    // Disables an already created hook.
  129.    // Parameters:
  130.    //   pTarget [in] A pointer to the target function.
  131.    //                If this parameter is MH_ALL_HOOKS, all created hooks are
  132.    //                disabled in one go.
  133.    MH_STATUS WINAPI MH_DisableHook(LPVOID pTarget);
  134.  
  135.    // Queues to enable an already created hook.
  136.    // Parameters:
  137.    //   pTarget [in] A pointer to the target function.
  138.    //                If this parameter is MH_ALL_HOOKS, all created hooks are
  139.    //                queued to be enabled.
  140.    MH_STATUS WINAPI MH_QueueEnableHook(LPVOID pTarget);
  141.  
  142.    // Queues to disable an already created hook.
  143.    // Parameters:
  144.    //   pTarget [in] A pointer to the target function.
  145.    //                If this parameter is MH_ALL_HOOKS, all created hooks are
  146.    //                queued to be disabled.
  147.    MH_STATUS WINAPI MH_QueueDisableHook(LPVOID pTarget);
  148.  
  149.    // Applies all queued changes in one go.
  150.    MH_STATUS WINAPI MH_ApplyQueued(VOID);
  151.  
  152.    // Translates the MH_STATUS to its name as a string.
  153.    const char * WINAPI MH_StatusToString(MH_STATUS status);
  154.  
  155. #ifdef __cplusplus
  156. }
  157. #endif
  158.  
  159.  

Como podría agregar a las funciones casts a void* digamos dentro de los parametros, ya que necesito hacer la conversión de un puntero a función a un void*.
152  Programación / Programación C/C++ / Re: Como resolver estos errores? en: 14 Marzo 2017, 15:07 pm
Esa librería sera de C (los errores son errores de conversión de un puntero a función a un void*, cosa que en C se podía hacer de forma implícita). O modificas las funciones añadiendo casts a void*, o:
https://www.codeproject.com/Articles/44326/MinHook-The-Minimalistic-x-x-API-Hooking-Libra
Hay una parte que pone: If you are a C++ user, ...
Primero tengo unas dudas cuando dices librería te refieres a cabecera? también se le puede llamar libreria a un .h por ejemplo? Segundo :
Citar
los errores son errores de conversión de un puntero a función a un void*, cosa que en C se podía hacer de forma implícita). O modificas las funciones añadiendo casts a void*

Cuando dices añadir casts a void* te refieres que en la libreria/cabecera minhook.h debó incluirle el * de puntero?

En cuanto a esto:
Citar
If you are a C++ user, ...

Lo intente cambiando la parte de arriba y de abajo y dejando el main tal como estaba pero al compilarlo seguia devolviendo error.

153  Programación / Programación C/C++ / Como resolver estos errores? en: 14 Marzo 2017, 14:21 pm
Estoy intentando compilar ejemplos de esta libreria:
Código:
https://www.codeproject.com/KB/winsdk/LibMinHook/MinHook_133_src.zip

El tio compila ejemplos de todos pero cuando yo lo intento me devuelve:
Código:
C:\Users\Androide\Desktop\minhook\Dynamic\MinHook_133_src\include\MinHook.h:141:
22: note:   candidate expects 5 arguments, 4 provided
DynamicLinkSample.cpp:12:18: note: template<class T> MH_STATUS MH_CreateHookApiE
x(LPCWSTR, LPCSTR, LPVOID, T**)
 inline MH_STATUS MH_CreateHookApiEx(LPCWSTR pszModule, LPCSTR pszProcName, LPVO
ID pDetour, T** ppOriginal)
                  ^
DynamicLinkSample.cpp:12:18: note:   template argument deduction/substitution fa
iled:
DynamicLinkSample.cpp:37:88: note:   cannot convert 'DetourMessageBoxW' (type 'i
nt (__attribute__((__stdcall__)) *)(HWND, LPCWSTR, LPCWSTR, UINT) {aka int (__at
tribute__((__stdcall__)) *)(HWND__*, const wchar_t*, const wchar_t*, unsigned in
t)}') to type 'LPVOID {aka void*}'
     if (MH_CreateHookApiEx(L"user32", "MessageBoxW", &DetourMessageBoxW, &fpMes
sageBoxW) != MH_OK)

        ^
DynamicLinkSample.cpp:43:35: error: invalid conversion from 'int (__attribute__(
(__stdcall__)) *)(HWND, LPCWSTR, LPCWSTR, UINT) {aka int (__attribute__((__stdca
ll__)) *)(HWND__*, const wchar_t*, const wchar_t*, unsigned int)}' to 'LPVOID {a
ka void*}' [-fpermissive]
     if (MH_EnableHook(&MessageBoxW) != MH_OK)
                                   ^
In file included from DynamicLinkSample.cpp:2:0:
C:\Users\Androide\Desktop\minhook\Dynamic\MinHook_133_src\include\MinHook.h:154:
22: note: initializing argument 1 of 'MH_STATUS MH_EnableHook(LPVOID)'
     MH_STATUS WINAPI MH_EnableHook(LPVOID pTarget);
                      ^
DynamicLinkSample.cpp:52:36: error: invalid conversion from 'int (__attribute__(
(__stdcall__)) *)(HWND, LPCWSTR, LPCWSTR, UINT) {aka int (__attribute__((__stdca
ll__)) *)(HWND__*, const wchar_t*, const wchar_t*, unsigned int)}' to 'LPVOID {a
ka void*}' [-fpermissive]
     if (MH_DisableHook(&MessageBoxW) != MH_OK)
                                    ^
In file included from DynamicLinkSample.cpp:2:0:
C:\Users\Androide\Desktop\minhook\Dynamic\MinHook_133_src\include\MinHook.h:161:
22: note: initializing argument 1 of 'MH_STATUS MH_DisableHook(LPVOID)'
     MH_STATUS WINAPI MH_DisableHook(LPVOID pTarget);
                      ^

Supongo algo estare haciendo mal. En este caso estoy intentando desde consola con g++, que el compilador sería mingw.
154  Programación / Programación C/C++ / Re: Donde colocar los .lib en visual studio en: 14 Marzo 2017, 14:11 pm
En español, "Vinculador -> General -> Directoriosde bibliotecas adicionales" para las carpetas y "Vinculador -> Entrada -> Dependencias adicionales" para los archivos.

Directoriosde bibliotecas adicionales" para las carpetas

Esta parte se refiere a los .lib o a las cabeceras .h?

Y la segunda parte si lo entendi

"Vinculador -> Entrada -> Dependencias adicionales" para los archivos.

Para los ficheros estáticos(.lib).

Vale si es correcto directorio para los .lib y nombre de los .lib.
155  Programación / Programación C/C++ / Donde colocar los .lib en visual studio en: 14 Marzo 2017, 13:52 pm
Hola tengo una duda donde podría colocar los .lib en visual studio capturas:


156  Programación / Programación C/C++ / Re: No puedo declarar la variable por ser un tipo abstracto en: 14 Marzo 2017, 13:49 pm
abri otro post ya que este es antiguo y no lo puedo poner otra vez para resolverlo
157  Informática / Software / Lista de compiladores para empezar a programar en: 13 Marzo 2017, 05:38 am
Bueno muchas veces cuando empezamos a programar usamos un ide y pensamos que es el mismo programa pero detrás de cada ide se encuentra un compilador que basicamente es un programa informático que traduce un programa escrito en un lenguaje de programación a otro lenguaje diferente. Este proceso de traducción se conoce como compilación.

Aqui teneis una lista de compiladores para la mayoría de lenguajes de programación:

Ada
*Aonix ObjectAda for Windows : Aonix offers the windows version of their compiler as a free download (Win).
*AVL Ada9X 1.91 : Ada95 environment, featuring editor, interpreter, manual (DOS).
*ez2load : Free DOS Ada 95 compiler based on GNAT (DOS).


Assembly
*Alab 1.3 b1 : Alab stands for Assembly Laboratory, an assembly / watcom C IDE. Be careful though, it requires a third-party Assembler (such as TurboAsm - not included) (DOS).
*Arrowsoft Assembler 1.0D : Equivalent to MASM 3.0 (DOS).
DR Assembler Tools (RASM) v1.3 : Digital Research's assembler tools (DOS). (70.1kb)
*Flat Assembler (FASM) 1.42 : Fast, efficient self-assembling x86 assembler (DOS/Win/Linux).
Microsoft Macro Assembler (MASM) 5.10 : This is a pretty advanced version of a good assembler (DOS). (628kb)
*Netwide Assembler (NASM) 0.98 : A general-purpose open source x86 assembler. Includes disassembler (DOS/Win/Linux).
*NewBasic Assembler (NBASM) : Freeware, near MASM 5.1x compatible, visual IDE (DOS).
*Pass32 v2 : Free x86 Assembler for PMode Applications (DOS/Win).
Turbo Assembler (TASM) V2.0 : The most popular assembler by Borland. This version is rather old though (DOS). (478kb)
*Win 32 + Assembler : GoAsm, GoLink etc. Assembler tools for the 32 bit Win programmer (Win).


Basic
*ASIC 5.00 : A free BASICA/QBASIC compiler.
*MicroBasic 3.2 : Small compiler that produces COM + EXE files (DOS).
MS Quick Basic 4.5 : My favorite BASIC compiler. Very friendly environment (DOS). (895kb)
MS Visual Basic 3.0 : Be careful, the help files are not included (Win 3.x). (470kb)
*Phenix Object Basic : Object oriented basic for Linux (Linux).
*Rapid-Q : Cross-platform basic (Win/Linux...).
*ScriptBasic V1.0 : Create portable applications or even web application in Basic (Win/Linux).
*UBasic86 (32bit) v8.8c : High precision math-oriented BASIC interpreter (DOS).
*XBasic : 32/64bit BASIC interactive program development environment (Win/Linux).
*Yabasic 2.716 : Yet Another BASIC that implements the most common and simple elemets of the language (Win/Linux).


C / C++
// LOS MÁS IMPORTANTES EN C++//
*MinGW. Es un compilador similar al de GNU (GCC - GNU Compiler Collection) pero para windows.
*Visual Studio. Proviene de la familia Visual C++, es otro de los más utilizados por windows lanzado por microsoft.
*Cygwin. Es un entorno de desarrollo parecido a Unix y una interfaz en modo comando para Microsoft Windows.
/////////////////////////////////////////
*Borland Turbo: A solid C compiler. Register at the Borland site and download it for free (DOS).
*Digital Mars C/C++ Compliler v8.31 : Complete C / C++ compiler package (Win).
*DJGPP : Complete 32-bit C/C++ development system (DOS/Win)
*LadSoft cc386 2.06 : 32 bit ANSI C compiler with limited C++ support (DOS/Win).
*lcc 4.2 : A retargetable ANSI C compiler for most platforms (Win/Linux...).
*Pacific C Compiler : Freeware C Compiler (DOS).
*Sphinx C-- final : Sphinx C-- is a combination of C and 80x86 assembly language (DOS).
*Watcom C/C++ v11.0c : Complete multi-platform development environment (DOS/Win/OS2)


Cobol
*DOS COBOL v0.001alpha or Win32 ver : Small COBOL interpreter (DOS/Win).
MS COBOL V2.2 : Cobol is an old business oriented language that used to be extremely popular. Today it is only used by very few veteran programmers (DOS). (744kb)


D
*Digital Mars D Compliler : D was created as a C / C++ successor. It is still in Alpha stage of development (Win).

Eiffel
*iss-base 4 : Freeware version of a commercial compiler for the object-oriented Eiffel language (Win/Linux).
*SmartEiffel : Fast, small and open source Eiffel compiler. Outputs to C / Java (Win/any ANSI C environment).


Forth
*Pygmy Forth 1.5 : Fast direct-threaded Forth (DOS).

Fortran
BC Fortran 77 v1.3b : Compiler, linker, module library and resident run-time w/debugger (DOS). (181kb)
*F Compiler : You download via ftp compiler versions for many operating systems (Win/...)
Lahey Fortran 77 v3.0 : The Lahey is a well known F77 compiler, although this is an early version (DOS). (382kb)
Microsoft FORTRAN 5.1 : A good and well known compiler (DOS). (1.74MB)
*Watcom FORTRAN v11.0c : FORTRAN 77 development environment (DOS/Win/OS2)


Lisp / Scheme
Apteryx Lisp v1.031 : A windows 3.x Lisp compiler (Win 3.x). (212kb)
*newLISP 7.0.1 : newLISP is a compiler that has features of Common LISP and Scheme. It is still being developed (Win/Linux/Mac...).
*PC-Lisp v3.00 : Lisp stands for LISt Programming. It is considered suitable for AI. This compiler is not Object-Oriented like other compilers (XLisp etc) and is a subset of Franz Lisp (DOS).
*XLisp Plus v3.04 : This version supports most Common Lisp functions (DOS/Win).
XScheme v0.17 : An object-oriented implementation of the Scheme programming language, that lacks a good editor. Scheme is similar to, but simpler than Common Lisp (DOS). (163kb)
*Youtoo 0.93 : Yootoo is the latest EuLisp interpreter. EuLisp resembles to Lisp and it supports objects and parallel programming. Download from the ftp (Linux).
Logo
*DFP LOGO 1.2 : LOGO is a computer language designed to introduce young children to programming (DOS).
*LSRHS Free LOGO : Another LOGO interpreter (DOS).


Modula-2 / Modula-3
*Fitted Software Tools Modula-2 v3.1 : Modula-2 was designed by the creator of Pascal based on the experience and requests of PASCAL programmers (DOS).
*M3forDOS 3.1 : A DOS port for SRC Modula 3 (DOS).
*M3pc-Klangenfurt : Another DOS port for SRC Modula 3 (DOS).


Pascal
*Free Pascal V1.0.6 : A good (and free) Pascal compiler (DOS/Win/Linux...).
*Pascal Pro V0.1 : Requires TASM/MASM or NASM,TLINK32 and WDOSX or similar to produce executables (DOS).
*TMT Pascal Lite 3.90 : Fast 32 bit compiler. The DOS version is free to download. (DOS).
Turbo PASCAL 5.5 : A basic Pascal compiler (DOS).
*Virtual Pascal V2.1 : 32bit Pascal development environment (Win/OS2).


Perl
*ActivePerl 5.8 : Excellent Perl compiler. And you can't beat the price, since it is free (Win-Linux-Solaris).
Perl 4.0 : PERL - Practical Extraction Report Language - a very important and powerful script programming language (DOS). (175kb)


Prolog
BinProlog v2.20 : Prolog is a higher level language that leaves more to the compiler and simplifies the design of complex programs. This is an old but fast C-emulated compiler (DOS). (119kb)
Prolog-2 v2.35 : An MS-DOS version of prolog by Expert Systems (DOS). (149kb)
*Strawberry Prolog 2.3 : This is an excellent (and easy to use) Windows Prolog compiler. Unfortunatelly, the free (Light) Edition does not create .EXE files (Win 9x).
*Visual Prolog 6 : A complete PROLOG environment (Win).


Python
*Es un lenguaje interpretado luego utilizará un intérprete para implementar o ejecutar el código.

REXX
*BREXX 1.3 : REXX is a procedural language that allows programs and algorithms to be written in a clear and structured way (DOS/Linux). (267kb)
*Regina REXX : Regina REXX port for Win32 (Win).


Smalltalk
*Little Smalltalk v3 : Little Smalltalk is a subset of the Smalltalk object-oriented language (DOS).

Tcl
*ActiveTcl 8.4.1 : I don't know anything about Tcl, but judging from ActiveState's other products, the compiler should be very good (Win-Linux-Solaris).

xBase
*Harbour : Free xBase compiler (DOS/Win/Linux/OS2...).
*MAX 2.0 : Free xBase compiler (Win/Linux).


AutoIT
AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting.

Fuente:
Citar
lista-de-compiladores-gratuitos-(cientos-de-ellos), creador Ariel.
158  Comunicaciones / Dispositivos Móviles (PDA's, Smartphones, Tablets) / Re: RAT y formateo en: 13 Marzo 2017, 05:06 am
Busca otro móvil.


Sip, consejo tonto, lo siento  :-\
Hola añado otra manera mas que sería por medio de una rom o un firmware propio te bajas el odin y le metes caña  ;)
159  Programación / Programación C/C++ / Re: Como solucionar estos errores de mi proyecto en: 13 Marzo 2017, 01:56 am
Tengo que añadir las otras librerias en modo estatico tambien:
Código:
ws2_32
dnsapi
gdi32
crypt32
secur32
Alguien sabría como conseguir las libreras estáticas creo que
Código:
crypt32
secur32
Son de openssl?
160  Programación / Programación C/C++ / Re: No puedo declarar la variable por ser un tipo abstracto en: 12 Marzo 2017, 19:30 pm
funciono gracias
Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ... 53
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines