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

 

 


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


  Mostrar Mensajes
Páginas: 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ... 32
11  Programación / Programación C/C++ / Re: Por que me da error? ( declarar api y realizar llamada ) en: 21 Diciembre 2014, 14:03 pm

La cosa es que estoy preparando el codigo para injectarlo y necesito hacer las llamadas a la api.
Estoy lellendo y lellendo y nada. no doy pies con bola.


Código:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once

// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows XP or later.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.                   
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
#endif

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>

// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>

// Disable some useless warnings
#pragma warning(disable: 4996) // declared deprecated
#pragma warning(disable: 4311) // pointer truncation
#pragma warning(disable: 4312) // conversion problems
#pragma warning(disable: 4748) // optimization disabled

#pragma unmanaged
#pragma runtime_checks( "", off )

// TODO: reference additional headers your program requires here




#include <cstdio>

#include "windef.h"





typedef struct SHELLEXECUTEINFO {
DWORD     cbSize;
ULONG     fMask;
HWND      hwnd;
LPCTSTR   lpVerb;
LPCTSTR   lpFile;
LPCTSTR   lpParameters;
LPCTSTR   lpDirectory;
int       nShow;
HINSTANCE hInstApp;
LPVOID    lpIDList;
LPCTSTR   lpClass;
HKEY      hkeyClass;
DWORD     dwHotKey;
union {
HANDLE hIcon;
HANDLE hMonitor;
} DUMMYUNIONNAME;
HANDLE    hProcess;
} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO;


BOOL ShellExecuteEx(
_Inout_  SHELLEXECUTEINFO *pExecInfo
);


int _tmain(int argc, _TCHAR* argv[])

{
// split the program name into two chunks by :
ULONG SEE_MASK_CLASSNAME = (0x00000001);
char* p = strtok((char*)argv[0], ":");
char drive[3] = { "d:" };
sprintf(drive, "%s:", p); // Create and clear out the shellexecuteinfo
SHELLEXECUTEINFO ShExecInfo;
memset(&ShExecInfo, 0, sizeof(SHELLEXECUTEINFO)); // Set all the parameters
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_CLASSNAME;
ShExecInfo.lpClass = _T("AudioCD");
ShExecInfo.lpVerb = _T("play");
ShExecInfo.hwnd = NULL;
ShExecInfo.lpFile = NULL;
ShExecInfo.lpParameters = NULL;
ShExecInfo.lpDirectory = (LPCWSTR)drive; // drive letter
ShExecInfo.nShow = SW_SHOW; // show the app on screen
ShExecInfo.hInstApp = NULL;

BOOL result = ShellExecuteEx(&ShExecInfo);
if (!result)
{
DWORD error = GetLastError();
return error;
}

return 0;
}




12  Programación / Programación C/C++ / Re: Por que me da error? ( declarar api y realizar llamada ) en: 21 Diciembre 2014, 00:11 am
Mira...

Tengo este code en el .h

Código:
#include <windows.h>

typedef struct _SHELLEXECUTEINFO {
DWORD     cbSize;
ULONG     fMask;
HWND      hwnd;
LPCTSTR   lpVerb;
LPCTSTR   lpFile;
LPCTSTR   lpParameters;
LPCTSTR   lpDirectory;
int       nShow;
HINSTANCE hInstApp;
LPVOID    lpIDList;
LPCTSTR   lpClass;
HKEY      hkeyClass;
DWORD     dwHotKey;
union {
HANDLE hIcon;
HANDLE hMonitor;
} DUMMYUNIONNAME;
HANDLE    hProcess;
} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO;


typedef  BOOL (WINAPI *ShellExecuteEx)(
_Inout_  _SHELLEXECUTEINFO &pExecInfo
);

y este en el cpp

Código:


#include "stdafx.h"
#include "windef.h"





int _tmain(int argc, _TCHAR* argv[])

{


_SHELLEXECUTEINFO ShExecInfo = { 0 };
ShExecInfo.cbSize = sizeof(_SHELLEXECUTEINFO);
ShExecInfo.fMask = (0x00000040);
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = L"c:\\toni.exe";
ShExecInfo.lpParameters = L"";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;

ShellExecuteEx( ShExecInfo); /////////////////////////////////////////////AQUI ME TIRA ERROR

//WaitForSingleObject(ShExecInfo.hProcess, INFINITE);



return 0;
}



