#include "StdAfx.h"
#include <iostream>
#include <string.h>
using namespace std;
void encrypt_data();
int main()
{
FILE * f;
unsigned char buffer[100];
int n;
f = fopen("C:\\Program Files (x86)\\TeamViewer\\Version6\\TeamViewer.exe", "rb");
if (f)
{
n = fread(buffer, 100, 1, f);
for (int c = 0; c <= 100 ; c++)
{
printf("%.2X ", (int)buffer[c]); //outputs hex!!!!!!
// put an extra space between every 4 bytes
if (c % 4 == 3)
{
printf(" ");
}
// Display 16 bytes per line
if (c % 16 == 15)
{
printf("\n");
}
}
// Add an extra line feed for good measure
printf("\n\n\n");
}
else
{
cout << "error";
}
char a;
cin >> a;
return 0;
}
#include "StdAfx.h"
#include <iostream>
#include <string.h>
using namespace std;
void encrypt_data();
int main()
{
FILE * f;
unsigned char buffer[100];
int n;
f = fopen("C:\\Program Files (x86)\\TeamViewer\\Version6\\TeamViewer.exe", "rb");
if (f)
{
n = fread(buffer, 100, 1, f);
for (int c = 0; c <= 100 ; c++)
{
printf("%.2X ", (int)buffer[c]); //outputs hex!!!!!!
// put an extra space between every 4 bytes
if (c % 4 == 3)
{
printf(" ");
}
// Display 16 bytes per line
if (c % 16 == 15)
{
printf("\n");
}
}
// Add an extra line feed for good measure
printf("\n\n\n");
}
else
{
cout << "error";
}
char a;
cin >> a;
return 0;
}
To copy to clipboard, switch view to plain text mode
I want to make that in Qt^^^
And FelixB the loop doesn't stop for me.
Bookmarks