├── composer.phar
├── composer.json
├── README.md
├── LICENSE
└── execute.php
/composer.phar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kulisu/metasploit-pro-trial-grabber/HEAD/composer.phar
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : "skiddie/metasploit-pro-trial-grabber",
3 | "description" : "This is a PHP command-line script to auto-grab the metasploit 7-DAYs pro trial key.",
4 | "require" : {
5 | "php" : ">=5.3.2",
6 | "php-curl-class/php-curl-class" : ">=1.0.1",
7 | "shark/simple_html_dom" : "dev-master",
8 | "mwhite/random-uagent" : "dev-master"
9 | },
10 | "repositories" : [ {
11 | "type" : "composer",
12 | "url" : "https://packagist.org/"
13 | } ],
14 | "authors" : [ {
15 | "name" : "Chris Lin",
16 | "email" : "Chris@skiddie.me",
17 | "homepage" : "http://www.skiddie.me",
18 | "role" : "Developer"
19 | } ],
20 | "license" : "GPL-2.0",
21 | "type" : "project",
22 | "homepage" : "https://github.com/skiddie/metasploit-pro-trial-grabber"
23 | }
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Metasploit Pro Trial Grabber
2 |
3 | ### Attention
4 |
5 | THIS SCRIPT WONT WORK ANY MORE !
6 |
7 | ### Introduction
8 |
9 | This is a PHP command-line script to auto-grab the Metasploit's [14-DAYs pro trial key].
10 |
11 | Really tired to submit the trial request to Metasploit manually to get the pro key every weeks just because of its ~~[unfriendly price]~~ ?
12 |
13 | You have a new choice today !
14 |
15 | Just run this script and wait a minute, it will generate a new pro trial key for you.
16 |
17 | It's using [Fake Name Generator] and [Fake Mail Generator] to fetch the contact information to register, all are fake and disposable.
18 |
19 | All the register processes are in automation, so enjoy it now !
20 |
21 | ### Donation
22 |
23 | if you like this script, buy me a coffee ?
24 |
25 | [](http://goo.gl/f8ShlA)
26 | [](http://goo.gl/tRt4zN)
27 | 
28 |
29 | ### Donators
30 |
31 | 2014-07-23: Anonymous - [0.01615 BTC](https://blockchain.info/tx/be809956bf74307cd60cfdc6adba6d026acc51816cceb6a9c297be4374a85eb0) (~ 300TWD)
32 |
33 | ### Environment
34 |
35 | * Linux:
36 |
37 | * [PHP]: 5.4.4-14+deb7u12
38 | * [cURL]: 7.26.0
39 | * [Kali Linux]: 1.0.8 x86
40 |
41 | * Windows:
42 |
43 | * [XAMPP]: 1.8.2
44 | * Windows XP Professional Service Pack 3 x86
45 |
46 | * OS X:
47 |
48 | * [PHP]: 5.5.14
49 | * [cURL]: 7.37.1
50 | * [OS X]: Yosemite 10.10
51 |
52 | ### Installation
53 |
54 | * Linux:
55 |
56 | ```sh
57 | # clone the script by using git directly.
58 | root@kali-linux:~# git clone https://github.com/kulisu/metasploit-pro-trial-grabber.git
59 | # install the project dependencies
60 | root@kali-linux:~# cd metasploit-pro-trial-grabber && php composer.phar install
61 |
62 | # OPTIONAL: execute the command below if you get the exception message 'cURL library is not loaded'.
63 | root@kali-linux:~# apt-get install php5-curl
64 | ```
65 |
66 | * Windows:
67 |
68 | ```batch
69 | # download the script and unzip it by yourself, path `C:\` for example.
70 | C:\Documents and Settings\Chris>cd C:\metasploit-pro-trial-grabber-master && C:\xampp\php\php.exe composer.phar install
71 | ```
72 |
73 | * OS X:
74 |
75 | ```sh
76 | Chris-MBPR:~ Chris$ git clone https://github.com/kulisu/metasploit-pro-trial-grabber.git
77 | Chris-MBPR:~ Chris$ cd metasploit-pro-trial-grabber && php composer.phar install
78 | ```
79 |
80 | ### Execution
81 |
82 | * Linux:
83 |
84 | ```sh
85 | # the environment mentioned above is tested by author and work functionally.
86 | root@kali-linux:~# php execute.php
87 | ```
88 |
89 | * Windows:
90 |
91 | ```batch
92 | C:\metasploit-pro-trial-grabber-master>C:\xampp\php\php.exe execute.php
93 | ```
94 |
95 | * OS X:
96 |
97 | ```sh
98 | Chris-MBPR:~ Chris$ php execute.php
99 | ```
100 |
101 | ### Output
102 |
103 | [+] defining the pre-required constants .. DONE !
104 | [+] loading the 3rd-party libraries .. DONE !
105 | [+] creating all classes' instance .. DONE !
106 | [+] checking all mail domains from provider: Spambog are valid or not ..
107 | [-] parsing all the available domains from response .. DONE !
108 | [*] parsing the profile fields from response .. DONE !
109 | [*] parsing the additional info from response .. DONE !
110 | [-] extracting from all the available domains ..
111 | [*] checking the mail address: habing@spambog.com is valid or not .. ILLEGAL
112 | [*] checking the mail address: habing@spambog.de is valid or not .. ILLEGAL
113 | [*] checking the mail address: habing@discardmail.com is valid or not .. ILLEGAL
114 | [*] checking the mail address: habing@discardmail.de is valid or not .. ILLEGAL
115 | [*] checking the mail address: habing@spambog.ru is valid or not .. ILLEGAL
116 | [*] checking the mail address: habing@0815.ru is valid or not .. ILLEGAL
117 | [*] checking the mail address: habing@s0ny.net is valid or not .. ILLEGAL
118 | [*] checking the mail address: habing@hulapla.de is valid or not .. ILLEGAL
119 | [*] checking the mail address: habing@bund.us is valid or not .. VALID !
120 | [*] checking the mail address: habing@teewars.org is valid or not .. ILLEGAL
121 | [*] checking the mail address: habing@brennendesreich.de is valid or not .. VALID !
122 | [*] checking the mail address: habing@ama-trans.de is valid or not .. ILLEGAL
123 | [*] checking the mail address: habing@ama-trade.de is valid or not .. ILLEGAL
124 | [*] checking the mail address: habing@malahov.de is valid or not .. ILLEGAL
125 | [*] checking the mail address: habing@e-postkasten.eu is valid or not .. VALID !
126 | [*] checking the mail address: habing@lags.us is valid or not .. VALID !
127 | [*] checking the mail address: habing@6ip.us is valid or not .. VALID !
128 | [*] checking the mail address: habing@e-postkasten.info is valid or not .. VALID !
129 | [*] checking the mail address: habing@e-postkasten.de is valid or not .. VALID !
130 | [*] checking the mail address: habing@e-postkasten.com is valid or not .. VALID !
131 | [-] ALL DONE !
132 | [+] ALL DONE !
133 | [+] choosing a valid domain and generating an email address .. DONE !
134 |
135 | [+] READY TO FIRE !
136 |
137 | [+] submitting the trial request to metasploit ..
138 | [-] parsing the hidden filds' value from response ..
139 | [*] field: custparamleadsource has value: 443597
140 | [*] field: submitted has value:
141 | [*] field: custparamreturnpath has value: https://localhost:3790/setup/activation
142 | [*] field: custparamproduct_key has value:
143 | [*] field: custparamproductaxscode has value: msY5CIoVGr
144 | [*] field: custparamthisIP has value: 103.245.222.133
145 | [-] ALL DONE !
146 | [-] preparing the registration payload .. DONE !
147 | [-] sending the registration data to online form .. DONE !
148 | [+] ALL DONE !
149 | [+] looping to retrieve the trial mail content ..
150 | [-] checking the trial confirmation mail has delivered to inbox or not ..
151 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
152 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
153 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
154 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
155 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
156 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
157 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
158 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
159 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
160 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
161 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
162 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
163 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
164 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
165 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
166 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
167 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
168 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
169 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
170 | [*] waiting for trial mail delivered to inbox: http://www.spambog.com/rss/habing@brennendesreich.de ..
171 | [*] BINGO ! the mail just delivered, parsing it .. DONE !
172 | [-] ALL DONE !
173 | [+] ALL DONE !
174 |
175 | Your 7-days pro trial key: CRDJ-09P8-EG4K-EQS4
176 |
177 | 
178 |
179 | ### Credits:
180 |
181 | * [PHP Curl Class]
182 | * [PHP Simple HTML DOM Parser]
183 | * [Random USERAGENT in CuRL and PHP]
184 |
185 | [7-DAYs pro trial key]:https://www.rapid7.com/register/metasploit-trial.jsp?product
186 | [unfriendly price]:https://community.rapid7.com/docs/DOC-2287
187 | [Fake Name Generator]:http://www.fakenamegenerator.com
188 | [Fake Mail Generator]:http://www.fakemailgenerator.com
189 | [PHP]:http://www.php.net/manual/en/install.unix.debian.php
190 | [cURL]:http://www.php.net/manual/en/curl.installation.php
191 | [PHP Curl Class]:https://github.com/php-curl-class/php-curl-class
192 | [PHP Simple HTML DOM Parser]:http://simplehtmldom.sourceforge.net
193 | [Random USERAGENT in CuRL and PHP]:http://www.danmorgan.net/programming/php-programming/random-useragent-in-curl-and-php
194 | [Kali Linux]:http://www.kali.org/downloads
195 | [XAMPP]:http://downloads.sourceforge.net/project/xampp/XAMPP%20Windows/1.8.2/xampp-win32-1.8.2-5-VC9-installer.exe
196 | [30-DAYS key]:http://www.rapid7.com/products/metasploit/metasploit-pro-registration-corelan.jsp
197 | [14-DAYs trial form]:http://www.rapid7.com/products/metasploit/metasploit-pro-registration.jsp
198 | [OS X]:http://www.apple.com/osx/
199 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
--------------------------------------------------------------------------------
/execute.php:
--------------------------------------------------------------------------------
1 | FALSE, 'Guerrillamail' => FALSE, 'Spambog' => TRUE, 'Yopmail' => FALSE ) ) );
23 | # fixed `Warning: strtotime(): It is not safe to rely on the system's timezone settings. balabalabala` LOL
24 | date_default_timezone_set( 'Asia/Taipei' );
25 | echo "DONE !", PHP_EOL;
26 | # End
27 |
28 | # Start: loading the 3rd-party libraries
29 | echo "[+] loading the 3rd-party libraries .. ";
30 | require_once 'vendor/autoload.php';
31 | echo "DONE !", PHP_EOL;
32 | # End
33 |
34 | # Start: creating all classes' instance
35 | echo "[+] creating all classes' instance .. ";
36 | $rnd = array_rand( array_flip( array_keys( unserialize( PROVIDER_LIST ), TRUE ) ), 1 );
37 |
38 | $eml = new $rnd();
39 | $fng = new Fakenamegenerator();
40 | $msf = new Metasploit();
41 | echo "DONE !", PHP_EOL;
42 | # End
43 |
44 | # Start: checking all mail domains from provider: $obj are valid or not
45 | echo "[+] checking all mail domains from provider: $rnd are valid or not ..", PHP_EOL;
46 | $domains = $eml->get_available_domains();
47 | $fields = $fng->get_profile_fields();
48 | $address = $msf->check_mail_address( $fields['user_name'], $domains );
49 | echo "[+] ALL DONE !", PHP_EOL;
50 | # End
51 |
52 | # Start: choosing a valid domain and generating an email address
53 | echo "[+] choosing a valid domain and generating an email address .. ";
54 | #
55 | $total = count( $address['valid'] );
56 | if ( $total > 0 ) {
57 | $fields['email'] = sprintf( '%s@%s', $fields['user_name'], $address['valid'][rand( 0, $total - 1 )]['value'] );
58 | } else {
59 | echo PHP_EOL, "[x] no valid domains, exiting ..", PHP_EOL;
60 | die();
61 | }
62 | echo "DONE !", PHP_EOL;
63 | # End
64 |
65 | # READY TO FIRE !
66 | echo PHP_EOL, "[+] READY TO FIRE !", PHP_EOL, PHP_EOL;
67 |
68 | # Start: submitting the trial request to metasploit
69 | echo "[+] submitting the trial request to metasploit ..", PHP_EOL;
70 | $hidden = $msf->get_hidden_values();
71 | $msf->submit_trial_request( $fields, $hidden );
72 | echo "[+] ALL DONE !", PHP_EOL;
73 | # End
74 |
75 | # Start: looping to retrieve the trial mail content
76 | echo "[+] looping to retrieve the trial mail content ..", PHP_EOL;
77 | echo $eml->get_trial_license( $fields['email'], REQUEST_DELAY );
78 | # End
79 |
80 | # MISSION COMPLETED :-D
81 | echo PHP_EOL, PHP_EOL, "if you like this script, buy me a coffee ?";
82 | echo PHP_EOL, "Paypal: Chris#skiddie.me, BitCoin: 1BBJgGhyFMJcwnzCVZz2LxM2htsQBy9nWd", PHP_EOL;
83 |
84 | /**
85 | * @author Chris Lin
86 | * @version 2014-03-22
87 | */
88 | abstract class Grabber {
89 | protected $curl_object;
90 | protected $grab_result;
91 | protected $html_object;
92 | protected $service_url;
93 | protected $sxml_object;
94 |
95 | protected function __construct() {
96 | $this->curl_object = new Curl();
97 | $this->grab_result = NULL;
98 | $this->html_object = new simple_html_dom();
99 | $this->service_url = NULL;
100 | $this->sxml_object = NULL;
101 |
102 | $headers = array(
103 | 'User-Agent' => random_uagent()
104 | );
105 |
106 | foreach ( $headers as $key => $value ) {
107 | $this->curl_object->setHeader( $key, $value );
108 | }
109 |
110 | $this->curl_object->error( function( $instance ) {
111 | echo PHP_EOL, "[?] cURL error occurred ..", PHP_EOL;
112 | echo '[?] error code: ', $instance->error_code, PHP_EOL;
113 | echo '[?] error message: ', $instance->error_message, PHP_EOL;
114 | die();
115 | });
116 |
117 | $this->curl_object->setOpt(CURLOPT_SSL_VERIFYPEER, ENABLE_VERIFY);
118 | }
119 |
120 | protected function __destruct() {
121 | $this->curl_object->close();
122 | $this->html_object->clear();
123 | unset( $this->grab_result, $this->service_url, $this->sxml_object );
124 | }
125 | }
126 |
127 | /**
128 | * @author Chris Lin
129 | * @version 2014-11-30
130 | */
131 | abstract class Disposable extends Grabber {
132 | protected function __construct() {
133 | parent::__construct();
134 | }
135 |
136 | protected function __destruct() {
137 | parent::__destruct();
138 | }
139 |
140 | protected function get_available_domains( $pattern = 'option' ) {
141 | $domains = array();
142 |
143 | # sending the GET request to retrieve the HTML raw code
144 | $this->curl_object->get( $this->service_url );
145 | # ready to parse some fields we're interested
146 | $this->html_object->load( $this->curl_object->response );
147 |
148 | # Start: parsing all the available domains from response
149 | echo " [-] parsing all the available domains from response .. ";
150 | foreach ( $this->html_object->find( $pattern ) as $domain ) {
151 | array_push( $domains, array( 'key' => $domain->value, 'value' => trim( str_replace( array( '@', ' (PW)', '@' ), '', $domain->plaintext ) ) ) );
152 | }
153 | echo "DONE !", PHP_EOL;
154 | # End
155 |
156 | # return the domains value we've parsed
157 | $this->grab_result = $domains;
158 | return $this->grab_result;
159 | }
160 |
161 | abstract protected function get_trial_license( $email, $delay = 45 );
162 | }
163 |
164 | /**
165 | * @author Chris Lin
166 | * @version 2014-03-29
167 | */
168 | class Fakemailgenerator extends Disposable {
169 | public function __construct() {
170 | parent::__construct();
171 | $this->service_url = 'http://www.fakemailgenerator.com';
172 | }
173 |
174 | public function __destruct() {
175 | parent::__destruct();
176 | }
177 |
178 | /**
179 | * parsing the fakemailgenerator mail content to get all available domains
180 | *
181 | * @author Chris Lin
182 | * @link http://www.fakemailgenerator.com/
183 | * @return array returns an array of all the available mail domains
184 | * @version 2014-03-22
185 | */
186 | public function get_available_domains() {
187 | return parent::get_available_domains();
188 | }
189 |
190 | /**
191 | * parsing the fakemailgenerator mail content to get the trial license in looping
192 | *
193 | * @author Chris Lin
194 | * @link http://www.fakemailgenerator.com/inbox/fleckens.hu/ceshounce1986/
195 | * @param string $email a mail address parsed from fakemailgenerator to receive the trial license
196 | * @param int $delay waiting for %d seconds to get again if the trial info has not delivered
197 | * @return string the metasploit pro trial product key for 14-days
198 | * @version 2014-03-29
199 | */
200 | public function get_trial_license( $email, $delay = 45 ) {
201 | $address = explode( '@', $email );
202 | $inbox = sprintf( '%s/inbox/%s/%s/', $this->service_url, $address[1], $address[0] );
203 | $pattern = 'a[id=active-email]';
204 | $retry = 0;
205 |
206 | # checking the trial confirmation mail has delivered to inbox or not
207 | echo " [-] checking the trial confirmation mail has delivered to inbox or not ..", PHP_EOL;
208 | do {
209 | if ( $retry < REQUEST_RETRY ) {
210 | # sending the GET request to retrieve the HTML raw code
211 | $this->curl_object->get( $inbox );
212 | # ready to parse some fields we're interested
213 | $this->html_object->load( $this->curl_object->response );
214 |
215 | #
216 | # Swofford@mail.appfield.net, Caitlin <caitlin_swofford@rapid7.com>
217 | # Rapid7 Metasploit Pro Trial License Activated
218 | #
219 | # 5:18 AM EDT
220 | #
221 | $content = $this->html_object->find( $pattern, 0 );
222 |
223 | if ( empty( $content ) ) {
224 | $retry++;
225 | # no luck, waiting for %d second(s) to step into the new loop to fetch again
226 | echo " [*] waiting for trial mail delivered to inbox: $inbox ..", PHP_EOL;
227 | sleep( $delay );
228 | } else {
229 | # BINGO !
230 | echo " [*] BINGO ! the mail just delivered, parsing it .. ";
231 | # http://www.fakemailgenerator.com/inbox/fleckens.hu/carljlange/message-21872104/
232 | $url = explode( '/', str_replace( '-', '/', $content->href ) );
233 |
234 | # http://www.fakemailgenerator.com/email.php?id=21872104
235 | $this->curl_object->get( sprintf( '%s/email.php?id=%s', $this->service_url, $url[5] ) );
236 | $this->html_object->load( $this->curl_object->response );
237 |
238 | # parsing the trial serial
239 | preg_match( '/\w{4}-\w{4}-\w{4}-\w{4}/', $this->html_object->find( 'table tr td span', 0 )->parent()->plaintext, $license );
240 | echo "DONE !";
241 | }
242 | } else {
243 | echo "[x] reaching the maximum retry count, exiting ..";
244 | return;
245 | }
246 | } while ( empty( $license ) );
247 | echo PHP_EOL, " [-] ALL DONE !", PHP_EOL;
248 | echo "[+] ALL DONE !", PHP_EOL, PHP_EOL;
249 | # End
250 |
251 | # return the 14-DAYS pro serial we want, DONE !
252 | $this->return_result = sprintf( 'Your 14-days pro trial key: %s', $license[0] );
253 | return $this->return_result;
254 | }
255 | }
256 |
257 | /**
258 | * @author Chris Lin
259 | * @version 2014-03-22
260 | */
261 | class Fakenamegenerator extends Grabber {
262 | public function __construct() {
263 | parent::__construct();
264 | $this->service_url = 'http://www.fakenamegenerator.com/advanced.php';
265 | }
266 |
267 | public function __destruct() {
268 | parent::__destruct();
269 | }
270 |
271 | /**
272 | * parsing the fakenamegenerator profile content to get the fake fields likes name, phone, etc.
273 | *
274 | * @author Chris Lin
275 | * @link http://www.fakenamegenerator.com/advanced.php?t=country&n[]=us&c[]=us&gen=85&age-min=19&age-max=45
276 | * @return array returns an array of fake profile fields
277 | * @version 2014-02-23
278 | */
279 | public function get_profile_fields() {
280 | $field = array();
281 | $pattern = 'div[class=extra]';
282 | $payload = array(
283 | 'age-max' => '45',
284 | 'age-min' => '19',
285 | 'c[]' => 'us',
286 | 'gen' => '85',
287 | 'n[]' => 'us',
288 | 't' => 'country'
289 | );
290 |
291 | # sending the GET request to retrieve the HTML raw code
292 | $this->curl_object->get( $this->service_url, $payload );
293 | # ready to parse some fields we're interested
294 | $this->html_object->load( $this->curl_object->response );
295 |
296 | # Start: parsing the profile fields from response
297 | echo " [*] parsing the profile fields from response .. ";
298 | $full_name = explode( ' ', $this->html_object->find( 'div[class=info]', 0 )->children( 0 )->children( 0 )->children( 0 )->plaintext );
299 | $fields['first_name'] = $full_name[0];
300 | $fields['last_name'] = $full_name[2];
301 | $fields['user_name'] = strtolower( $this->html_object->find( $pattern, 0 )->children( 0 )->children( 7 )->plaintext );
302 | echo "DONE !", PHP_EOL;
303 | # End
304 |
305 | # Start: parsing the additional info from response
306 | echo " [*] parsing the additional info from response .. ";
307 | $fields['title'] = $this->html_object->find( $pattern, 0 )->children( 0 )->children( 34 )->plaintext;
308 | $fields['company_name'] = $this->html_object->find( $pattern, 0 )->children( 0 )->children( 37 )->plaintext;
309 | $fields['phone'] = sprintf( '+1%s', str_replace( '-', '', trim( $this->html_object->find( $pattern, 0 )->children( 0 )->children( 1 )->children( 0 )->plaintext ) ) );
310 | # $fields['email'] = strtolower( $this->html_resource->find( $pattern, 0 )->children(0)->children(4)->children(0)->plaintext );
311 | # $fields['address'] = str_replace( ' ', ' ', trim( $this->html_resource->find( 'div[class=info]', 0 )->children(0)->children(0)->children(1)->innertext ) );
312 | echo "DONE !", PHP_EOL;
313 | # End
314 |
315 | # return the fields value we've parsed
316 | $this->grab_result = $fields;
317 | return $this->grab_result;
318 | }
319 | }
320 |
321 | /**
322 | * @author Chris Lin
323 | * @version 2014-03-22
324 | */
325 | class Guerrillamail extends Disposable {
326 | public function __construct() {
327 | parent::__construct();
328 | $this->service_url = 'https://www.guerrillamail.com';
329 | }
330 |
331 | public function __destruct() {
332 | parent::__destruct();
333 | }
334 |
335 | /**
336 | * parsing the guerrillamail mail content to get all available domains
337 | *
338 | * @author Chris Lin
339 | * @link https://www.guerrillamail.com/
340 | * @return array returns an array of all the available mail domains
341 | * @version 2014-03-22
342 | */
343 | public function get_available_domains() {
344 | return parent::get_available_domains();
345 | }
346 |
347 | /**
348 | * parsing the guerrillamail mail content to get the trial license in looping
349 | *
350 | * @author Chris Lin
351 | * @param string $email a mail address parsed from guerrillamail to receive the trial license
352 | * @param int $delay waiting for %d seconds to get again if the trial info has not delivered
353 | * @return string the metasploit pro trial product key for 14-days
354 | * @version 2014-03-22
355 | */
356 | public function get_trial_license( $email, $delay = 45 ) {
357 | # TODO: ALL MAIL DOMAINS BANNED BY METASPLOIT
358 | # return parent::get_trial_license( $email, $delay );
359 | }
360 | }
361 |
362 | /**
363 | * @author Chris Lin
364 | * @version 2014-11-03
365 | */
366 | class Spambog extends Disposable {
367 | public function __construct() {
368 | parent::__construct();
369 | $this->service_url = 'http://discard.email';
370 | }
371 |
372 | public function __destruct() {
373 | parent::__destruct();
374 | }
375 |
376 | /**
377 | * parsing the spambog mail content to get all available domains
378 | *
379 | * @author Chris Lin
380 | * @link http://discard.email/
381 | * @return array returns an array of all the available mail domains
382 | * @version 2014-03-22
383 | */
384 | public function get_available_domains() {
385 | $domains = array_filter( parent::get_available_domains( 'select[id=LoginDomainId] option[!class]' ) );
386 | array_pop( $domains );
387 |
388 | return $domains;
389 | }
390 |
391 | /**
392 | * parsing the spambog mail content to get the trial license in looping
393 | *
394 | * @author Chris Lin
395 | * @link http://discard.email/rss/olde1972@pfui.ru
396 | * @param string $email a mail address parsed from spambog to receive the trial license
397 | * @param int $delay waiting for %d seconds to get again if the trial info has not delivered
398 | * @return string the metasploit pro trial product key for 14-days
399 | * @version 2014-03-29
400 | */
401 | public function get_trial_license( $email, $delay = 45 ) {
402 | $inbox = sprintf( '%s/rss/%s', $this->service_url, $email );
403 | $retry = 0;
404 |
405 | # checking the trial confirmation mail has delivered to inbox or not
406 | echo " [-] checking the trial confirmation mail has delivered to inbox or not ..", PHP_EOL;
407 | do {
408 | if ( $retry < REQUEST_RETRY ) {
409 | # sending the GET request to retrieve the HTML raw code
410 | $this->curl_object->get( $inbox );
411 | # ready to parse some fields we're interested
412 | $this->sxml_object = new SimpleXMLElement( $this->curl_object->response );
413 |
414 | # http://discard.email/message-5934749185473057024-43e1348b0062c9329bfd0d0c232c1f88/olde1972@pfui.ru.htm
415 | $content = $this->sxml_object->channel->item->link;
416 |
417 | if ( empty( $content ) ) {
418 | $retry++;
419 | # no luck, waiting for %d second(s) to step into the new loop to fetch again
420 | echo " [*] waiting for trial mail delivered to inbox: $inbox ..", PHP_EOL;
421 | sleep( $delay );
422 | } else {
423 | # BINGO !
424 | echo " [*] BINGO ! the mail just delivered, parsing it .. ";
425 | # http://discard.email/message-5934749185473057024-43e1348b0062c9329bfd0d0c232c1f88/olde1972@pfui.ru.htm
426 | preg_match( '/\w{19}-\w{32}/', $content, $url );
427 | # cookies of sid: ikb4qcla4g6dpoggg0cctadnn6
428 | preg_match( '/\w{26}/', implode('|', $this->curl_object->response_headers), $cookies );
429 |
430 | $this->curl_object->setCookie( 'sid', $cookies[0] );
431 |
432 | # Start: must make the normal queries so that the we can grab the result below LOL
433 | $this->curl_object->get( $content );
434 | $this->curl_object->get( sprintf( '%s/message-%s.htm', $this->service_url, $url[0] ) );
435 | # End
436 |
437 | # http://discard.email/public/messages/getHtmlMessage.php?file=htmlMessage-5934749185473057024-43e1348b0062c9329bfd0d0c232c1f88_UTF-8.htm
438 | $this->curl_object->get( sprintf( '%s/public/messages/getHtmlMessage.php?file=htmlMessage-%s_UTF-8.htm', $this->service_url, $url[0] ) );
439 | $this->html_object->load( $this->curl_object->response );
440 |
441 | # parsing the trial serial
442 | preg_match( '/\w{4}-\w{4}-\w{4}-\w{4}/', $this->html_object->find( 'table tr td span', 0 )->parent()->plaintext, $license );
443 | echo "DONE !";
444 | }
445 | } else {
446 | echo "[x] reaching the maximum retry count, exiting ..";
447 | return;
448 | }
449 | } while ( empty( $license ) );
450 | echo PHP_EOL, " [-] ALL DONE !", PHP_EOL;
451 | echo "[+] ALL DONE !", PHP_EOL, PHP_EOL;
452 | # End
453 |
454 | # return the 14-DAYS pro serial we want, DONE !
455 | $this->return_result = sprintf( 'Your 14-days pro trial key: %s', $license[0] );
456 | return $this->return_result;
457 | }
458 | }
459 |
460 | /**
461 | * @author Chris Lin
462 | * @version 2014-03-29
463 | */
464 | class Yopmail extends Disposable {
465 | public function __construct() {
466 | parent::__construct();
467 | $this->service_url = 'http://www.yopmail.com';
468 | }
469 |
470 | public function __destruct() {
471 | parent::__destruct();
472 | }
473 |
474 | /**
475 | * parsing the yopmail mail content to get all available domains
476 | *
477 | * @author Chris Lin
478 | * @link http://www.yopmail.com/
479 | * @return array returns an array of all the available mail domains
480 | * @version 2014-03-22
481 | */
482 | public function get_available_domains() {
483 | return parent::get_available_domains( 'td.alt div[!class]' );
484 | }
485 |
486 | /**
487 | * parsing the yopmail mail content to get the trial license in looping
488 | *
489 | * @author Chris Lin
490 | * @link http://www.yopmail.com/en/rss.php?login=outramer
491 | * @param string $email a mail address parsed from spambog to receive the trial license
492 | * @param int $delay waiting for %d seconds to get again if the trial info has not delivered
493 | * @return string the metasploit pro trial product key for 14-days
494 | * @version 2014-03-29
495 | */
496 | public function get_trial_license( $email, $delay = 45 ) {
497 | $address = explode( '@', $email );
498 | $inbox = sprintf( '%s/rss.php?login=%s', $this->service_url, $address[0] );
499 | $retry = 0;
500 |
501 | # checking the trial confirmation mail has delivered to inbox or not
502 | echo " [-] checking the trial confirmation mail has delivered to inbox or not ..", PHP_EOL;
503 | do {
504 | if ( $retry < REQUEST_RETRY ) {
505 | # sending the GET request to retrieve the HTML raw code
506 | $this->curl_object->get( $inbox );
507 | # ready to parse some fields we're interested
508 | $this->sxml_object = new SimpleXMLElement( $this->curl_object->response );
509 |
510 | # http://yopmail.com?login=outramer&id=e_ZGDjZmR1ZGx0BQDmZQNjZwx1BGV3BN==
511 | $content = $this->sxml_object->channel->item->link;
512 |
513 | if ( empty( $content ) ) {
514 | $retry++;
515 | # no luck, waiting for %d second(s) to step into the new loop to fetch again
516 | echo " [*] waiting for trial mail delivered to inbox: $inbox ..", PHP_EOL;
517 | sleep( $delay );
518 | } else {
519 | # BINGO !
520 | echo " [*] BINGO ! the mail just delivered, parsing it .. ";
521 | # http://yopmail.com?login=outramer&id=e_ZGDjZmR1ZGx0BQDmZQNjZwx1BGV3BN==
522 | preg_match( '/\w{32}/', $content, $url );
523 |
524 | # http://www.yopmail.com/mail.php?id=me_ZGDjZmR1ZGx0BQDmZQNjZwx1BGV3BN==
525 | $this->curl_object->get( sprintf( '%s/mail.php?id=m%s==', $this->service_url, $url[0] ) );
526 | $this->html_object->load( $this->curl_object->response );
527 |
528 | # parsing the trial serial
529 | preg_match( '/\w{4}-\w{4}-\w{4}-\w{4}/', $this->html_object->find( 'table tr td span', 0 )->parent()->plaintext, $license );
530 | echo "DONE !";
531 | }
532 | } else {
533 | echo "[x] reaching the maximum retry count, exiting ..";
534 | return;
535 | }
536 | } while ( empty( $license ) );
537 | echo PHP_EOL, " [-] ALL DONE !", PHP_EOL;
538 | echo "[+] ALL DONE !", PHP_EOL, PHP_EOL;
539 | # End
540 |
541 | # return the 14-DAYS pro serial we want, DONE !
542 | $this->return_result = sprintf( 'Your 14-days pro trial key: %s', $license[0] );
543 | return $this->return_result;
544 | }
545 | }
546 |
547 | /**
548 | * @author Chris Lin
549 | * @version 2014-11-30
550 | */
551 | class Metasploit extends Grabber {
552 | public function __construct() {
553 | parent::__construct();
554 | $this->service_url = array( 'base_url' => 'https://forms.netsuite.com/app/site/hosting/scriptlet.nl', 'form_url' => 'http://www.rapid7.com/products/metasploit/metasploit-pro-registration.jsp' );
555 | }
556 |
557 | public function __destruct() {
558 | parent::__destruct();
559 | }
560 |
561 | /**
562 | * checking which the mail domains are valid from metasploit validation
563 | *
564 | * @author Chris Lin
565 | * @link https://forms.netsuite.com/app/site/hosting/scriptlet.nl?script=177&deploy=1&compid=663271&h=5c107be29a3fe5ef6392&vd=emdf+eme+ips&ips=167.216.129.23&em=perat8678@teleworm.us
566 | * @param string $name a user name to prepend to mail domain
567 | * @param array $domains an array of all the available mail domains to be extracted
568 | * @return array return an array of the valid and illegal check result
569 | * @version 2014-11-30
570 | */
571 | public function check_mail_address( $name, $domains ) {
572 | $illegal = array();
573 | $pattern = 'ips:true,eme:true,emdf:true';
574 | $valid = array();
575 |
576 | # Start: extracting from all the available domains
577 | echo " [-] extracting from all the available domains .. ";
578 | foreach ( $domains as $domain ) {
579 | $payload = array(
580 | 'compid' => 663271,
581 | 'deploy' => 1,
582 | 'em' => sprintf( '%s@%s', $name, $domain['value'] ),
583 | 'h' => '5c107be29a3fe5ef6392',
584 | 'ips' => long2ip( rand( 0, 255 * 255 ) * rand( 0, 255 * 255 ) ),
585 | 'script' => 177,
586 | 'vd' => 'emdf eme ips'
587 | );
588 |
589 | # sending the GET request to retrieve the HTML raw code
590 | $this->curl_object->get( $this->service_url['base_url'], $payload );
591 |
592 | # Start: checking the mail address is valid or not
593 | echo PHP_EOL, " [*] checking the mail address: $payload[em] is valid or not .. ";
594 | if ( strpos( $this->curl_object->response, $pattern ) === FALSE ) {
595 | echo "ILLEGAL";
596 | array_push( $illegal, array( 'key' => $domain['key'], 'value' => $domain['value'] ) );
597 | } else {
598 | echo "VALID !";
599 | array_push( $valid, array( 'key' => $domain['key'], 'value' => $domain['value'] ) );
600 | }
601 | # End
602 | }
603 | echo PHP_EOL, " [-] ALL DONE !", PHP_EOL;
604 | # End
605 |
606 | # return the validate info we've parsed
607 | $this->grab_result = array( 'valid' => $valid, 'illegal' => $illegal );
608 | return $this->grab_result;
609 | }
610 |
611 | /**
612 | * parsing the hidden filds' value from metasploit registration form
613 | *
614 | * @author Chris Lin
615 | * @link https://www.rapid7.com/register/metasploit-trial.jsp?product
616 | * @return array return an array of the hidden filds' value
617 | * @version 2014-11-30
618 | */
619 | public function get_hidden_values() {
620 | $values = array();
621 |
622 | # sending the GET request to retrieve the HTML raw code
623 | $this->curl_object->get( $this->service_url['form_url'] );
624 | # ready to parse some fields we're interested
625 | $this->html_object->load( $this->curl_object->response );
626 |
627 | # Start: parsing the hidden filds' value from response
628 | echo " [-] parsing the hidden filds' value from response ..";
629 | foreach ( $this->html_object->find( 'form[id=submitForm] input[type=hidden]') as $hidden ) {
630 | $key = $hidden->name;
631 | $value = $hidden->value;
632 | $values[$key] = $value;
633 | echo PHP_EOL, " [*] field: $key has value: $value";
634 | }
635 | # https://forms.netsuite.com/app/site/hosting/scriptlet.nl?script=214&deploy=1&compid=663271&h=f545d011e89bdd812fe1
636 | $values['form_action'] = $this->html_object->find( 'form[id=submitForm]', 0 )->action;
637 | # echo PHP_EOL, " [*] form: action has value: $values[form_action]";
638 | echo PHP_EOL, " [-] ALL DONE !", PHP_EOL;
639 | # End
640 |
641 | # return the hidden values we've parsed
642 | $this->grab_result = $values;
643 | return $this->grab_result;
644 | }
645 | # End
646 |
647 | /**
648 | * submitting the trial request to the registration form
649 | *
650 | * @author Chris Lin
651 | * @link https://forms.netsuite.com/app/site/hosting/scriptlet.nl?script=214&deploy=1&compid=663271&h=f545d011e89bdd812fe1
652 | * @param array $profile the applicant's contact information
653 | * @param array $hidden the hidden fields in this form
654 | * @version 2014-11-30
655 | */
656 | public function submit_trial_request( $profile, $hidden ) {
657 | echo " [-] preparing the registration payload .. ";
658 | $payload = array(
659 | # maybe there will have a captcha validation in the future ? handle it by yourself !
660 | # reference: http://www.dama2.com/
661 | # 'custparamcaptcha' => '',
662 | 'custparamfirstname' => $profile['first_name'],
663 | 'custparamlastname' => $profile['last_name'],
664 | 'custparamtitle' => $profile['title'],
665 | 'joblevel' => 'Other',
666 | 'custparamcompanyname' => $profile['company_name'],
667 | 'custparamcountry' => 'TW',
668 | 'typeofuse' => 'Personal',
669 | 'custparamphone' => $profile['phone'],
670 | 'custparamemail' => $profile['email'],
671 | 'custparamthisIP' => long2ip( rand( 0, 255 * 255 ) * rand( 0, 255 * 255 ) )
672 | );
673 | echo "DONE !", PHP_EOL;
674 |
675 | # Start: sending the POST request to retrieve the HTML raw code
676 | echo " [-] sending the registration data to online form .. ";
677 | $address = array_pop( $hidden );
678 | $this->curl_object->post( $address , http_build_query( array_merge( $hidden, $payload ) ) );
679 | echo "DONE !", PHP_EOL;
680 | # End
681 | }
682 | }
683 |
--------------------------------------------------------------------------------