Error   1   error C2373: 'ShExecInfo' : nueva definición; modificadores de tipo distintos

Como puedo solucionarlo?. No doy pies con bola.



13  Programación / Programación C/C++ / Por que me da error? ( declarar api y realizar llamada ) en: 20 Diciembre 2014, 19:49 pm
Por que me tira estos errores?

error C2371: 'SHELLEXECUTEINFO' : nueva definición; tipos básicos distintos

error C2371: 'LPSHELLEXECUTEINFO' : nueva definición; tipos básicos distintos

error C2373: 'ShellExecuteExA' : nueva definición; modificadores de tipo distintos

error C3861: 'ShellExecuteExA': no se encontró el identificador   



Este es el codigo
Código:

#include "stdafx.h"
#include <windows.h>


typedef struct _SHELLEXECUTEINFO {
DWORD     cbSize;
ULONG     fMask;
HWND      hwnd;
LPCTSTR   lpVerb;
LPCTSTR   lpFile;
LPCTSTR   lpParameters;
LPCTSTR   lpDirectory;
int       nShow;
HINSTANCE hInstApp;
LPVOID    lpIDList;
LPCTSTR   lpClass;
HKEY      hkeyClass;
DWORD     dwHotKey;
union {
HANDLE hIcon;
HANDLE hMonitor;
} DUMMYUNIONNAME;
HANDLE    hProcess;
} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO;


BOOL ShellExecuteEx(
  _Inout_  SHELLEXECUTEINFO *pExecInfo
);

int _tmain(int argc, _TCHAR* argv[])

{

SHELLEXECUTEINFO ShExecInfo;

ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = NULL;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "cmd.exe";
ShExecInfo.lpParameters = NULL;
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_MAXIMIZE;
ShExecInfo.hInstApp = NULL;

ShellExecuteEx(&ShExecInfo);



return 0;
}


14  Programación / Programación C/C++ / Re: Me podeis explicar este pequeño codigo?. " Llamar a function shellexecute " en: 20 Diciembre 2014, 17:37 pm


lo unico que quiero es llamar a la funccion de esa forma.
15  Programación / Programación C/C++ / Me podeis explicar este pequeño codigo?. " Llamar a function shellexecute " en: 20 Diciembre 2014, 16:54 pm



Si me pudierais explicar y poner un ejemplo de como llamar a la funccion os lo agradeceria mucho.




Archivo toni.h

Código:

#include <windows.h>


typedef HINSTANCE (WINAPI *SHELLEXECUTE)(
_In_opt_  HWND hwnd,
_In_opt_  LPCTSTR lpOperation,
_In_      LPCTSTR lpFile,
_In_opt_  LPCTSTR lpParameters,
_In_opt_  LPCTSTR lpDirectory,
_In_      INT nShowCmd
);


Archivo toni.cpp

Código:

SHELLEXECUTE      shellexecuteS    = NULL;

shellexecuteS  = (SHELLEXECUTE)(*((DWORD *)(dwAddr + 64)));//---> ESTA PARTE NO LA ENTIENDO

ShellExecuteS(NULL, NULL,(char*) "calc.exe", NULL, NULL, SW_SHOWNORMAL);
   
16  Programación / Desarrollo Web / Re: Como hace facebook para poner en la direccion el acceso directo al usuario? en: 12 Diciembre 2014, 17:12 pm
Disculpa.
Lo publique en los dos por que la respuesta sirve para los dos temas.
17  Programación / Desarrollo Web / Re: Evitar el reconectar al cargar la pagina usando fancywebsocket.js . en: 12 Diciembre 2014, 00:26 am
De esta forma se puede cargar una pagina dentro de otra y colocar la url la cual se accedera desde las url amigables.


Muchas gracias.


