forked from dinhquoc1st/vss
-
Notifications
You must be signed in to change notification settings - Fork 3
/
hd.c
265 lines (183 loc) · 5.31 KB
/
hd.c
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
FILE *fp;
int a,b,c,d,lv;
float t,idy;
int idx=1;
int nx=16000;
char buffer[9999];
void scan(int a, int b, int c, int d, float t);
void get();
void banner();
int main()
{
int a,b,c,d,e,n;
banner();
int ck;
char buf[25];
printf("\033[1;33mCheking verifications...\033[0m\n");
/* FILE *dm;
dm=fopen("hw","r");
if(dm==NULL){
printf("\033[1;31mVerification failed!\033[0m\n");
return 0;
}
else{
fscanf(dm,"%f",&idy);
}
if(idx=1){
printf("\033[1;31mInvalid account,contact the author on telegram @piroza1\033[0m\n");
return 0;
}
*/
printf("\033[1;35mStatus:Premium\033[0m\n");
printf("\033[1;34mNo expiry\033[0m\n");
sleep(1);
system("date +%y%m%d >vr");
FILE *px=fopen("pirs","r");
if(px!=NULL){
printf("\033[1;31mYour trial has expired,contact the author\033[0m\n");
return 0;
}
else {
FILE *pF=fopen("vr","r");
if(pF==NULL){
printf("\033[1;31mVerification failed!This program can't run on this device\033[0m\n");
return 0;
}
else{
fscanf(pF,"%d",&ck);
int cr=300512;
system("date +%H%M >sgr");
FILE *sG=fopen("sgr","r");
fscanf(sG,"%d",&lv);
if(ck>=cr && lv>=nx){
printf("\033[1;31mYour trial has expired,contact the author\033[0m\n");
snprintf(buf,25,"echo \"\" >pirs");
system(buf);
system("cp pirs $PREFIX/bin/pirs");
return 0;
}
else{
printf("\033[1;32mValid account √\033[0m\n");
}
}
}
printf("\033[1;31m\nEnter ip range in cidr: \033[0m");
scanf("%d.%d.%d.%d/%d",&a,&b,&c,&d,&e);printf("\033[1;34m\nEnter connection timeout: \033[0m");
scanf("%f", &t);
switch (e)
{
case 24:
n=255;
d=0;
for(d=0;d<=n;d++)
{
scan(a,b,c,d,t);
}
break;
case 16:
n=2505;
for(d=0;d<=n;d++){
for(c=0;c<=n;c++){
scan(a,b,c,d,t);
}
}
break;
default:
printf("\033[1;31mThat subnet is not yet implemented\n\033[0m");
return 0;
}
if(e==24){
d=0;
}
else if(e==16)
{
c=0;
d=0;
}
banner();
printf("\033[1;34mScanning results of \033[0m");
printf("\033[1;32m%d.%d.%d.%d/%d\033[0m\n\n",a,b,c,d,e);
FILE *fp1=fopen("bugs","r");
if(fp1==NULL){
printf("\033[1;31mNo host was found!\033[0m");
return 0;
}
get();
system("cat bugs >> hosts.txt");
system("rm bugs");
printf("\033[1;34mSaved to \033[0m");
printf("\033[1;32mhosts.txt\033[0m\n\n");
printf("\033[1;31mScripted by piroza\033[0m\n");
printf("\033[1;31mYoutube:\033[0m");
printf("\033[1;32m@Pirozatech\033[0m\n");
return 0;
}
void scan(int a, int b, int c, int d, float t)
{
int lv;
system("date +%H%M >sgr");
FILE *sG=fopen("sgr","r");
fscanf(sG,"%d",&lv);
if(lv>=nx)
{
printf("\033[1;31mYour trial has expirsed,contact the Author.\033[0m\n");
}
else{
char buf[250];
double m=t;
snprintf(buf,250,"\ncurl https://%d.%d.%d.%d --tlsv1.2 --tls-max 1.2 --connect-timeout %.4f -m %.4f -k -o /dev/null -s -w \"%%{remote_ip} timeout!: %%{response_code}\\n\" > host.txt",a,b,c,d,t,m);
char fast[50];
char second[50];
char buk[250];
int sts;
system(buf);
FILE *fptr;
FILE *fptr1;
FILE *fptr2;
FILE *fp1;
fptr = fopen("host.txt", "a");
fptr1 = fopen("host.txt", "a");
fptr2 = fopen("host.txt", "a");
fptr = fopen("host.txt", "r");
fscanf(fptr, "%s", fast);
system("cut -f 2- -d ' ' host.txt > host1.txt");
fptr1 = fopen("host1.txt", "r");
fscanf(fptr1, "%s", second);
system("cut -f 2- -d ' ' host1.txt > host2.txt");
fptr2 = fopen("host2.txt", "r");
fscanf(fptr2, "%d",&sts);
if(sts==000){
printf("\033[1;31m%s\033[0m\n",fast);
}
else
{
printf("\033[1;32m%s\033[0m ",fast);
printf("\033[1;32m√\033[0m\n");
snprintf(buk,250,"echo \"%d.%d.%d.%d\" >>bugs",a,b,c,d);
system(buk);
}
}
}
void get()
{
FILE *fp1=fopen("bugs","r");
while(fgets(buffer,9999,fp1)!=NULL){
printf("\033[1;32m%s\033[0m\n",buffer);
}
}
void banner()
{
system("clear");
printf("╔╗─╔╗─────╔╗╔═══╗\n");
printf("║║─║║────╔╝╚╬╗╔╗║\n");
printf("║╚═╝╠══╦═╩╗╔╝║║║╠╦══╦══╦══╦═╗\n");
printf("║╔═╗║╔╗║══╣║─║║║╠╣╔╗║╔╗║║═╣╔╝\n");
printf("║║─║║╚╝╠══║╚╦╝╚╝║║╚╝║╚╝║║═╣║\n");
printf("╚╝─╚╩══╩══╩═╩═══╩╩═╗╠═╗╠══╩╝\n");
printf("─────────────────╔═╝╠═╝║\n");
printf("─────────────────╚══╩══╝");
printf("v1.0.1\n");
}