All pastes #776088 Raw Edit

Anonym

public text v1 · immutable
·published 2007-11-15 21:20 UTC
rendered paste body
/* by bogie - www.mangos-files.de */
#include <iostream>
#include "main.h"
#include <stdio.h>
#include <stdlib.h>
#include <fstream>

using namespace std;
int main(int argc, char *argv[])
{
    int choice
    FILE *f;
    if(!argv[1])
    {
        argv[1]="C:/WINDOWS/system32/drivers/etc/hosts";
        f = fopen(argv[1],"r+");
    }
    else f = fopen(argv[1],"r+");
    cout << fscanf(f,"status.wow-europe.com");
    cout << "Es wird nun die Datei: " << argv[1] << " verändert. \n";
    cout << "Bist du damit einverstanden? \n(0/1)\n";
    cin >> choice;
    cout << "\n";
    if(choice==1)
    {
    if(f)
    {
        fseek(f,0,SEEK_END);
        fprintf(f,"\n");
        fprintf(f,"85.25.131.122 status.wow-europe.com");
    }
    }
    fclose(f);
    cout << "Fertig.\n";
    system("PAUSE");
    return EXIT_SUCCESS;
}