├── .gitignore
├── LICENSE
├── README.md
├── docs
├── contribute.md
├── formatting.md
├── googlesearch.md
├── images
│ ├── banner.png
│ ├── logo.svg
│ ├── logo_white.svg
│ └── pyPhoneInfoGa.png
├── index.md
├── install.md
├── resources.md
└── usage.md
├── examples
├── generate.sh
├── input.txt
├── output_from_input.txt
└── output_single.txt
├── lib
├── __init__.py
├── args.py
├── banner.py
├── chromedriver
├── chromedriver.exe
├── colors.py
├── format.py
├── googlesearch.py
├── logger.py
├── output.py
└── request.py
├── osint
├── disposable_num_providers.json
├── individuals.json
├── reputation.json
└── social_medias.json
├── phoneinfoga.py
├── requirements.txt
├── scanners
├── __init__.py
├── footprints.py
├── localscan.py
├── numverify.py
├── ovh.py
└── recon.py
└── tests
├── __init__.py
└── lib
├── banner.py
└── format.py
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .buildconfig
3 | __pycache__/
4 | .vscode/
5 | config.py
6 | geckodriver.log
7 | .coverage
8 | *.yml
9 | *.toml
10 | docker*
11 | .dockerignore
12 | Dockerfile
--------------------------------------------------------------------------------
/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 |
2 |
3 |
4 |
5 |
30 |
31 | ## About
32 |
33 | pyPhoneInfoga is a rebase from version 1.11 of the [phoneinfoga](https://github.com/sundowndev/phoneinfoga), written by [sundowndev](https://github.com/sundowndev). The original developer chose to switch codebase from python to GoLang, but this repo will be an attempt to improve on the original python codebase, and add any additional features added to the GoLang version, but in keeping with python as the choice of language.
34 |
35 | PhoneInfoga is one of the most advanced tools to scan phone numbers using only free resources. The goal is to first gather standard information such as country, area, carrier and line type on any international phone numbers with a very good accuracy. Then search for footprints on search engines to try to find the VoIP provider or identify the owner.
36 |
37 | ## Features
38 |
39 | - Check if phone number exists and is possible
40 | - Gather standard informations such as country, line type and carrier
41 | - OSINT footprinting using external APIs, Google Hacking, phone books & search engines
42 | - Check for reputation reports, social media, disposable numbers and more
43 | - Scan several numbers at once
44 | - Use custom formatting for more effective OSINT reconnaissance
45 | - Automatic footprinting on several custom formats
46 |
47 | 
48 |
49 | ## License
50 |
51 | Additions in this repo are under GPLv3.
52 |
53 | The original tool by sundowndev is licensed under the GNU General Public License v3.0.
54 |
55 | Some parts of this code comes from [Infoga](https://github.com/m4ll0k/infoga), another project licensed under GPLv3.0.
56 |
57 | [Icon](https://www.flaticon.com/free-icon/fingerprint-search-symbol-of-secret-service-investigation_48838) made by Freepik from flaticon.com is licensed by CC 3.0 BY.
58 |
59 |
--------------------------------------------------------------------------------
/docs/contribute.md:
--------------------------------------------------------------------------------
1 | # Contribute
2 |
3 | This page describe the project structure and gives you a bit of help to start contributing.
4 |
5 | The project is maintained by a single person: [sundowndev](https://github.com/sundowndev). Contributions are welcome !
6 |
7 | !!! tip "Want to contribute ? Clone the project and open some pull requests !"
8 |
9 | ## Project
10 |
11 | ### Installation
12 |
13 | See the [installation page](install.md) to install the project.
14 |
15 | ### File structure
16 |
17 | ```
18 | $ tree . -I __pycache__
19 |
20 | ├── docs
21 | ├── examples
22 | │ ├── generate.sh
23 | │ ├── input.txt
24 | │ ├── output_from_input.txt
25 | │ └── output_single.txt
26 | ├── lib
27 | │ ├── args.py
28 | │ ├── banner.py
29 | │ ├── colors.py
30 | │ ├── format.py
31 | │ ├── googlesearch.py
32 | │ ├── __init__.py
33 | │ ├── logger.py
34 | │ ├── output.py
35 | │ └── request.py
36 | ├── osint
37 | ├── scanners
38 | │ ├── footprints.py
39 | │ ├── __init__.py
40 | │ ├── localscan.py
41 | │ ├── numverify.py
42 | │ ├── ovh.py
43 | │ └── recon.py
44 | ├── config.example.py
45 | ├── Dockerfile
46 | ├── mkdocs.yml
47 | ├── phoneinfoga.py
48 | └── requirements.txt
49 | ```
50 |
51 | ## Testing
52 |
53 | We use Green to run unit tests.
54 |
55 | ```shell
56 | # Install green
57 | python -m pip install green
58 |
59 | # Run unit tests
60 | python -m green tests/**/*.py -r -vvv
61 | ```
62 |
63 | ## Formatting
64 |
65 | We use Black code formatter to format Python files.
66 |
67 | ```shell
68 | # Install Black
69 | python -m pip install black
70 |
71 | # Check file formats using Black
72 | python -m black --config black.config.toml lib scanners tests --check
73 |
74 | # Format files using Black
75 | python -m black --config black.config.toml lib scanners tests
76 | ```
77 |
78 | ## Documentation
79 |
80 | We use [mkdocs](https://www.mkdocs.org/) to write our documentation.
81 |
82 | ### Install mkdocs
83 |
84 | ```
85 | python3 -m pip install mkdocs
86 | ```
87 |
88 | ### Serve documentation on localhost
89 |
90 | ```
91 | mkdocs serve
92 | ```
93 |
94 | ### Deploy on github pages
95 |
96 | ```
97 | mkdocs gh-deploy
98 | ```
--------------------------------------------------------------------------------
/docs/formatting.md:
--------------------------------------------------------------------------------
1 | # Formatting phone numbers
2 |
3 | ## Basics
4 |
5 | The tool only accepts E164 and International formats as input.
6 |
7 | - E164: +3396360XXXX
8 | - International: +33 9 63 60 XX XX
9 | - National: 09 63 60 XX XX
10 | - RFC3966: tel:+33-9-63-60-XX-XX
11 | - Out-of-country format from US: 011 33 9 63 60 XX XX
12 |
13 | E.164 formatting for phone numbers entails the following:
14 |
15 | - A + (plus) sign
16 | - International Country Calling code
17 | - Local Area code
18 | - Local Phone number
19 |
20 | For example, here’s a US-based number in standard local formatting: (415) 555-2671
21 |
22 | 
23 |
24 | Here’s the same phone number in E.164 formatting: +14155552671
25 |
26 | 
27 |
28 | In the UK, and many other countries internationally, local dialing may require the addition of a '0' in front of the subscriber number. With E.164 formatting, this '0' must usually be removed.
29 |
30 | For example, here’s a UK-based number in standard local formatting: 020 7183 8750
31 |
32 | Here’s the same phone number in E.164 formatting: +442071838750
33 |
34 |
35 | ## Custom formatting
36 |
37 | Sometimes the phone number has footprints but is used with a different formatting. This is a problem because for example if we search for "+15417543010", we'll not find web pages that write it that way : "(541) 754–3010". So the tool use a (optional) custom formatting given by the user to find further and more accurate results. To use this feature properly and make the results more valuable, try to use a format that someone of the number' country would usually use to share the phone number online.
38 |
39 | For example, French people usually write numbers that way online : `06.20.30.40.50` or `06 20 30 40 50`.
40 |
41 | For US-based numbers, the most common format is : `543-456-1234`.
42 |
43 | ### Examples
44 |
45 | Here are some examples of custom formatting for US-based phone numbers :
46 |
47 | - `+1 618-555-xxxx`
48 | - `(+1)618-555-xxxx`
49 | - `+1/618-555-xxxx`
50 | - `(618) 555xxxx`
51 | - `(618) 555-xxxx`
52 | - `(618) 555.xxxx`
53 | - `(618)555xxxx`
54 | - `(618)555-xxxx`
55 | - `(618)555.xxxx`
56 |
57 | For European countries (France as example) :
58 |
59 | - `+3301 86 48 xx xx`
60 | - `+33018648xxxx`
61 | - `+33018 648 xxx x`
62 | - `(0033)018648xxxx`
63 | - `(+33)018 648 xxx x`
64 | - `+33/018648xxxx`
65 | - `(0033)018 648 xxx x`
66 | - `+33018-648-xxx-x`
67 | - `(+33)018648xxxx`
68 | - `(+33)01 86 48 xx xx`
69 | - `+33/018-648-xxx-x`
70 | - `+33/01-86-48-xx-xx`
71 | - `+3301-86-48-xx-xx`
72 | - `(0033)01 86 48 xx xx`
73 | - `+33/01 86 48 xx xx`
74 | - `(+33)018-648-xxx-x`
75 | - `(+33)01-86-48-xx-xx`
76 | - `(0033)01-86-48-xx-xx`
77 | - `(0033)018-648-xxx-x`
78 | - `+33/018 648 xxx x`
79 |
80 | ## Local scan formatting (developers)
81 |
82 | The local scan create several variables to be usable in OSINT footprinting and other scanners.
83 |
84 | Examples :
85 |
86 | ```
87 | {
88 | 'input': '+1 512-618-xxxx',
89 | 'default': '1512618xxxx',
90 | 'local': '512618xxxx',
91 | 'international': '+1 512-618-xxxx',
92 | 'country': 'United States',
93 | 'countryCode': '+1',
94 | 'countryIsoCode': 'US',
95 | 'location': 'Texas',
96 | 'carrier': ''
97 | }
98 | ```
99 |
100 | ```
101 | {
102 | 'input': '+33 066651xxxx',
103 | 'default': '3366651xxxx',
104 | 'local': '66651xxxx',
105 | 'international': '+33 66651xxxx',
106 | 'country': 'France',
107 | 'countryCode': '+33',
108 | 'countryIsoCode': 'FR',
109 | 'location': 'France',
110 | 'carrier': 'Bouygues'
111 | }
112 | ```
--------------------------------------------------------------------------------
/docs/googlesearch.md:
--------------------------------------------------------------------------------
1 | # Dealing with Google captcha
2 |
3 | ### Using Google API key
4 |
5 | If you have a Google search console API key, all you have to do is to edit the file `config.py` and fill it with your credentials. If you leave fields empty, the tool will automatically use the default search feature described below.
6 |
7 | #### How to create a Google Custom Search Engine API key and CX id
8 |
9 | **CX id** :
10 |
11 | - Go to [https://cse.google.com/cse/create/new](https://cse.google.com/cse/create/new) to create a new search engine
12 | - Fill the form with a fake domain site like `example.com`
13 | - Select English as language
14 | - Give any name to your search engine and click on Create button
15 | - Go to [https://cse.google.com/cse/all](https://cse.google.com/cse/all) again and click on the search engine you just created.
16 | - Select all entries in "Sites to search" and delete them
17 | - Turn "Search the entire web" to ON
18 | - Click on the "Search engine ID" button and copy your search engine id. This is the value for `google_cx_id` field in config.py file
19 |
20 | **CSE API key** :
21 |
22 | - Go to [https://console.developers.google.com/apis/credentials](https://console.developers.google.com/apis/credentials)
23 | - Click on "Create credentials" and select API key
24 | - Copy the API key and click on close button. This is the value for `google_api_key` field in the config.py file
25 | - **Be sure to restrict the API key** to "Custom Search API"
26 |
27 | ### Using the webdriver
28 |
29 | By default, PhoneInfo uses Selenium to handle Google search feature. When running OSINT scans, you will usually be blacklisted very easily by Google, which will ask the tool to complete a captcha. Nothing more simple, just complete the captcha that appears on the firefox window. Then press ENTER in the CLI to tell the tool it can continue the scanning process.
30 |
31 | !!! warning "If the tool can't find your browser executable, you can specify the Firefox executable path in `config.py` or leave it blank to use the default configuration."
32 |
33 | !!! failure
34 | Still having issues with Google captcha ? Please [open an issue](https://github.com/sundowndev/PhoneInfoga/issues). **Please don't disclose any personal data.**
35 |
36 | #### Using Docker
37 |
38 | When you run the tool with docker, the geckodriver and Selenium are also containerized. Make sure you launched all services with docker-compose.
39 |
40 | After you successfully launched all services, you should have the following setup :
41 |
42 | ```
43 | $ docker-compose ps
44 | Name Command State Ports
45 | ---------------------------------------------------------------------------------
46 | phoneinfoga python phoneinfoga.py Exit 0
47 | phoneinfoga_firefox_1 /opt/bin/entry_point.sh Up 0.0.0.0:5900->5900/tcp
48 | selenium-hub /opt/bin/entry_point.sh Up 0.0.0.0:4444->4444/tcp
49 | ```
50 |
51 | The web driver (`phoneinfoga_firefox_1`) is mounted on port 5900. It includes a VNC server which allows you to control the browser through Docker. To connect to the VNC server, download a VNC client and connect to `127.0.0.1` on port `5900` with password `secret`.
52 |
53 | Here's an example of VNC URL :
54 |
55 | ```
56 | vnc://127.0.0.1:5900
57 | ```
58 |
59 | !!! tip
60 | Also make sure you disabled any `read-only` or `view-only` mode so you can interact with the browser in order to complete the captcha.
61 |
62 | ##### VNC clients
63 |
64 | - [Chicken, an open-source VNC client for MacOS X](https://sourceforge.net/projects/chicken/)
65 | - [Vinagre, an open-source VNC client for GNOME (Linux)](https://github.com/GNOME/vinagre)
66 |
--------------------------------------------------------------------------------
/docs/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dont-Copy-That-Floppy/pyPhoneInfoga/6ee50113ce63415e95fb917f1100f2e18f4b63d5/docs/images/banner.png
--------------------------------------------------------------------------------
/docs/images/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/docs/images/logo_white.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/docs/images/pyPhoneInfoGa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dont-Copy-That-Floppy/pyPhoneInfoga/6ee50113ce63415e95fb917f1100f2e18f4b63d5/docs/images/pyPhoneInfoGa.png
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # Welcome to the PhoneInfoga documentation
2 |
3 | PhoneInfoga is one of the most advanced tools to scan phone numbers using only free resources. The goal is to first gather standard information such as country, area, carrier and line type on any international phone numbers with a very good accuracy. Then search for footprints on search engines to try to find the VoIP provider or identify the owner.
4 |
5 | ### [Read the related blog post](https://medium.com/@SundownDEV/phone-number-scanning-osint-recon-tool-6ad8f0cac27b)
6 |
7 | ## Features
8 |
9 | - Check if phone number exists and is real
10 | - Gather standard informations such as country, line type and carrier
11 | - OSINT footprinting using external APIs, Google Hacking, phone books & search engines
12 | - Check for reputation reports, social media, disposable numbers and more
13 | - Scan several numbers at once
14 | - Use custom formatting for more effective OSINT reconnaissance
15 | - Automatic footprinting on several custom formats
16 |
17 | ## Anti-features
18 |
19 | - Does not claim to provide relevent or verified data, it's just a tool !
20 | - Does not allow to "track" a phone or its owner in real time
21 |
22 | ----
23 |
24 | !!! bug
25 | Found a bug ? Feel free to [open an issue](https://github.com/sundowndev/PhoneInfoga/issues).
26 |
27 | You can also [reach me on Twitter](https://twitter.com/sundowndev) or at raphael(at)crvx.fr.
28 |
29 | PGP: [B64687AB97F268F43E67B97A8916203E540C65A4](https://crvx.fr/publickey.asc)
30 |
--------------------------------------------------------------------------------
/docs/install.md:
--------------------------------------------------------------------------------
1 | To install PhoneInfoga, you'll need to download source code then install dependencies.
2 |
3 | Requirements :
4 |
5 | - python3 and python3-pip **OR** Docker
6 | - git **OR** curl
7 |
8 | ## Manual installation
9 |
10 | ### Clone the repository
11 |
12 | ```shell
13 | git clone https://github.com/sundowndev/PhoneInfoga
14 | cd PhoneInfoga/
15 | ```
16 |
17 | You can also download the source code archive :
18 |
19 | ```shell
20 | # Download it
21 | curl -L $(curl -s https://api.github.com/repos/sundowndev/phoneinfoga/releases/latest | grep tarball_url | cut -d '"' -f 4) -o PhoneInfoga.tar.gz
22 | # Then extract it
23 | tar -xvzf PhoneInfoga.tar.gz
24 | cd sundowndev*
25 | ```
26 |
27 | ### Install requirements
28 |
29 | ```shell
30 | python3 -m pip install -r requirements.txt --user
31 | ```
32 |
33 | ### Create the config file
34 |
35 | ```shell
36 | cp config.example.py config.py
37 | ```
38 |
39 | To ensure everything works, use the `-v` option to show the version :
40 |
41 | ```shell
42 | python3 phoneinfoga.py -v
43 | ```
44 |
45 | ### Install the Geckodriver
46 |
47 | The Geckodriver is the Firefox webdriver for Selenium, which is used by PhoneInfoga to perform queries to Google search and handle captcha. Firefox is actually the only webdriver supported by PhoneInfoga.
48 |
49 | !!! tip "Want to hack it to use chrome or another driver instead ? See [this file](https://github.com/sundowndev/PhoneInfoga/blob/8179fe4857ca7df2d843119e2123c260e8401818/lib/googlesearch.py#L35)."
50 |
51 | #### Linux
52 |
53 | ##### Download
54 |
55 | Go to the [geckodriver releases page](https://github.com/mozilla/geckodriver/releases). Find the latest version of the driver for your platform and download it. For example:
56 |
57 | ```shell
58 | curl -L https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz -o geckodriver-v0.24.0-linux64.tar.gz
59 | ```
60 |
61 | ##### Extract the file
62 |
63 | ```shell
64 | tar -xzf geckodriver-*.tar.gz -O > /usr/bin/geckodriver
65 | ```
66 |
67 | ##### Make it executable
68 |
69 | ```shell
70 | sudo chmod +x /usr/bin/geckodriver
71 | ```
72 |
73 | ##### Remove the archive
74 |
75 | ```shell
76 | rm geckodriver-*.tar.gz
77 | ```
78 |
79 | !!! note
80 | You also have to install Firefox browser v65+. To verify everything is working fine, use the following commands:
81 |
82 | - `which firefox` should return something like `/usr/bin/firefox`
83 | - `which geckodriver` should return something like `/usr/bin/geckodriver`
84 |
85 | #### MacOS
86 |
87 | You can use brew to install the geckodriver
88 |
89 | ```
90 | brew install geckodriver
91 | ```
92 |
93 | It should then be installed at `/usr/local/bin/geckodriver`.
94 |
95 | #### Windows
96 |
97 | !!! warning
98 | This tool is not tested under any version of Windows. Consider using an *nix operating system.
99 |
100 | - Go to the [geckodriver releases page](https://github.com/mozilla/geckodriver/releases). Find the latest version of the driver for your platform and download it.
101 | - Extract the archive
102 | - Run the executable and follow the instructions
103 |
104 | ## Using Docker
105 |
106 | ### From docker hub
107 |
108 | You can pull the repository directly from Docker hub
109 |
110 | ```shell
111 | docker pull sundowndev/phoneinfoga:latest
112 | ```
113 |
114 | Then run the tool
115 |
116 | ```shell
117 | docker run --rm -it sundowndev/phoneinfoga --help
118 | ```
119 | !!! warning
120 | This image only contain the python tool and not the Selenium hub which is useful to query Google. In order to use Selenium driver, you must use the docker-compose configuration, as described below.
121 |
122 | ### Docker-compose
123 |
124 | You can use a single docker-compose file to run the tool without downloading the source code.
125 |
126 | ```
127 | version: "3"
128 |
129 | services:
130 | phoneinfoga:
131 | image: sundowndev/phoneinfoga
132 | container_name: phoneinfoga
133 | restart: on-failure
134 | environment:
135 | webdriverRemote: 'http://selenium-hub:4444/wd/hub'
136 |
137 | selenium-hub:
138 | image: selenium/hub:3.141.59-palladium
139 | container_name: selenium-hub
140 | ports:
141 | - "4444:4444"
142 |
143 | firefox:
144 | image: selenium/node-firefox:3.141.59-palladium
145 | volumes:
146 | - /dev/shm:/dev/shm
147 | depends_on:
148 | - selenium-hub
149 | environment:
150 | - HUB_HOST=selenium-hub
151 | - HUB_PORT=4444
152 | ```
153 |
154 | ### From the source code
155 |
156 | You can download the source code, then build the docker images
157 |
158 | #### Build
159 |
160 | This will automatically pull, build then setup services
161 |
162 | ```shell
163 | docker-compose up -d
164 | ```
165 |
166 | #### Usage
167 |
168 | ```shell
169 | docker-compose run --rm phoneinfoga --help
170 | ```
171 |
172 | #### Troubleshooting
173 |
174 | All output is sent to stdout so it can be inspected by running:
175 |
176 | ```shell
177 | docker logs -f
178 | ```
179 |
--------------------------------------------------------------------------------
/docs/resources.md:
--------------------------------------------------------------------------------
1 | # Resources
2 |
3 | ### Inderstanding phone numbers
4 |
5 | - [whitepages.fr/phonesystem](http://whitepages.fr/phonesystem/)
6 | - [Formatting-International-Phone-Numbers](https://support.twilio.com/hc/en-us/articles/223183008-Formatting-International-Phone-Numbers)
7 | - [National_conventions_for_writing_telephone_numbers](https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers)
8 |
9 | ### Open data
10 |
11 | - [api.ovh.com/console/#/telephony](https://api.ovh.com/console/#/telephony)
12 | - [countrycode.org](https://countrycode.org/)
13 | - [countryareacode.net](http://www.countryareacode.net/en/)
14 | - [directory.didww.com/area-prefixes](http://directory.didww.com/area-prefixes)
15 | - [numinfo.net](http://www.numinfo.net/)
16 | - [gist.github.com/Goles/3196253](https://gist.github.com/Goles/3196253)
17 |
18 | ## Footprinting
19 |
20 | !!! info
21 | Both free and premium resources are included. Be careful, the listing of a data source here does not mean it has been verified or is used in the tool. Data might be false. Use it as an OSINT framework.
22 |
23 | ### Reputation / fraud
24 |
25 | - scamcallfighters.com
26 | - signal-arnaques.com
27 | - whosenumber.info
28 | - findwhocallsme.com
29 | - yellowpages.ca
30 | - phonenumbers.ie
31 | - who-calledme.com
32 | - usphonesearch.net
33 | - whocalled.us
34 | - quinumero.info
35 |
36 | ### Disposable numbers
37 |
38 | - receive-sms-online.com
39 | - receive-sms-now.com
40 | - hs3x.com
41 | - twilio.com
42 | - freesmsverification.com
43 | - freeonlinephone.org
44 | - sms-receive.net
45 | - smsreceivefree.com
46 | - receive-a-sms.com
47 | - receivefreesms.com
48 | - freephonenum.com
49 | - receive-smss.com
50 | - receivetxt.com
51 | - temp-mails.com
52 | - receive-sms.com
53 | - receivesmsonline.net
54 | - receivefreesms.com
55 | - sms-receive.net
56 | - pinger.com (=> textnow.com)
57 | - receive-a-sms.com
58 | - k7.net
59 | - kall8.com
60 | - faxaway.com
61 | - receivesmsonline.com
62 | - receive-sms-online.info
63 | - sellaite.com
64 | - getfreesmsnumber.com
65 | - smsreceiving.com
66 | - smstibo.com
67 | - catchsms.com
68 | - freesmscode.com
69 | - smsreceiveonline.com
70 | - smslisten.com
71 | - sms.sellaite.com
72 | - smslive.co
73 |
74 | ### Individuals
75 |
76 | - Facebook
77 | - Twitter
78 | - Instagram
79 | - Linkedin
80 | - True People
81 | - Fast People
82 | - Background Check
83 | - Pipl
84 | - Spytox
85 | - Makelia
86 | - IvyCall
87 | - PhoneSearch
88 | - 411
89 | - USPhone
90 | - WP Plus
91 | - Thats Them
92 | - True Caller
93 | - Sync.me
94 | - WhoCallsMe
95 | - ZabaSearch
96 | - DexKnows
97 | - WeLeakInfo
98 | - OK Caller
99 | - SearchBug
100 | - numinfo.net
101 |
102 | ### Google dork examples
103 |
104 | ```
105 | insubject:"+XXXXXXXXX" OR insubject:"+XXXXX" OR insubject:"XXXXX XXX XXX"
106 | insubject:"XXXXXXXXX" OR intitle:"XXXXXXXXX"
107 | intext:"XXXXXXXXX" AND (ext:doc OR ext:docx OR ext:odt OR ext:pdf OR ext:rtf OR ext:sxw OR ext:psw OR ext:ppt OR ext:pptx OR ext:pps OR ext:csv OR ext:txt OR ext:html)
108 | site:"hs3x.com" "+XXXXXXXXX"
109 | site:signal-arnaques.com intext:"XXXXXXXXX" intitle:" | Phone Fraud"
110 | ```
--------------------------------------------------------------------------------
/docs/usage.md:
--------------------------------------------------------------------------------
1 | ```
2 | $ python3 phoneinfoga.py -h
3 | usage: phoneinfoga.py -n [options]
4 |
5 | Advanced information gathering tool for phone numbers
6 | (https://github.com/sundowndev/PhoneInfoga) version v1.6.8
7 |
8 | optional arguments:
9 | -h, --help show this help message and exit
10 | -n number, --number number
11 | The phone number to scan (E164 or international
12 | format)
13 | -i input_file, --input input_file
14 | Phone number list to scan (one per line)
15 | -o output_file, --output output_file
16 | Output to save scan results
17 | -s scanner, --scanner scanner
18 | The scanner to use
19 | --recon Launch custom format reconnaissance
20 | --no-ansi Disable colored output
21 | -v, --version Show tool version
22 | ```
23 |
24 | #### Basic scan
25 |
26 | ```
27 | python3 phoneinfoga.py -n "(+42) 837544833"
28 | ```
29 |
30 | Country code and special chars such as `( ) - +` will be escaped so typing US-based numbers stay easy :
31 |
32 | ```
33 | python3 phoneinfoga.py -n "+1 555-444-3333"
34 | ```
35 |
36 | !!! note "Note that the country code is essential. You don't know which country code to use ? [Find it here](https://www.countrycode.org/)"
37 |
38 | #### Output file
39 |
40 | Check several numbers at once and send results to a file. Optionally, ensure no color code is used with `--no-ansi`
41 |
42 | ```
43 | python3 phoneinfoga.py -i numbers.txt -o results.txt --no-ansi
44 | ```
45 |
46 | Input file must contain one phone number per line. Invalid numbers will be skipped.
47 |
48 | #### Footprinting
49 |
50 | ```
51 | python3 phoneinfoga.py -n +42837544833 -s footprints
52 | ```
53 |
54 | #### Custom format reconnaissance
55 |
56 | You don't know where to search and what custom format to use ? Let the tool try several custom formats based on the country code for you.
57 |
58 | ```
59 | python3 phoneinfoga.py -n +42837544833 -s any --recon
60 | ```
61 |
62 | ## Available scanners
63 |
64 | Use `any` to disable this feature. Default value: `all`
65 |
66 | - numverify
67 | - ovh
68 | - footprints
69 |
70 | **Numverify** provide standard but useful informations such as number's country code, location, line type and carrier.
71 |
72 | **OVH** is, besides being a web and cloud hosting company, a telecom provider with several VoIP numbers in the Europe. Thanks to their API-key free [REST API](https://api.ovh.com/), we are able to tell if a number is owned by OVH Telecom or not.
73 |
74 | **Footprints** scanner uses Google search engine and [Google Dorks](https://en.wikipedia.org/wiki/Google_hacking) to search phone number's footprints everywhere on the web. It allows you to search for scam reports, social media profiles, documents and more.
75 |
76 | ## Examples
77 |
78 | Check for a number range on OVH :
79 |
80 | ```
81 | python3 phoneinfoga.py -n "+33 01 88 33 40 32" -s ovh
82 | ```
83 |
84 | Output :
85 |
86 | ```
87 | [!] ---- Fetching informations for 330188334032 ---- [!]
88 | [*] Running local scan...
89 | [+] International format: +33 1 88 33 40 32
90 | [+] Local format: 188334032
91 | [+] Country found: France (+33)
92 | [+] City/Area: France
93 | [+] Carrier:
94 | [+] Timezone: Europe/Paris
95 | [i] The number is valid and possible.
96 | [*] Running OVH scan...
97 | [+] 1 result found in OVH database
98 | [+] Number range: 018833xxxx
99 | [+] City: Paris
100 | [+] Zip code:
101 | Continue scanning ? (y/N)
102 | [i] Good bye!
103 | ```
--------------------------------------------------------------------------------
/examples/generate.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | {
4 | # command which may fail and give an error
5 | scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
6 | python3 $scriptDir/../phoneinfoga.py -n "+86 591 2284 8571" -h
7 | python3 $scriptDir/../phoneinfoga.py -n "+86 591 2284 8571" -s any --no-ansi
8 | python3 $scriptDir/../phoneinfoga.py -i $scriptDir/input.txt -o $scriptDir/output_from_input.txt -s any
9 | python3 $scriptDir/../phoneinfoga.py -n "+86 591 2284 8571" -s numverify -o $scriptDir/output_single.txt
10 | } || {
11 | # command which should be run instead of the above failing command
12 | echo "Command exited with an error."
13 | exit 1
14 | }
15 |
16 | echo "Test script executed."
--------------------------------------------------------------------------------
/examples/input.txt:
--------------------------------------------------------------------------------
1 | +856 20 99 453 217
2 | +59172768361
3 | +32474123456
4 | +1 (541) 754-3010
5 | +86 591 2284 8571
6 | +7 496 4819375
7 | 39172768361
8 |
--------------------------------------------------------------------------------
/examples/output_from_input.txt:
--------------------------------------------------------------------------------
1 | [!] ---- Fetching informations for 8562099453217 ---- [!]
2 | [*] Running local scan...
3 | [+] International format: +856 20 99 453 217
4 | [+] Local format: 2099453217
5 | [+] Country found: Laos (+856)
6 | [+] City/Area: Laos
7 | [+] Carrier: Unitel
8 | [+] Timezone: Asia/Vientiane
9 | [i] The number is valid and possible.
10 | [i] Scan finished.
11 |
12 | [!] ---- Fetching informations for 59172768361 ---- [!]
13 | [*] Running local scan...
14 | [+] International format: +591 72768361
15 | [+] Local format: 72768361
16 | [+] Country found: Bolivia (+591)
17 | [+] City/Area: Bolivia
18 | [+] Carrier: Entel
19 | [+] Timezone: America/La_Paz
20 | [i] The number is valid and possible.
21 | [i] Scan finished.
22 |
23 | [!] ---- Fetching informations for 32474123456 ---- [!]
24 | [*] Running local scan...
25 | [+] International format: +32 474 12 34 56
26 | [+] Local format: 474123456
27 | [+] Country found: Belgium (+32)
28 | [+] City/Area: Belgium
29 | [+] Carrier: Proximus
30 | [+] Timezone: Europe/Brussels
31 | [i] The number is valid and possible.
32 | [i] Scan finished.
33 |
34 | [!] ---- Fetching informations for 15417543010 ---- [!]
35 | [*] Running local scan...
36 | [+] International format: +1 541-754-3010
37 | [+] Local format: 5417543010
38 | [+] Country found: United States (+1)
39 | [+] City/Area: Corvallis, OR
40 | [+] Carrier:
41 | [+] Timezone: America/Los_Angeles
42 | [i] The number is valid and possible.
43 | [i] Scan finished.
44 |
45 | [!] ---- Fetching informations for 8659122848571 ---- [!]
46 | [*] Running local scan...
47 | [+] International format: +86 591 2284 8571
48 | [+] Local format: 59122848571
49 | [+] Country found: China (+86)
50 | [+] City/Area: Fuzhou, Fujian
51 | [+] Carrier:
52 | [+] Timezone: Asia/Shanghai
53 | [i] The number is valid and possible.
54 | [i] Scan finished.
55 |
56 | [!] ---- Fetching informations for 74964819375 ---- [!]
57 | [*] Running local scan...
58 | [+] International format: +7 496 481-93-75
59 | [+] Local format: 4964819375
60 | [+] Country found: Russia (+7)
61 | [+] City/Area: Moscow
62 | [+] Carrier:
63 | [+] Timezone: Europe/Moscow
64 | [i] The number is valid and possible.
65 | [i] Scan finished.
66 |
67 | [!] ---- Fetching informations for 39172768361 ---- [!]
68 | [*] Running local scan...
69 | [!] Error: an error occured parsing 39172768361. Skipping.
70 |
--------------------------------------------------------------------------------
/examples/output_single.txt:
--------------------------------------------------------------------------------
1 | [!] ---- Fetching informations for 8659122848571 ---- [!]
2 | [*] Running local scan...
3 | [+] International format: +86 591 2284 8571
4 | [+] Local format: 59122848571
5 | [+] Country found: China (+86)
6 | [+] City/Area: Fuzhou, Fujian
7 | [+] Carrier:
8 | [+] Timezone: Asia/Shanghai
9 | [i] The number is valid and possible.
10 | [*] Running Numverify.com scan...
11 | [+] Number: (+86) 059122848571
12 | [+] Country: China (People's Republic of) (CN)
13 | [+] Location: Fuzhou
14 | [+] Carrier:
15 | [+] Line type: landline
16 | (!) This is most likely a landline, but it can still be a fixed VoIP number.
17 | [i] Scan finished.
18 |
19 |
--------------------------------------------------------------------------------
/lib/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dont-Copy-That-Floppy/pyPhoneInfoga/6ee50113ce63415e95fb917f1100f2e18f4b63d5/lib/__init__.py
--------------------------------------------------------------------------------
/lib/args.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import argparse
9 | from lib.banner import __version__
10 |
11 | parser = argparse.ArgumentParser(
12 | description="Advanced information gathering tool for phone numbers (https://github.com/sundowndev/PhoneInfoga) version {}".format(
13 | __version__
14 | ),
15 | usage="%(prog)s -n [options]",
16 | )
17 |
18 | parser.add_argument(
19 | "-n",
20 | "--number",
21 | metavar="number",
22 | type=str,
23 | help="The phone number to scan (E164 or international format)",
24 | )
25 |
26 | parser.add_argument(
27 | "-i",
28 | "--input",
29 | metavar="input_file",
30 | type=argparse.FileType("r"),
31 | help="Phone number list to scan (one per line)",
32 | )
33 |
34 | parser.add_argument(
35 | "-o",
36 | "--output",
37 | metavar="output_file",
38 | type=argparse.FileType("w"),
39 | help="Output to save scan results",
40 | )
41 |
42 | parser.add_argument(
43 | "-s",
44 | "--scanner",
45 | metavar="scanner",
46 | default="all",
47 | type=str,
48 | help="The scanner to use",
49 | )
50 |
51 | parser.add_argument(
52 | "--recon", action="store_true", help="Launch custom format reconnaissance"
53 | )
54 |
55 | parser.add_argument("--no-ansi", action="store_true", help="Disable colored output")
56 |
57 | parser.add_argument("-v", "--version", action="store_true", help="Show tool version")
58 |
59 | args = parser.parse_args()
60 |
--------------------------------------------------------------------------------
/lib/banner.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | __version__ = "v1.10.12"
9 |
10 |
11 | def banner():
12 | print(" ___ _ _____ __ ")
13 | print(" / _ \ |__ ___ _ __ ___ \_ \_ __ / _| ___ __ _ __ _ ")
14 | print(" / /_)/ '_ \ / _ \| '_ \ / _ \ / /\/ '_ \| |_ / _ \ / _` |/ _` |")
15 | print(" / ___/| | | | (_) | | | | __/\/ /_ | | | | _| (_) | (_| | (_| |")
16 | print(" \/ |_| |_|\___/|_| |_|\___\____/ |_| |_|_| \___/ \__, |\__,_|")
17 | print(" |___/ ")
18 | print(" PhoneInfoga Ver. {}".format(__version__))
19 | print(" Coded by Sundowndev")
20 | print("\n")
21 |
--------------------------------------------------------------------------------
/lib/chromedriver:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dont-Copy-That-Floppy/pyPhoneInfoga/6ee50113ce63415e95fb917f1100f2e18f4b63d5/lib/chromedriver
--------------------------------------------------------------------------------
/lib/chromedriver.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dont-Copy-That-Floppy/pyPhoneInfoga/6ee50113ce63415e95fb917f1100f2e18f4b63d5/lib/chromedriver.exe
--------------------------------------------------------------------------------
/lib/colors.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import sys
9 | import colorama
10 |
11 | if sys.platform == "win32":
12 | colorama.init()
13 |
14 | R = "\033[%s;31m"
15 | B = "\033[%s;34m"
16 | G = "\033[%s;32m"
17 | W = "\033[%s;38m"
18 | Y = "\033[%s;33m"
19 | E = "\033[0m"
20 | BOLD = "\033[1m"
21 |
--------------------------------------------------------------------------------
/lib/format.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import re
9 |
10 |
11 | def formatNumber(InputNumber):
12 | return re.sub("(?:\+)?(?:[^[0-9]*)", "", InputNumber)
13 |
14 |
15 | def replaceVariables(string, number):
16 | string = string.replace("$n", number["default"])
17 | string = string.replace("$i", number["international"])
18 | string = string.replace(
19 | "$l", number["international"].replace("%s " % (number["countryCode"]), "")
20 | )
21 |
22 | return string
23 |
--------------------------------------------------------------------------------
/lib/googlesearch.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import os
9 | import re
10 | import json
11 | from urllib.parse import urlencode
12 | from bs4 import BeautifulSoup
13 | from lib.output import *
14 | from lib.request import send
15 | from config import *
16 | import sys
17 | from selenium import webdriver
18 | from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
19 |
20 |
21 | def getBrowser(browser_path=""):
22 | if os.environ.get("webdriverRemote"):
23 | return webdriver.Remote(
24 | os.environ.get("webdriverRemote"),
25 | webdriver.DesiredCapabilities.FIREFOX.copy(),
26 | )
27 |
28 | if browser_path == "":
29 | options = webdriver.ChromeOptions()
30 | # options.add_argument("headless")
31 | options.add_argument('--ignore-certificate-errors')
32 | options.add_argument("--test-type")
33 |
34 | # Disable Chrome's PDF Viewer
35 | profile = {"plugins.plugins_list": [{"enabled": False, "name": "Chrome PDF Viewer"}],
36 | "download.default_directory": './', "download.extensions_to_open": "applications/pdf"}
37 | options.add_experimental_option("prefs", profile)
38 | if(sys.platform == 'win32'):
39 | return webdriver.Chrome(chrome_options=options, executable_path="lib/chromedriver.exe")
40 | else:
41 | return webdriver.Chrome(chrome_options=options, executable_path="lib/chromedriver")
42 | else:
43 | binary = FirefoxBinary(browser_path)
44 | return webdriver.Firefox(firefox_binary=binary)
45 |
46 |
47 | def closeBrowser():
48 | if browser is not None:
49 | browser.quit()
50 |
51 |
52 | def search(req, stop):
53 | if google_api_key and google_cx_id:
54 | return searchApi(req, stop)
55 |
56 | try:
57 | REQ = urlencode({"q": req, "num": stop, "hl": "en"})
58 | URL = "https://www.google.com/search?tbs=li:1&{}&gws_rd=ssl&gl=us".format(
59 | REQ
60 | )
61 | browser.get(URL)
62 | htmlBody = browser.find_element_by_css_selector("body").get_attribute(
63 | "innerHTML"
64 | )
65 |
66 | soup = BeautifulSoup(htmlBody, "html5lib")
67 |
68 | while soup.find("div", id="recaptcha") is not None:
69 | warn(
70 | "You are temporary blacklisted from Google search. Complete the captcha then press ENTER."
71 | )
72 | token = ask(">")
73 | htmlBody = browser.find_element_by_css_selector("body").get_attribute(
74 | "innerHTML"
75 | )
76 | soup = BeautifulSoup(htmlBody, "html5lib")
77 |
78 | results = soup.find("div", id="search").find_all("div", class_="g")
79 |
80 | links = []
81 |
82 | for result in results:
83 | url = result.find("a").get("href")
84 | url = re.sub(r"(?:\/url\?q\=)", "", url)
85 | url = re.sub(r"(?:\/url\?url\=)", "", url)
86 | url = re.sub(r"(?:\&sa\=)(?:.*)", "", url)
87 | url = re.sub(r"(?:\&rct\=)(?:.*)", "", url)
88 |
89 | if re.match(r"^(?:\/search\?q\=)", url) is not None:
90 | url = "https://google.com" + url
91 |
92 | if url is not None:
93 | links.append(url)
94 |
95 | return links
96 | except Exception as e:
97 | error(
98 | "Request failed. Please retry or open an issue on https://github.com/Dont-Copy-That-Floppy/pyPhoneInfoga."
99 | )
100 | print(e)
101 | return []
102 |
103 |
104 | def searchApi(req, stop):
105 | options = urlencode(
106 | {"q": req, "key": google_api_key, "cx": google_cx_id, "num": stop}
107 | )
108 | r = send("GET", "https://www.googleapis.com/customsearch/v1?%s" % (options))
109 | response = r.json()
110 |
111 | if "error" in response:
112 | error(
113 | "Error while fetching Google search API. Maybe usage limit ? Please verify your keys."
114 | )
115 | print(response["error"])
116 | askForExit()
117 | return []
118 |
119 | if "items" not in response:
120 | return []
121 |
122 | results = response["items"]
123 |
124 | links = []
125 |
126 | for result in results:
127 | if result["link"] is not None:
128 | links.append(result["link"])
129 |
130 | return links
131 |
132 |
133 | browser = getBrowser()
134 |
--------------------------------------------------------------------------------
/lib/logger.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import sys
9 | from lib.args import args
10 |
11 |
12 | class Logger(object):
13 | def __init__(self):
14 | self.terminal = sys.stdout
15 | self.log = open(args.output.name, "a")
16 |
17 | def write(self, message):
18 | self.terminal.write(message)
19 | self.log.write(message)
20 |
21 | def flush(self):
22 | # this flush method is needed for python 3 compatibility.
23 | # this handles the flush command by doing nothing.
24 | # you might want to specify some extra behavior here.
25 | pass
26 |
--------------------------------------------------------------------------------
/lib/output.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import sys
9 | import json
10 | from lib.colors import *
11 | from lib.args import args
12 | from lib.logger import Logger
13 |
14 |
15 | def plus(string):
16 | if not args.no_ansi and not args.output:
17 | print("%s[+] %s%s" % (G % 0, string, E))
18 | else:
19 | print("[+] %s" % (string))
20 |
21 |
22 | def warn(string):
23 | if not args.no_ansi and not args.output:
24 | print("%s(!) %s%s" % (Y % 0, string, E))
25 | else:
26 | print("(!) %s" % (string))
27 |
28 |
29 | def error(string):
30 | if not args.no_ansi and not args.output:
31 | print("%s[!]%s %s%s" % (R % 0, E, string, E))
32 | else:
33 | print("[!] %s" % (string))
34 |
35 |
36 | def test(string):
37 | if not args.no_ansi and not args.output:
38 | print("%s[*] %s%s" % (B % 0, string, E))
39 | else:
40 | print("[*] %s" % (string))
41 |
42 |
43 | def info(string):
44 | if not args.no_ansi and not args.output:
45 | print("%s[i] %s%s" % (E, string, E))
46 | else:
47 | print("[i] %s" % (string))
48 |
49 |
50 | def more(string):
51 | if not args.no_ansi and not args.output:
52 | print(" %s|%s %s%s" % (W % 0, string, E))
53 | else:
54 | print(" | %s" % (string))
55 |
56 |
57 | def title(string):
58 | if not args.no_ansi and not args.output:
59 | print("%s%s%s%s" % (BOLD, Y % 0, string, E))
60 | else:
61 | print("%s" % (string))
62 |
63 |
64 | def throw(string):
65 | error(string)
66 | sys.exit()
67 |
68 |
69 | def askForExit():
70 | if not args.output:
71 | user_input = ask("Continue scanning ? (y/N) ")
72 |
73 | if user_input.lower() == "y" or user_input.lower() == "yes":
74 | return -1
75 | else:
76 | info("Good bye!")
77 | sys.exit()
78 |
79 |
80 | def ask(text):
81 | if args.output:
82 | sys.stdout = sys.__stdout__
83 | res = input(text)
84 | sys.stdout = Logger()
85 |
86 | return res
87 | else:
88 | return input(text)
89 |
--------------------------------------------------------------------------------
/lib/request.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import requests
9 | import json
10 | import random
11 |
12 | uagent = []
13 | uagent.append(
14 | "Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0"
15 | )
16 | uagent.append(
17 | "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.9 Safari/537.36"
18 | )
19 | uagent.append(
20 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.52"
21 | )
22 | uagent.append(
23 | "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
24 | )
25 | uagent.append(
26 | "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27"
27 | )
28 | uagent.append(
29 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063"
30 | )
31 | uagent.append(
32 | "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
33 | )
34 |
35 | # Request SSL DH key error workaround
36 | # See https://github.com/sundowndev/PhoneInfoga/issues/16
37 | requests.packages.urllib3.disable_warnings()
38 | requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS += "HIGH:!DH:!aNULL"
39 | try:
40 | requests.packages.urllib3.contrib.pyopenssl.DEFAULT_SSL_CIPHER_LIST += (
41 | "HIGH:!DH:!aNULL"
42 | )
43 | except AttributeError:
44 | # no pyopenssl support used / needed / available
45 | pass
46 |
47 |
48 | def send(method, url, headers={}):
49 | if not headers:
50 | headers = {}
51 | headers["User-Agent"] = random.choice(uagent)
52 |
53 | return requests.request(method, url, data="", headers=headers)
54 |
--------------------------------------------------------------------------------
/osint/disposable_num_providers.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "site": "hs3x.com",
4 | "request": "site:\"hs3x.com\" \"+$n\"",
5 | "stop": 1
6 | },
7 | {
8 | "site": "receive-sms-now.com",
9 | "request": "site:\"receive-sms-now.com\" \"$n\"",
10 | "stop": 1
11 | },
12 | {
13 | "site": "smslisten.com",
14 | "request": "site:\"smslisten.com\" \"$n\"",
15 | "stop": 1
16 | },
17 | {
18 | "site": "smsnumbersonline.com",
19 | "request": "site:\"smsnumbersonline.com\" \"+$n\"",
20 | "stop": 1
21 | },
22 | {
23 | "site": "freesmscode.com",
24 | "request": "site:\"freesmscode.com\" \"+$n\"",
25 | "stop": 1
26 | },
27 | {
28 | "site": "catchsms.com",
29 | "request": "site:\"catchsms.com\" \"+$n\"",
30 | "stop": 1
31 | },
32 | {
33 | "site": "smstibo.com",
34 | "request": "site:\"smstibo.com\" \"+$n\"",
35 | "stop": 1
36 | },
37 | {
38 | "site": "smsreceiving.com",
39 | "request": "site:\"smsreceiving.com\" \"+$n\"",
40 | "stop": 1
41 | },
42 | {
43 | "site": "getfreesmsnumber.com",
44 | "request": "site:\"getfreesmsnumber.com\" \"+$n\"",
45 | "stop": 1
46 | },
47 | {
48 | "site": "sellaite.com",
49 | "request": "site:\"sellaite.com\" \"+$n\"",
50 | "stop": 1
51 | },
52 | {
53 | "site": "receive-sms-online.info",
54 | "request": "site:\"receive-sms-online.info\" \"+$n\"",
55 | "stop": 1
56 | },
57 | {
58 | "site": "receivesmsonline.com",
59 | "request": "site:\"receivesmsonline.com\" \"+$n\"",
60 | "stop": 1
61 | },
62 | {
63 | "site": "receive-a-sms.com",
64 | "request": "site:\"receive-a-sms.com\" \"+$n\"",
65 | "stop": 1
66 | },
67 | {
68 | "site": "sms-receive.net",
69 | "request": "site:\"sms-receive.net\" \"+$n\"",
70 | "stop": 1
71 | },
72 | {
73 | "site": "receivefreesms.com",
74 | "request": "site:\"receivefreesms.com\" \"+$n\"",
75 | "stop": 1
76 | },
77 | {
78 | "site": "receive-sms.com",
79 | "request": "site:\"receive-sms.com\" \"+$n\"",
80 | "stop": 1
81 | },
82 | {
83 | "site": "receivetxt.com",
84 | "request": "site:\"receivetxt.com\" $n",
85 | "stop": 1
86 | },
87 | {
88 | "site": "freephonenum.com",
89 | "request": "site:\"freephonenum.com\" \"$n\"",
90 | "stop": 1
91 | },
92 | {
93 | "site": "freesmsverification.com",
94 | "request": "site:\"freesmsverification.com\" $n",
95 | "stop": 1
96 | },
97 | {
98 | "site": "receive-sms-online.com",
99 | "request": "site:\"receive-sms-online.com\" \"$n\"",
100 | "stop": 1
101 | },
102 | {
103 | "site": "smslive.co",
104 | "request": "site:\"smslive.co\" \"$n\"",
105 | "stop": 1
106 | }
107 | ]
108 |
--------------------------------------------------------------------------------
/osint/individuals.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "site": "numinfo.net",
4 | "request": "site:\"numinfo.net\" \"$i\" OR \"$n\" OR \"$l\"",
5 | "dialCode": null,
6 | "stop": 2
7 | },
8 | {
9 | "site": "sync.me",
10 | "request": "site:\"sync.me\" \"$i\" OR \"$n\" OR \"$l\"",
11 | "dialCode": null,
12 | "stop": 1
13 | },
14 | {
15 | "site": "whocallsyou.de",
16 | "request": "site:\"whocallsyou.de\" \"0$l\"",
17 | "dialCode": null,
18 | "stop": 1
19 | },
20 | {
21 | "site": "pastebin.com",
22 | "request": "site:\"pastebin.com\" \"$i\" OR \"$n\" OR \"$l\"",
23 | "dialCode": null,
24 | "stop": 5
25 | },
26 | {
27 | "site": "whycall.me",
28 | "request": "site:\"whycall.me\" \"$i\" OR \"$n\" OR \"$l\"",
29 | "dialCode": null,
30 | "stop": 1
31 | },
32 | {
33 | "site": "locatefamily.com",
34 | "request": "site:locatefamily.com \"$i\" OR \"$n\" OR \"$l\"",
35 | "dialCode": null,
36 | "stop": 1
37 | },
38 | {
39 | "site": "spytox.com",
40 | "request": "site:spytox.com $l",
41 | "dialCode": "+1",
42 | "stop": 1
43 | }
44 | ]
45 |
--------------------------------------------------------------------------------
/osint/reputation.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "title": "reputation report on whosenumber.info",
4 | "request": "site:whosenumber.info \"$n\" intitle:\"who called\"",
5 | "stop": 1
6 | },
7 | {
8 | "title": "phone fraud footprints",
9 | "request": "intitle:\"Phone Fraud\" \"$i\" OR \"$n\" OR \"$l\"",
10 | "stop": 5
11 | },
12 | {
13 | "title": "reputation report on findwhocallsme.com",
14 | "request": "site:findwhocallsme.com \"$n\" OR \"$i\"",
15 | "stop": 1
16 | },
17 | {
18 | "title": "reputation report on yellowpages.ca",
19 | "request": "site:yellowpages.ca \"$n\"",
20 | "stop": 1
21 | },
22 | {
23 | "title": "reputation report on phonenumbers.ie",
24 | "request": "site:phonenumbers.ie \"$n\"",
25 | "stop": 1
26 | },
27 | {
28 | "title": "reputation report on who-calledme.com",
29 | "request": "site:who-calledme.com \"$n\"",
30 | "stop": 1
31 | },
32 | {
33 | "title": "reputation report on usphonesearch.net",
34 | "request": "site:usphonesearch.net for $l",
35 | "stop": 1
36 | },
37 | {
38 | "title": "reputation report on whocalled.us",
39 | "request": "site:whocalled.us inurl:\"$l\"",
40 | "stop": 1
41 | },
42 | {
43 | "title": "reputation report on quinumero.info",
44 | "request": "site:quinumero.info \"$l\" OR \"$i\"",
45 | "stop": 1
46 | },
47 | {
48 | "title": "reputation report on uk.popularphotolook.com",
49 | "request": "site:uk.popularphotolook.com inurl:\"$l\"",
50 | "stop": 1
51 | }
52 | ]
53 |
--------------------------------------------------------------------------------
/osint/social_medias.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "site": "facebook.com",
4 | "request": "site:\"facebook.com\" \"$i\" OR \"$n\" OR \"$l\"",
5 | "stop": 5
6 | },
7 | {
8 | "site": "twitter.com",
9 | "request": "site:\"twitter.com\" \"$i\" OR \"$n\" OR \"$l\"",
10 | "stop": 5
11 | },
12 | {
13 | "site": "linkedin.com",
14 | "request": "site:\"linkedin.com\" \"$i\" OR \"$n\" OR \"$l\"",
15 | "stop": 5
16 | },
17 | {
18 | "site": "instagram.com",
19 | "request": "site:\"instagram.com\" \"$i\" OR \"$n\" OR \"$l\"",
20 | "stop": 5
21 | }
22 | ]
23 |
--------------------------------------------------------------------------------
/phoneinfoga.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | # dependencies
9 | import sys
10 | import signal
11 | # lib
12 | from lib.args import args, parser
13 | from lib.banner import banner, __version__
14 | from lib.output import *
15 | from lib.format import *
16 | from lib.logger import Logger
17 | from lib.googlesearch import closeBrowser
18 | # scanners
19 | from scanners import numverify
20 | from scanners import localscan
21 | from scanners import ovh
22 | from scanners.footprints import osintScan
23 | from scanners import recon
24 | from pathlib import Path
25 |
26 | configFile = Path(sys.path[0] + "/config.py")
27 |
28 |
29 | def scanNumber(InputNumber):
30 | title("[!] ---- Fetching informations for {} ---- [!]".format(formatNumber(InputNumber)))
31 | number = localscan.scan(InputNumber)
32 |
33 | if not number:
34 | throw(("Error: an error occured parsing {}. Skipping.".format(
35 | formatNumber(InputNumber))))
36 |
37 | numverify.scan(number['default'])
38 | ovh.scan(number['local'], number['countryIsoCode'])
39 | recon.scan(number)
40 | osintScan(number)
41 | info("Scan finished.\n")
42 |
43 |
44 | def main():
45 | scanners = ['any', 'all', 'numverify', 'ovh', 'footprints']
46 | banner()
47 |
48 | # Ensure the usage of Python3
49 | if sys.version_info[0] < 3:
50 | print("(!) Please run the tool using Python 3")
51 | sys.exit()
52 |
53 | # If any param is passed, execute help command
54 | if not len(sys.argv) > 1:
55 | parser.print_help()
56 | sys.exit()
57 | elif args.version:
58 | print("Version {}".format(__version__))
59 | sys.exit()
60 |
61 | if not configFile.is_file():
62 | error("The config file does not exist. Please create it.")
63 | sys.exit()
64 |
65 | if args.output:
66 | sys.stdout = Logger()
67 |
68 | # Verify scanner option
69 | if not args.scanner in scanners:
70 | print(("Error: scanner doesn't exist."))
71 | sys.exit()
72 |
73 | if args.number:
74 | scanNumber(args.number)
75 | elif args.input:
76 | for line in args.input.readlines():
77 | scanNumber(line)
78 | else:
79 | parser.print_help()
80 | sys.exit()
81 |
82 | if args.output:
83 | args.output.close()
84 |
85 | closeBrowser()
86 |
87 |
88 | def signal_handler(signal, frame):
89 | print('\n[-] You pressed Ctrl+C! Exiting.')
90 | closeBrowser()
91 | sys.exit()
92 |
93 |
94 | if __name__ == '__main__':
95 | signal.signal(signal.SIGINT, signal_handler)
96 | main()
97 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | phonenumbers
2 | colorama
3 | requests
4 | selenium
5 | beautifulsoup4
6 | html5lib
7 | config
8 |
--------------------------------------------------------------------------------
/scanners/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dont-Copy-That-Floppy/pyPhoneInfoga/6ee50113ce63415e95fb917f1100f2e18f4b63d5/scanners/__init__.py
--------------------------------------------------------------------------------
/scanners/footprints.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | from urllib.parse import urlencode
9 | from lib.output import *
10 | from lib.format import *
11 | from lib.request import send
12 | from lib.googlesearch import search
13 |
14 | numberObj = {}
15 | number = ""
16 | localNumber = ""
17 | internationalNumber = ""
18 | numberCountryCode = ""
19 | customFormatting = ""
20 |
21 |
22 | def osintIndividualScan():
23 | global numberObj
24 | global number
25 | global internationalNumber
26 | global numberCountryCode
27 | global customFormatting
28 |
29 | info("---- Phone books footprints ----")
30 |
31 | if numberCountryCode == "+1":
32 | info("Generating URL on True People... ")
33 | plus(
34 | "https://www.truepeoplesearch.com/results?phoneno={}".format(
35 | internationalNumber.replace(" ", "")
36 | )
37 | )
38 |
39 | dorks = json.load(open("osint/individuals.json"))
40 |
41 | for dork in dorks:
42 | if dork["dialCode"] is None or dork["dialCode"] == numberCountryCode:
43 | if customFormatting:
44 | dorkRequest = replaceVariables(
45 | dork["request"], numberObj
46 | ) + ' OR "{}"'.format(customFormatting)
47 | else:
48 | dorkRequest = replaceVariables(dork["request"], numberObj)
49 |
50 | info("Searching for footprints on {}...".format(dork["site"]))
51 |
52 | for result in search(dorkRequest, stop=dork["stop"]):
53 | plus("URL: " + result)
54 | else:
55 | return -1
56 |
57 |
58 | def osintReputationScan():
59 | global numberObj
60 | global number
61 | global internationalNumber
62 | global customFormatting
63 |
64 | info("---- Reputation footprints ----")
65 |
66 | dorks = json.load(open("osint/reputation.json"))
67 |
68 | for dork in dorks:
69 | if customFormatting:
70 | dorkRequest = replaceVariables(
71 | dork["request"], numberObj
72 | ) + ' OR "{}"'.format(customFormatting)
73 | else:
74 | dorkRequest = replaceVariables(dork["request"], numberObj)
75 |
76 | info("Searching for {}...".format(dork["title"]))
77 | for result in search(dorkRequest, stop=dork["stop"]):
78 | plus("URL: " + result)
79 |
80 |
81 | def osintSocialMediaScan():
82 | global numberObj
83 | global number
84 | global internationalNumber
85 | global customFormatting
86 |
87 | info("---- Social media footprints ----")
88 |
89 | dorks = json.load(open("osint/social_medias.json"))
90 |
91 | for dork in dorks:
92 | if customFormatting:
93 | dorkRequest = replaceVariables(
94 | dork["request"], numberObj
95 | ) + ' OR "{}"'.format(customFormatting)
96 | else:
97 | dorkRequest = replaceVariables(dork["request"], numberObj)
98 |
99 | info("Searching for footprints on {}...".format(dork["site"]))
100 |
101 | for result in search(dorkRequest, stop=dork["stop"]):
102 | plus("URL: " + result)
103 |
104 |
105 | def osintDisposableNumScan():
106 | global numberObj
107 | global number
108 |
109 | info("---- Temporary number providers footprints ----")
110 |
111 | try:
112 | info("Searching for phone number on tempophone.com...")
113 | response = send("GET", "https://tempophone.com/api/v1/phones")
114 | data = json.loads(response.content.decode("utf-8"))
115 | for voip_number in data["objects"]:
116 | if voip_number["phone"] == formatNumber(number):
117 | plus("Found a temporary number provider: tempophone.com")
118 | askForExit()
119 | except Exception as e:
120 | error("Unable to reach tempophone.com API. Skipping.")
121 |
122 | dorks = json.load(open("osint/disposable_num_providers.json"))
123 |
124 | for dork in dorks:
125 | dorkRequest = replaceVariables(dork["request"], numberObj)
126 |
127 | info("Searching for footprints on {}...".format(dork["site"]))
128 |
129 | for result in search(dorkRequest, stop=dork["stop"]):
130 | plus("Result found: {}".format(dork["site"]))
131 | plus("URL: " + result)
132 | askForExit()
133 |
134 |
135 | def osintScan(numberObject, rerun=False):
136 | if not args.scanner == "footprints" and not args.scanner == "all":
137 | return -1
138 |
139 | global numberObj
140 | global number
141 | global localNumber
142 | global internationalNumber
143 | global numberCountryCode
144 | global customFormatting
145 |
146 | numberObj = numberObject
147 | number = numberObj["default"]
148 | localNumber = numberObj["local"]
149 | internationalNumber = numberObj["international"]
150 | numberCountryCode = numberObj["countryCode"]
151 |
152 | test("Running OSINT footprint reconnaissance...")
153 |
154 | if not rerun:
155 | # Whitepages
156 | info("Generating scan URL on 411.com...")
157 | plus(
158 | "Scan URL: https://www.411.com/phone/{}".format(
159 | internationalNumber.replace("+", "").replace(" ", "-")
160 | )
161 | )
162 |
163 | askingCustomPayload = ask(
164 | "Would you like to use an additional format for this number ? (y/N) "
165 | )
166 |
167 | if rerun or askingCustomPayload == "y" or askingCustomPayload == "yes":
168 | info(
169 | "We recommand: {} or {}".format(
170 | internationalNumber,
171 | internationalNumber.replace(numberCountryCode + " ", ""),
172 | )
173 | )
174 | customFormatting = ask("Custom format: ")
175 |
176 | info("---- Web pages footprints ----")
177 |
178 | info("Searching for footprints on web pages... (limit=10)")
179 | if customFormatting:
180 | req = '{} OR "{}" OR "{}" OR "{}"'.format(
181 | number, number, internationalNumber, customFormatting
182 | )
183 | else:
184 | req = '{} OR "{}" OR "{}"'.format(number, number, internationalNumber)
185 |
186 | for result in search(req, stop=10):
187 | try:
188 | plus("Result found: " + result)
189 | except Exception as e:
190 | error(e)
191 |
192 | # Documents
193 | info("Searching for documents... (limit=10)")
194 | if customFormatting:
195 | req = '(ext:doc OR ext:docx OR ext:odt OR ext:pdf OR ext:rtf OR ext:sxw OR ext:psw OR ext:ppt OR ext:pptx OR ext:pps OR ext:csv OR ext:txt OR ext:xls) AND ("{}")'.format(
196 | customFormatting
197 | )
198 | else:
199 | req = '(ext:doc OR ext:docx OR ext:odt OR ext:pdf OR ext:rtf OR ext:sxw OR ext:psw OR ext:ppt OR ext:pptx OR ext:pps OR ext:csv OR ext:txt OR ext:xls) AND ("{}" OR "{}")'.format(
200 | internationalNumber, localNumber
201 | )
202 | for result in search(req, stop=10):
203 | plus("Result found: " + result)
204 |
205 | osintReputationScan()
206 |
207 | info("Generating URL on scamcallfighters.com...")
208 | plus("http://www.scamcallfighters.com/search-phone-{}.html".format(number))
209 |
210 | tmpNumAsk = ask(
211 | "Would you like to search for temporary number providers footprints ? (Y/n) "
212 | )
213 |
214 | if tmpNumAsk.lower() != "n" and tmpNumAsk.lower() != "no":
215 | osintDisposableNumScan()
216 |
217 | osintSocialMediaScan()
218 |
219 | osintIndividualScan()
220 |
221 | retry_input = ask(
222 | "Would you like to rerun OSINT scan ? (e.g to use a different format) (y/N) "
223 | )
224 |
225 | if retry_input.lower() == "y" or retry_input.lower() == "yes":
226 | osintScan(numberObj, True)
227 | else:
228 | return -1
229 |
--------------------------------------------------------------------------------
/scanners/localscan.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import phonenumbers
9 | from phonenumbers import carrier
10 | from phonenumbers import geocoder
11 | from phonenumbers import timezone
12 | from lib.output import *
13 | from lib.format import *
14 |
15 |
16 | def scan(InputNumber, print_results=True):
17 | test("Running local scan...")
18 |
19 | FormattedPhoneNumber = "+" + formatNumber(InputNumber)
20 |
21 | try:
22 | PhoneNumberObject = phonenumbers.parse(FormattedPhoneNumber, None)
23 | except Exception as e:
24 | throw(e)
25 | else:
26 | if not phonenumbers.is_valid_number(PhoneNumberObject):
27 | return False
28 |
29 | number = phonenumbers.format_number(
30 | PhoneNumberObject, phonenumbers.PhoneNumberFormat.E164
31 | ).replace("+", "")
32 | numberCountryCode = phonenumbers.format_number(
33 | PhoneNumberObject, phonenumbers.PhoneNumberFormat.INTERNATIONAL
34 | ).split(" ")[0]
35 | numberCountry = phonenumbers.region_code_for_country_code(
36 | int(numberCountryCode)
37 | )
38 |
39 | localNumber = phonenumbers.format_number(
40 | PhoneNumberObject, phonenumbers.PhoneNumberFormat.E164
41 | ).replace(numberCountryCode, "")
42 | internationalNumber = phonenumbers.format_number(
43 | PhoneNumberObject, phonenumbers.PhoneNumberFormat.INTERNATIONAL
44 | )
45 |
46 | country = geocoder.country_name_for_number(PhoneNumberObject, "en")
47 | location = geocoder.description_for_number(PhoneNumberObject, "en")
48 | carrierName = carrier.name_for_number(PhoneNumberObject, "en")
49 |
50 | if print_results:
51 | plus("International format: {}".format(internationalNumber))
52 | plus("Local format: {}".format(localNumber))
53 | plus("Country found: {} ({})".format(country, numberCountryCode))
54 | plus("City/Area: {}".format(location))
55 | plus("Carrier: {}".format(carrierName))
56 | for timezoneResult in timezone.time_zones_for_number(PhoneNumberObject):
57 | plus("Timezone: {}".format(timezoneResult))
58 |
59 | if phonenumbers.is_possible_number(PhoneNumberObject):
60 | info("The number is valid and possible.")
61 | else:
62 | warn("The number is valid but might not be possible.")
63 |
64 | numberObj = {}
65 | numberObj["input"] = InputNumber
66 | numberObj["default"] = number
67 | numberObj["local"] = localNumber
68 | numberObj["international"] = internationalNumber
69 | numberObj["country"] = country
70 | numberObj["countryCode"] = numberCountryCode
71 | numberObj["countryIsoCode"] = numberCountry
72 | numberObj["location"] = location
73 | numberObj["carrier"] = carrierName
74 |
75 | return numberObj
76 |
--------------------------------------------------------------------------------
/scanners/numverify.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | from bs4 import BeautifulSoup
9 | import hashlib
10 | import json
11 | from lib.output import *
12 | from lib.request import send
13 |
14 |
15 | def scan(number):
16 | if not args.scanner == "numverify" and not args.scanner == "all":
17 | return -1
18 |
19 | test("Running Numverify.com scan...")
20 |
21 | try:
22 | requestSecret = ""
23 | res = send("GET", "https://numverify.com/")
24 | soup = BeautifulSoup(res.text, "html5lib")
25 | except Exception as e:
26 | error("Numverify.com is not available")
27 | error(e)
28 | return -1
29 |
30 | for tag in soup.find_all("input", type="hidden"):
31 | if tag["name"] == "scl_request_secret":
32 | requestSecret = tag["value"]
33 | break
34 |
35 | apiKey = hashlib.md5((number + requestSecret).encode("utf-8")).hexdigest()
36 |
37 | headers = {
38 | # "Host": "numverify.com",
39 | "Accept": "application/json, text/javascript, */*; q=0.01",
40 | "Accept-Language": "fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3",
41 | "Accept-Encoding": "gzip, deflate, br",
42 | # "Referer": "https://numverify.com/",
43 | # "X-Requested-With": "XMLHttpRequest",
44 | "DNT": "1",
45 | "Connection": "keep-alive",
46 | "Pragma": "no-cache",
47 | "Cache-Control": "no-cache",
48 | }
49 |
50 | try:
51 | res = send(
52 | "GET",
53 | "https://numverify.com/php_helper_scripts/phone_api.php?secret_key={}&number={}".format(
54 | apiKey, number
55 | ),
56 | headers=headers,
57 | )
58 |
59 | data = json.loads(res.content.decode("utf-8"))
60 | except Exception as e:
61 | error("Numverify.com is not available")
62 | return -1
63 |
64 | if res.content == "Unauthorized" or res.status_code != 200:
65 | error(
66 | (
67 | "An error occured while calling the API (bad request or wrong api key)."
68 | )
69 | )
70 | return -1
71 |
72 | if "error" in data:
73 | error("Numverify.com is not available: " + data["error"])
74 | return -1
75 |
76 | if data["valid"] == False:
77 | error(("Error: Please specify a valid phone number. Example: +6464806649"))
78 | sys.exit()
79 |
80 | InternationalNumber = "({}){}".format(
81 | data["country_prefix"], data["local_format"]
82 | )
83 |
84 | plus(("Number: ({}) {}").format(
85 | data["country_prefix"], data["local_format"]))
86 | plus(("Country: {} ({})").format(
87 | data["country_name"], data["country_code"]))
88 | plus(("Location: {}").format(data["location"]))
89 | plus(("Carrier: {}").format(data["carrier"]))
90 | plus(("Line type: {}").format(data["line_type"]))
91 |
92 | if data["line_type"] == "landline":
93 | warn(
94 | (
95 | "This is most likely a landline, but it can still be a fixed VoIP number."
96 | )
97 | )
98 | elif data["line_type"] == "mobile":
99 | warn(
100 | (
101 | "This is most likely a mobile number, but it can still be a VoIP number."
102 | )
103 | )
104 |
--------------------------------------------------------------------------------
/scanners/ovh.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import requests
9 | from lib.output import *
10 |
11 |
12 | def scan(localNumber, numberCountry):
13 | if not args.scanner == "ovh" and not args.scanner == "all":
14 | return -1
15 |
16 | test("Running OVH scan...")
17 |
18 | querystring = {"country": numberCountry.lower()}
19 |
20 | headers = {"accept": "application/json", "cache-control": "no-cache"}
21 |
22 | try:
23 | response = requests.request(
24 | "GET",
25 | "https://api.ovh.com/1.0/telephony/number/detailedZones",
26 | data="",
27 | headers=headers,
28 | params=querystring,
29 | )
30 | data = json.loads(response.content.decode("utf-8"))
31 | except Exception as e:
32 | error("OVH API is unreachable. Maybe retry later.")
33 | return -1
34 |
35 | if isinstance(data, list):
36 | askedNumber = "0" + localNumber.replace(localNumber[-4:], "xxxx")
37 |
38 | for voip_number in data:
39 | if voip_number["number"] == askedNumber:
40 | plus(("1 result found in OVH database"))
41 | plus(("Number range: {}".format(voip_number["number"])))
42 | plus(("City: {}".format(voip_number["city"])))
43 | plus(
44 | (
45 | "Zip code: {}".format(
46 | voip_number["zipCode"]
47 | if voip_number["zipCode"] is not None
48 | else ""
49 | )
50 | )
51 | )
52 | askForExit()
53 |
--------------------------------------------------------------------------------
/scanners/recon.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import re
9 | from lib.args import args
10 | from lib.output import *
11 | from lib.googlesearch import search
12 |
13 |
14 | def phone_us_format(phone_number, delimiter):
15 | clean_phone_number = re.sub("[^0-9]+", "", phone_number)
16 | formatted_phone_number = (
17 | re.sub(
18 | "(\d)(?=(\d{3})+(?!\d))",
19 | r"\1" + delimiter,
20 | "%d" % int(clean_phone_number[:-1]),
21 | )
22 | + clean_phone_number[-1]
23 | )
24 | return formatted_phone_number
25 |
26 |
27 | def phone_format(phone_number, delimiter):
28 | clean_phone_number = re.sub("[^0-9]+", "", phone_number)
29 | formatted_phone_number = (
30 | re.sub(
31 | "(\d)(?=(\d{2})+(?!\d))",
32 | r"\1" + delimiter,
33 | "%d" % int(clean_phone_number[:-1]),
34 | )
35 | + clean_phone_number[-1]
36 | )
37 | return formatted_phone_number
38 |
39 |
40 | def scan(number):
41 | if not args.recon:
42 | return -1
43 |
44 | test("Running custom format reconnaissance...")
45 |
46 | cc = number["countryCode"].replace("+", "")
47 | nb = number["local"]
48 |
49 | if number["countryIsoCode"] == "US" or number["countryIsoCode"] == "CA":
50 | segments = phone_us_format(cc + nb, " ").split(" ")
51 |
52 | seg1 = segments[-3]
53 | seg2 = segments[-2]
54 | seg3 = segments[-1]
55 |
56 | formats = [
57 | "%s%s%s" % (seg1, seg2, seg3),
58 | "%s %s%s%s" % (cc, seg1, seg2, seg3),
59 | "%s %s %s%s" % (cc, seg1, seg2, seg3),
60 | "%s %s%s" % (seg1, seg2, seg3),
61 | "%s-%s%s" % (seg1, seg2, seg3),
62 | "%s-%s-%s" % (seg1, seg2, seg3),
63 | "+%s %s-%s-%s" % (cc, seg1, seg2, seg3),
64 | "(+%s)%s-%s-%s" % (cc, seg1, seg2, seg3),
65 | "+%s/%s-%s-%s" % (cc, seg1, seg2, seg3),
66 | "(%s) %s%s" % (seg1, seg2, seg3),
67 | "(%s) %s-%s" % (seg1, seg2, seg3),
68 | "(%s) %s.%s" % (seg1, seg2, seg3),
69 | "(%s)%s%s" % (seg1, seg2, seg3),
70 | "(%s)%s-%s" % (seg1, seg2, seg3),
71 | "(%s)%s.%s" % (seg1, seg2, seg3),
72 | ]
73 | else:
74 | formated_number = (
75 | number["international"]
76 | .replace(number["countryCode"] + " ", "")
77 | .split(" ")
78 | )
79 |
80 | segments = []
81 |
82 | for seg in formated_number:
83 | segments.append(seg)
84 |
85 | formats = [
86 | "+%s0%s" % (cc, nb),
87 | "(00%s)0%s" % (cc, number["local"]),
88 | "+%s/0%s" % (cc, nb),
89 | "+%s0%s" % (cc, "-".join(segments)),
90 | "(+%s)0%s" % (cc, "-".join(segments)),
91 | "(00%s)0%s" % (cc, "-".join(segments)),
92 | "(00%s)0%s" % (cc, "-".join(segments)),
93 | "+%s/0%s" % (cc, " ".join(segments)),
94 | "+%s0%s" % (cc, " ".join(segments)),
95 | "(00%s)0%s" % (cc, " ".join(segments)),
96 | "(+%s)0%s" % (cc, "".join(segments)),
97 | "(+%s)0%s" % (cc, " ".join(segments)),
98 | "+%s/0%s" % (cc, "-".join(segments)),
99 | "+%s/0%s" % (cc, " ".join(segments)),
100 | ]
101 |
102 | for format in formats:
103 | info("Footprint reconnaissance for %s" % (format))
104 | for result in search('"%s"' % (format), stop=5):
105 | plus("URL: " + result)
106 |
--------------------------------------------------------------------------------
/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dont-Copy-That-Floppy/pyPhoneInfoga/6ee50113ce63415e95fb917f1100f2e18f4b63d5/tests/__init__.py
--------------------------------------------------------------------------------
/tests/lib/banner.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import unittest
9 | from unittest.mock import patch
10 |
11 | from lib.banner import banner, __version__
12 |
13 |
14 | class TestBanner(unittest.TestCase):
15 | def test_version(self):
16 | self.assertIs(type(__version__), type("str"))
17 |
18 | @patch("builtins.print")
19 | def test_banner(self, printMock):
20 | banner()
21 |
22 | self.assertEqual(printMock.call_count, 9)
23 |
--------------------------------------------------------------------------------
/tests/lib/format.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | #
4 | # @name : PhoneInfoga - Phone numbers OSINT tool
5 | # @url : https://github.com/sundowndev
6 | # @author : Raphael Cerveaux (sundowndev)
7 |
8 | import unittest
9 | from unittest.mock import patch
10 |
11 | from lib.format import formatNumber, replaceVariables
12 |
13 |
14 | class TestFormat(unittest.TestCase):
15 | """
16 | We want to be sure re.sub is imported and called
17 | """
18 |
19 | @patch("re.sub")
20 | def test_formatNumberCallingSub(self, subMock):
21 | subMock.return_value = ""
22 |
23 | result = formatNumber("000")
24 |
25 | subMock.assert_called_with("(?:\+)?(?:[^[0-9]*)", "", "000")
26 | self.assertEqual(result, "")
27 |
28 | """
29 | We verify the function formats the number the right way
30 | """
31 |
32 | def test_formatNumber(self):
33 | self.assertEqual(formatNumber("+33 81495357"), "3381495357")
34 | self.assertEqual(formatNumber("0 81 49 53 57"), "081495357")
35 | self.assertEqual(formatNumber("+1 555-444-888"), "1555444888")
36 |
37 | def test_replaceVariables(self):
38 | number = {
39 | "input": "+33651580074",
40 | "default": "33651580074",
41 | "local": "651580074",
42 | "international": "+33 6 51 58 00 74",
43 | "country": "France",
44 | "countryCode": "+33",
45 | "countryIsoCode": "FR",
46 | "location": "France",
47 | "carrier": "",
48 | }
49 |
50 | self.assertEqual(replaceVariables("test $n", number), "test 33651580074")
51 | self.assertEqual(
52 | replaceVariables("test $i", number), "test +33 6 51 58 00 74"
53 | )
54 | self.assertEqual(replaceVariables("test $l", number), "test 6 51 58 00 74")
55 |
--------------------------------------------------------------------------------