-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrandom hash access to steemit images.cpp
53 lines (46 loc) · 1.4 KB
/
random hash access to steemit images.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* wget or wget64.exe for windows is required */
/* 2018 01 09 3:00 AM */
#include <stdio.h>
#include <Windows.h>
#include <time.h>
int main()
{
FILE *file;
char output[1000];
int n, r;
// valid test case
char test[93] = " /C wget64 C:\ https://steemitimages.com/DQmaCMZjV8bCSvYGS3FmSfhnNSeWNKQqHj9bQBzLjDRDftF";
char filenamee[48] = "DQmaCMZjV8bCSvYGS3FmSfhnNSeWNKQqHj9bQBzLjDRDftF";
char cmd[93] = { 0 }, yn, filename[48] = { 0 };
strcpy(cmd, " /C wget64 D:\app\ https://steemitimages.com/");
srand(time(NULL));
while (1) {
printf("open random page...\n");
yn = 'y';
if (yn == 'y') {
for (int i = 43; i < 90; ) {
n = rand() % 128;
if ((n >= '0'&&n <= '9') || (n >= 'A'&&n <= 'Z') || (n >= 'a'&&n <= 'z')) {
*(filename + i - 43) = n;
*(cmd + i++) = n;
}
}
// test code
// r = (int)ShellExecuteA(GetDesktopWindow(), "open", "cmd.exe", test, "C:W", SW_SHOW);
r = (int)ShellExecuteA(GetDesktopWindow(), "open", "cmd.exe", cmd, "C:W", SW_SHOW);
Sleep(6000);
file = fopen(filenamee, "rb");
if (!file) {
printf("try again...\n");
}
else {
printf("success\n");
// project folder
// ShellExecuteA(GetDesktopWindow(), "open", "explorer.exe", "C:\\Users\\Administrator\\Documents\\Visual Studio 2017\\Projects", NULL, SW_SHOW);
break;
}
}
else break;
}
return 0;
}