-
Notifications
You must be signed in to change notification settings - Fork 0
/
BRUTE.BAK
168 lines (163 loc) · 4.41 KB
/
BRUTE.BAK
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
/**************************************
Author: Shreays KB
3rd BCA "B"
date :18/11/2022
**************************************/
//Header files section
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<iostream.h>
#include<stdlib.h>
#include<dos.h>
#include<ctype.h>
//Global variable declation
long int rpass=123,hpass=0,tpass=0,thpass=0,gpass=0,ghpass=0;
// r-real, t-temp, g-guess, h-hash,pass-password
char command[15];
int count=0,choice;
//function declation
void bo(int x1, int y1,int x2,int y2);
void lin(int x1, int y1, int x2);
void pa(void);
long int conv(long n);
//Main section
void main()
{
while(!kbhit())
{
clrscr();
hpass = conv(rpass);
gotoxy(31,7);cout<<"........Tool Menu........";
bo(20,5,65,23);
lin(20,9,65);
lin(20,19,65);
gotoxy(30,11);
cout<<"1.Administator tool";
gotoxy(30,13);
cout<<"2.Login page";
gotoxy(30,15);
cout<<"3.Start Brute force";
gotoxy(30,17);
cout<<"4.Exit";
gotoxy(28,19);
cout<<" Please enter your choice ";
gotoxy(30,21);
cin>>choice;
switch(choice)
{
case 1:
{
clrscr();
gotoxy(25,7);cout<<"Enter the new password to change";
bo(20,5,65,23);
lin(20,9,65);
bo(30,13,55,16);
gotoxy(32,14);cout<<"Username: Admin ";
gotoxy(32,15);cout<<"Password: ";
gotoxy(42,15);cout<<"******";
lin(20,19,65);
gotoxy(42,15);cin>>rpass;
hpass = conv(rpass);
break;
}
case 2:
{
clrscr();
gotoxy(30,7);cout<<"Login page";
bo(20,5,65,23);
lin(20,9,65);
bo(30,13,55,16);
gotoxy(32,14);cout<<"Username: Admin ";
gotoxy(32,15);cout<<"Password: ";
gotoxy(42,15);cout<<"******";
lin(20,19,65);
gotoxy(42,15);cin>>tpass;
thpass=conv(tpass);
if(hpass!=thpass) {gotoxy(23,20); cout<<"The username and password did not match!";}
else
pa();
delay(1000);
break;
}
case 3:
{
gotoxy(35,20); cout<<"Loading terminal...";
for(int k=22;k<64; k++)
{
gotoxy(k,21);putch(176);
}
for(k=22;k<64;k++)
{
gotoxy(k,21);putch(219);
delay(100);
}
clrscr();
cout<<"Enter command to start brute force attack: ";
cin>>command;
while(kbhit)
{
ghpass= conv(gpass);
if(hpass==ghpass)
{
cout<<">>airtack -login - user 'Admin' - password '"<<gpass<<"' - Athentication Success.\nPassword is found as: "<<gpass<<endl;delay(10000);break;
}
else
{
cout<<">>airtack -login - user 'Admin' - password '"<<gpass<<"' - Access Denied "<<endl;gpass++;
if(count>0)
{
delay(1500); count--;
}
}
}break;
}
case 4:exit(0);break;
default:
{
clrscr();
gotoxy(25,5);
printf("Invalid choice...!");
getche();
break;
}
}}
getch();
}
//function to display the victim website
void pa(void)
{
clrscr();
cout<<"\n\nWelcome to Narendra Pre-University College\n"<<endl;
cout<<"The Campus of NARENDRA PU College always gives a feel of sacred.Though students are from different cultural backgrounds they live happily under the single roof. The reason is that the atmosphere here is clement and peaceful. Prayer sessions at the dawn and dusk, meditation, warm up exercises, yoga, pranayama at the crack of dawn, cultural and entertainment programmes at the week end and also affection, care and parent like concern of Principal, friendly treatment of the lecturers and non teaching staff and counseling have given the students a feeling of joy and satisfaction.";
cout<<"\n\nUser\tPassword\nAdmin\t"<<hpass;
delay(5000);
}
//function to draw the box as dialog box
void bo(int x1, int y1, int x2, int y2)
{
int x;
gotoxy(x1,y1);putch(201);gotoxy(x2,y1);putch(187);
gotoxy(x1,y2);putch(200);gotoxy(x2,y2);putch(188);
for(x=x1+1;x<x2;x++) {gotoxy(x,y1);putch(205);gotoxy(x,y2);putch(205);}
for(x=y1+1;x<y2;x++) {gotoxy(x1,x);putch(186);gotoxy(x2,x);putch(186);}
}
//function to dreaw the line which combine with the box
void lin(int x1,int y1,int x2)
{
int k;
gotoxy(x1,y1);putch(204);gotoxy(x2,y1);putch(185);
for(k=x1+1;k<x2;k++) {gotoxy(k,y1);putch(205);}
}
long int conv(long n)
{
long int rem,i=1,oct=0;
while (n!=0)
{
rem = n%2;
n=n/2;
oct = oct+(rem*i);
i=i*10;
}
return oct;
}