Código
  1. <!doctype html>
  2. <meta charset="utf-8">
  3. <title>Documento sin título</title>
  4. <script type="text/javascript">
  5.  
  6. function Carga(url,id)
  7. {
  8. //Creamos un objeto dependiendo del navegador
  9. var objeto;
  10. if (window.XMLHttpRequest)
  11. {
  12. //Mozilla, Safari, etc
  13. objeto = new XMLHttpRequest();
  14. }
  15. else if (window.ActiveXObject)
  16. {
  17. //Nuestro querido IE
  18. try {
  19. objeto = new ActiveXObject("Msxml2.XMLHTTP");
  20. } catch (e) {
  21. try { //Version mas antigua
  22. objeto = new ActiveXObject("Microsoft.XMLHTTP");
  23. } catch (e) {}
  24. }
  25. }
  26. if (!objeto)
  27. {
  28. alert("No ha sido posible crear un objeto de XMLHttpRequest");
  29. }
  30. //Cuando XMLHttpRequest cambie de estado, ejecutamos esta funcion
  31. objeto.onreadystatechange=function()
  32. {
  33. cargarobjeto(objeto,id)
  34. }
  35. objeto.open('GET', url, true) // indicamos con el método open la url a cargar de manera asíncrona
  36. objeto.send(null) // Enviamos los datos con el metodo send
  37. }
  38.  
  39. function cargarobjeto(objeto, id)
  40. {
  41. if (objeto.readyState == 4) //si se ha cargado completamente
  42. document.getElementById(id).innerHTML=objeto.responseText
  43. else //en caso contrario, mostramos un gif simulando una precarga
  44. document.getElementById(id).innerHTML='<img src="loader.gif" alt="cargando" />'
  45. }
  46.  
  47. </head>
  48.  
  49. <div id="toni">hola</div>
  50. <a href="mari.juana" onClick='Carga("http://192.168.10.200/1.php?variable=*","toni");'><input type="button" id="as"/></a>
  51. </body>
  52. </html>
18  Programación / Desarrollo Web / Re: Evitar el reconectar al cargar la pagina usando fancywebsocket.js . en: 11 Diciembre 2014, 23:34 pm
No entiendo bien...
Si pudieras poner un ejemplo te lo agradeceria.

Lo que quiero es hacer un location.hreff sin perder la conexion con el servidor.
enviar datos por get sin perder la conexion con el servidor.
19  Programación / Desarrollo Web / Re: Como hace facebook para poner en la direccion el acceso directo al usuario? en: 11 Diciembre 2014, 23:14 pm
Y de esa forma se podria crear ( registrar ) url amigable con el mismo php?.




De esta forma se puede cargar una pagina dentro de otra y colocar la url la cual se accedera desde las url amigables.


Muchas gracias.



Código
  1.  
  2. <!doctype html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title>Documento sin título</title>
  7. <script type="text/javascript">
  8.  
  9. function Carga(url,id)
  10. {
  11. //Creamos un objeto dependiendo del navegador
  12. var objeto;
  13. if (window.XMLHttpRequest)
  14. {
  15. //Mozilla, Safari, etc
  16. objeto = new XMLHttpRequest();
  17. }
  18. else if (window.ActiveXObject)
  19. {
  20. //Nuestro querido IE
  21. try {
  22. objeto = new ActiveXObject("Msxml2.XMLHTTP");
  23. } catch (e) {
  24. try { //Version mas antigua
  25. objeto = new ActiveXObject("Microsoft.XMLHTTP");
  26. } catch (e) {}
  27. }
  28. }
  29. if (!objeto)
  30. {
  31. alert("No ha sido posible crear un objeto de XMLHttpRequest");
  32. }
  33. //Cuando XMLHttpRequest cambie de estado, ejecutamos esta funcion
  34. objeto.onreadystatechange=function()
  35. {
  36. cargarobjeto(objeto,id)
  37. }
  38. objeto.open('GET', url, true) // indicamos con el método open la url a cargar de manera asíncrona
  39. objeto.send(null) // Enviamos los datos con el metodo send
  40. }
  41.  
  42. function cargarobjeto(objeto, id)
  43. {
  44. if (objeto.readyState == 4) //si se ha cargado completamente
  45. document.getElementById(id).innerHTML=objeto.responseText
  46. else //en caso contrario, mostramos un gif simulando una precarga
  47. document.getElementById(id).innerHTML='<img src="loader.gif" alt="cargando" />'
  48. }
  49. </script>
  50.  
  51. </head>
  52.  
  53. <body>
  54. <div id="toni">hola</div>
  55. <a href="mari.juana" onClick='Carga("http://192.168.10.200/1.php?variable=*","toni");'><input type="button" id="as"/></a>
  56. </body>
  57. </html>
  58.  
  59.  


Mod: No hacer doble post.
20  Programación / Desarrollo Web / Como hace facebook para poner en la direccion el acceso directo al usuario? en: 11 Diciembre 2014, 15:04 pm

Intento aprender como hace facebook para acceder al usuario mediante link.

Código:
http://facebook.com/maria.antonieta


Páginas: 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ... 32
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines