问题描述
我正在尝试修改包含在 static/temp 文件夹中的 .JPEG 文件,以确保它们已损坏但目标文件被忽略。目标是更改或注入文件中的数据以使其无法恢复,但稍后我将尝试使反向程序检测注入的数据并将其从文件中删除,以便在文件损坏时恢复文件这个特殊的程序。
代码:
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<string.h>
#include<fstream.h>
void boot() {
clrscr();
textcolor(BLUE);
cprintf("/n/n/n/n/n/t/t/t/t Enter the code : "); // any key would do
getch();
}
void end() {
char a[] = "\n All Modifications of illegal pictures are success .....";
for (int i = 0; i < strlen(a); i++) {
cprintf("%c",a[i]);
delay(20);
}
}
void main() {
boot();
clrscr();
char a[] = "Scanning the folder ..... /n/nListing the files in the folder";
for (int i = 0; i < strlen(a); i++) {
cprintf("%c",a[i]);
delay(50);
}
struct find_t file;
int done = _dos_findfirst("*.*",_A_norMAL,& file);
while (!done) {
cout << "/n";
cprintf("%s",file.name);
delay(30);
done = _dos_findnext( & file);
}
char b[] = "/n Corruption extention search initialised";
for (int j = 0; j < strlen(b); j++) {
cprintf("%c",b[j]);
delay(30);
}
int fin = _dos_findfirst("*.jpg",& file);
while (!fin) {
cout << "/n";
cprintf("%s",file.name);
delay(20);
char * picture1 = file.name;
ofstream ram;
ram.open(picture1,ios::app);
long int size;
long int s,e;
ram.seekp(0);
s = ram.tellp();
ram.seekp(0,ios::end);
e = ram.tellp();
size = e - s;
cprintf("/t size %ld/t Corruption /n",size);
// cout<<"\n press enter to infect ";
// getch();
ram.seekp(0);
ram.close();
ram.open(picture1);
char gh = 'v';
for (long int h = 0; h < size; h++) {
ram << gh;
}
cprintf("/n %s/t Corrupted",file.name);
ram.close();
fin = _dos_findnext( & file);
}
end();
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)