├── .github └── FUNDING.yml ├── .gitignore ├── .travis.yml ├── LICENSE ├── MANIFEST.in ├── README.rst ├── build └── lib │ └── spry │ ├── __init__.py │ ├── __main__.py │ ├── modules │ ├── __init__.py │ ├── core.py │ ├── pdf_maker.py │ ├── spinner.py │ ├── stuff.py │ └── useragents.py │ └── spry.py ├── docs ├── about.md └── index.md ├── mkdocs.yml ├── requirements.txt ├── setup.cfg ├── setup.py ├── site ├── __init__.py ├── about │ └── index.html ├── base.html ├── breadcrumbs.html ├── css │ ├── highlight.css │ ├── theme.css │ └── theme_extra.css ├── fonts │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff ├── footer.html ├── img │ └── favicon.ico ├── index.html ├── js │ ├── highlight.pack.js │ ├── jquery-2.1.1.min.js │ ├── modernizr-2.8.3.min.js │ └── theme.js ├── mkdocs │ ├── js │ │ ├── lunr-0.5.7.min.js │ │ ├── mustache.min.js │ │ ├── require.js │ │ ├── search-results-template.mustache │ │ ├── search.js │ │ └── text.js │ └── search_index.json ├── search.html ├── searchbox.html ├── sitemap.xml ├── toc.html └── versions.html ├── spry-run.py └── spry ├── __init__.py ├── __main__.py ├── modules ├── __init__.py ├── core.py ├── pdf_maker.py ├── spinner.py ├── stuff.py └── useragents.py └── spry.py /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | patreon: jamescampbell 3 | open_collective: # Replace with a single Open Collective username 4 | ko_fi: # Replace with a single Ko-fi username 5 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 6 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 7 | liberapay: # Replace with a single Liberapay username 8 | issuehunt: # Replace with a single IssueHunt username 9 | otechie: # Replace with a single Otechie username 10 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.jpg 2 | *.pdf 3 | build/ 4 | /build/ 5 | *.pyc 6 | /dist/ 7 | /*.egg-info 8 | /blib/ 9 | /.build/ 10 | _build/ 11 | cover_db/ 12 | inc/ 13 | Build 14 | !Build/ 15 | Build.bat 16 | .last_cover_stats 17 | /Makefile 18 | /Makefile.old 19 | /MANIFEST.bak 20 | /META.yml 21 | /META.json 22 | /MYMETA.* 23 | nytprof.out 24 | /pm_to_blib 25 | *.o 26 | *.bs 27 | /_eumm/ 28 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.5" 4 | # command to install dependencies 5 | install: "pip3 install -r requirements.txt" 6 | script: python3 -m pytest 7 | # install: "pip install -r 27requirements.txt" 8 | -------------------------------------------------------------------------------- /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 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 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 | {project} Copyright (C) {year} {fullname} 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 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ``SPRY SPY PRY SPRY SPY PRY SPRY`` 2 | 3 | .. image:: https://img.shields.io/pypi/v/spry.svg 4 | :target: https://pypi.python.org/pypi/spry 5 | .. image:: https://badges.gitter.im/Join%20Chat.svg 6 | :target: https://gitter.im/sprypy/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge 7 | .. image:: https://readthedocs.org/projects/spry/badge/?version=latest 8 | :target: http://spry.rtfd.io 9 | 10 | social media intelligence from the terminal 11 | ----------------------------------------------- 12 | 13 | Updates for 0.5.5: 14 | 15 | Fixes for requests module updates that did not like white space in the beginning of user agent strings. 16 | 17 | Confirmed working for Python 3.x. 18 | 19 | WORKING SCREENSHOT (version 0.5.5) 20 | 21 | .. image:: https://cloud.githubusercontent.com/assets/616585/17407123/259d637c-5a34-11e6-96b1-0ef1b82a9559.png 22 | 23 | WARNING: 24 | ******** 25 | this is in early beta 26 | 27 | 30 social accounts working so far... 28 | 29 | KEY FEATURES: 30 | ============= 31 | 32 | 1. Saves profile images and content from each profile found in the directory that you ran the command from. 33 | 2. Puts all found data into a single PDF (username-report.pdf) in the directory that you ran the command from. 34 | 3. Progress DOTS and nice COLOURS assuming your terminal supports it. 35 | 4. Randomized pausing between lookups so you don't get blocked. 36 | 5. Randomized list of +8500 User Agent strings in use by default (can override via -u arg). 37 | 6. Proxy override via -p arg. 38 | 39 | INSTALL via pip: 40 | ================ 41 | 42 | ``pip install spry`` 43 | 44 | or 45 | 46 | INSTALL via git: 47 | ================ 48 | 49 | ``git clone git@github.com:james-see/spry.git`` 50 | 51 | then ``cd spry`` then ``python spry-run.py [username]`` 52 | 53 | DEV PATH? 54 | 55 | the goal is to get to +100 services that have public url user name profile links to check and gather information from 56 | 57 | EXAMPLES: 58 | ========= 59 | 60 | run via ``spry [username]`` 61 | 62 | run with spitting out a pdf report: 63 | 64 | ``spry [username] --report`` 65 | 66 | run with verbose mode (show the user agent of each request): 67 | 68 | ``spry [username] -v`` 69 | 70 | 71 | -------------------------------------------------------------------------------- /build/lib/spry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/james-see/spry/43cb502acf114e5872f3d86cf4873575552eef26/build/lib/spry/__init__.py -------------------------------------------------------------------------------- /build/lib/spry/__main__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | """spry.__main__: executed when spry directory is called as script.""" 5 | 6 | 7 | from .spry import main 8 | main() 9 | -------------------------------------------------------------------------------- /build/lib/spry/modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/james-see/spry/43cb502acf114e5872f3d86cf4873575552eef26/build/lib/spry/modules/__init__.py -------------------------------------------------------------------------------- /build/lib/spry/modules/core.py: -------------------------------------------------------------------------------- 1 | 2 | #!/usr/bin/env python 3 | # -*- coding: utf-8 -*- 4 | 5 | # ---------------------------------------------------------------------- 6 | # This file is part of spry 7 | # 8 | # Spry is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # Spry is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with Spry. If not, see . 20 | # ---------------------------------------------------------------------- 21 | try: import spinner 22 | except: from spry.modules import spinner 23 | try: import pdf_maker 24 | except: from spry.modules import pdf_maker 25 | -------------------------------------------------------------------------------- /build/lib/spry/modules/pdf_maker.py: -------------------------------------------------------------------------------- 1 | from weasyprint import HTML, CSS 2 | from weasyprint.fonts import FontConfiguration 3 | 4 | def create_pdf(username, totals): 5 | """Test out functionality.""" 6 | html = HTML(string='


SPRY Report

Data about {}

\ 7 |
Total accounts found: {}
'.format(username, username, totals)) 9 | css = CSS(string=''' 10 | .top { text-align: center; border-bottom: 2px dashed deepskyblue; padding: 5px; } 11 | p { font-family: mono; font-size: 12px; } 12 | h2,h3,h4 { font-family: "Andale Mono"; font-size: 14px; } 13 | ul,li { font-family: "Andale Mono"; font-size: 11px; letter-spacing: 0.08em; } 14 | ul { list-style: none; } 15 | ul { width: 500px; margin-bottom: 20px; border-top: 1px solid #ccc; } 16 | li { border-bottom: 1px solid #ccc; float: left; display: inline;} 17 | #double li { width:50%;} 18 | #triple li { width:33.333%; } 19 | #six li { width:16.666%; } 20 | #quad li { width:25%; } 21 | ''') 22 | html.write_pdf( 23 | '{}-report.pdf'.format(username), stylesheets=[css]) -------------------------------------------------------------------------------- /build/lib/spry/modules/spinner.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | def spinning_cursor(): 5 | while True: 6 | for cursor in '|/-\\': 7 | yield cursor 8 | 9 | def spinwhile(): 10 | spinner = spinning_cursor() 11 | try: 12 | sys.stdout.write(spinner.next()) 13 | except: 14 | sys.stdout.write(next(spinner)) # python 3 15 | sys.stdout.flush() 16 | time.sleep(0.1) 17 | sys.stdout.write('\b') 18 | 19 | 20 | -------------------------------------------------------------------------------- /build/lib/spry/modules/stuff.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | """spry.stuff: stuff module within the bootstrap package.""" 5 | 6 | 7 | class Stuff(object): 8 | pass 9 | -------------------------------------------------------------------------------- /build/lib/spry/spry.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | """bootstrap.bootstrap: provides entry point main().""" 5 | 6 | 7 | __version__ = "0.5.5" 8 | # spry social media scanner 9 | # 10 | # Spry is free software: you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation, either version 3 of the License, or 13 | # (at your option) any later version. 14 | # 15 | # Spry is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with Spry. If not, see . 22 | import sys 23 | cur_version = sys.version_info.major 24 | from time import sleep 25 | import argparse, requests 26 | from random import random, randint 27 | import random 28 | from clint.textui import progress # for the dots! 29 | from bs4 import BeautifulSoup, SoupStrainer # parse the html! 30 | try: from urllib.parse import urlparse # get domain names! 31 | except: 32 | from urlparse import urlparse 33 | cur_version = 2.7 34 | #sys.path.append(PYTHONPATH) 35 | from termcolor import * 36 | 37 | if int(cur_version) < 3: 38 | try: 39 | from .modules import stuff 40 | from .modules import core 41 | from .modules.pdf_maker import * 42 | from .modules.useragents import * 43 | except: 44 | from modules import stuff 45 | from modules import core 46 | from modules.pdf_maker import * 47 | from modules.useragents import * 48 | #exit('your python version is too old, please install python 3+ to get SPRY to work') 49 | else: 50 | try: 51 | from modules import stuff 52 | from modules import core 53 | from modules.pdf_maker import * 54 | from modules.useragents import * 55 | except: 56 | from spry.modules import stuff 57 | from spry.modules import core 58 | from spry.modules.pdf_maker import * 59 | from spry.modules.useragents import * 60 | 61 | 62 | welcomer = '\n++++++++++++++++++++++++++++\n+++ SPRY +++ WELCOME +++++++\n+++ s0c1@l m3d1a sc@nn3r +++\n++++++++++++++++++++++++++++\n' 63 | usingtor = False 64 | def main(): 65 | # welcome to the danger zone 66 | 67 | parser = argparse.ArgumentParser( 68 | # random comment here for no reason ;) 69 | formatter_class=argparse.RawTextHelpFormatter, 70 | prog='spry', 71 | description='++++++++++++++++++++++++++++\n+++ SPRY +++++++++++++++++++\n+++ s0c1@l m3d1a sc@nn3r +++\n++++++++++++++++++++++++++++', 72 | epilog = '''EXAMPLE: \n check instagram \n spry jamesanthonycampbell \n ''') 73 | 74 | parser.add_argument('username', help='specific username, like realdonaldtrump') 75 | 76 | parser.add_argument('-p', '--proxy', help='proxy in the form of 127.0.0.1:8118', 77 | nargs=1, dest='setproxy', required=False) 78 | 79 | parser.add_argument('-w', '--wait', help='max random wait time in seconds, \n5 second default (randomly wait 1-5 seconds)', 80 | dest='setwait', nargs='?',const=3,type=int,default=3) 81 | parser.add_argument('-u', '--user-agent', help='override random user-agent\n(by default randomly selects between \n+8500 different user agent strings', 82 | dest='useragent', nargs='?',const='u',default='u') 83 | parser.add_argument('--report', dest='reporting', action='store_true') 84 | parser.add_argument('-v','--verbose-useragent',dest='vu',action='store_true') 85 | parser.add_argument('--version', action='version', 86 | version='%(prog)s {version}'.format(version='Version: '+__version__)) 87 | parser.set_defaults(reporting=False,vu=False) 88 | args = parser.parse_args() 89 | cprint(welcomer,'red') 90 | # args strings 91 | username = args.username 92 | setproxy = args.setproxy 93 | # note, the correct way to check if variable is NoneType 94 | if setproxy != '' and setproxy is not None: 95 | proxyoverride = True 96 | if '9050' in setproxy[0] or '9150' or 'tor' in setproxy[0]: 97 | usingtor = True 98 | else: 99 | usingtor = False 100 | else: 101 | proxyoverride = False 102 | setwait = args.setwait 103 | reporting = args.reporting 104 | useragent = args.useragent 105 | vu = args.vu 106 | if useragent == 'u': 107 | overrideuseragent = False 108 | useragent = random.choice(useragents) # if user agent override not set, select random from list 109 | if vu: 110 | cprint('\nUseragent set as %s\n' % (useragent,),'blue') 111 | headers = {'User-Agent': useragent} 112 | i = 0 # counter for how many are 200's 113 | social_networks_list=['https://twitter.com/','https://www.instagram.com/','https://www.linkedin.com/in/','https://foursquare.com/','https://www.flickr.com/photos/','https://www.facebook.com/','https://www.reddit.com/user/','https://new.vk.com/','https://github.com/','https://ok.ru/','https://www.twitch.tv/','https://venmo.com/','http://www.goodreads.com/','http://www.last.fm/user/','https://api.spotify.com/v1/users/','https://www.pinterest.com/','https://keybase.io/','https://bitbucket.org/','https://pinboard.in/u:','https://disqus.com/by/','https://badoo.com/profile/','http://steamcommunity.com/id/','http://us.viadeo.com/en/profile/','https://www.periscope.tv/','https://www.researchgate.net/profile/','https://www.etsy.com/people/','https://myspace.com/','http://del.icio.us/','https://my.mail.ru/community/','https://www.xing.com/profile/'] 114 | totalnetworks = len(social_networks_list) # get the total networks to check 115 | print('\n\n[*] Starting to process list of {} social networks now [*]\n\n'.format(totalnetworks)) 116 | for soc in social_networks_list: 117 | # get domain name 118 | domainname = urlparse(soc).netloc 119 | domainnamelist = domainname.split('.') 120 | for domainer in domainnamelist: 121 | if len(domainer) > 3 and domainer != 'vk' and domainer != 'ok' and domainer != 'last' and domainer != 'mail': 122 | realdomain = domainer 123 | elif domainer == 'vk': 124 | realdomain = domainer 125 | elif domainer == 'ok': 126 | realdomain = domainer+'.ru' 127 | elif domainer == 'last': 128 | realdomain = domainer+'.fm' 129 | elif domainer == 'mail': 130 | realdomain = domainer+'.ru' 131 | # get proxy settings if any 132 | if proxyoverride == True: 133 | if usingtor: 134 | socks_proxy = "socks5://"+setproxy[0] 135 | proxyDict = { "http" : socks_proxy } 136 | else: 137 | #print(setproxy) 138 | http_proxy = "http://"+setproxy[0] 139 | https_proxy = "https://"+setproxy[0] 140 | proxyDict = { 141 | "http" : http_proxy, 142 | "https" : https_proxy 143 | } 144 | sleep(randint(1,setwait)) 145 | sys.stdout.flush() 146 | # try to load the social network for the respective user name 147 | # make sure to load proxy if proxy set otherwise don't pass a proxy arg 148 | # DONT FORGET TO HANDLE LOAD TIMEOUT ERRORS! - ADDED exception handlers finally 2-5-2017 JC 149 | if proxyoverride == True: 150 | try: 151 | r=requests.get(soc+username,stream=True, headers=headers, proxies=proxyDict) 152 | except requests.Timeout as err: 153 | print(err) 154 | continue 155 | except requests.RequestException as err: 156 | print(err) 157 | continue 158 | else: 159 | try: 160 | r=requests.get(soc+username,stream=True, headers=headers) 161 | except requests.Timeout as err: 162 | print(err) 163 | continue 164 | except requests.RequestException as err: 165 | print(err) 166 | continue 167 | # switch user agents again my friend 168 | if overrideuseragent == False: 169 | useragent = random.choice(useragents) 170 | # if user agent override not set, select random from list 171 | if vu: # if verbose output then print the user agent string 172 | cprint('\nUseragent set as %s\n' % (useragent,),'blue') 173 | if soc == 'https://www.instagram.com/' and r.status_code == 200: 174 | #print(r.text) 175 | soup = BeautifulSoup(r.content,'html.parser') 176 | aa = soup.find("meta", {"property":"og:image"}) 177 | # test instagram profile image print 178 | #print (aa['content']) # this is the instagram profile image 179 | instagram_profile_img = requests.get(aa['content']) # get instagram profile pic 180 | open('./'+username+'.jpg' , 'wb').write(instagram_profile_img.content) 181 | #exit() 182 | try: 183 | total_length = int(r.headers.get('content-length')) 184 | except: 185 | total_length = 102399 186 | for chunk in progress.dots(r.iter_content(chunk_size=1024),label='Loading '+realdomain): 187 | sleep(random.random() * 0.2) 188 | if chunk: 189 | #sys.stdout.write(str(chunk)) 190 | sys.stdout.flush() 191 | sys.stdout.flush() 192 | #print(r.text) 193 | if r.status_code == 200: 194 | cprint("user found @ {}".format(soc+username),'green') 195 | i = i+1 196 | else: 197 | cprint("Status code: {} no user found".format(r.status_code),'red') 198 | print('\n\n[*] Total networks with username found: {} [*]\n'.format(i)) 199 | if reporting: # if pdf reporting is turned on (default on) 200 | create_pdf(username, i) 201 | cprint('Report saved as {}-report.pdf. \nTo turn off this feature dont pass in the --report flag.\n'.format(username),'yellow') 202 | class Boo(stuff.Stuff): 203 | pass 204 | 205 | if __name__ == '__main__': 206 | main() 207 | -------------------------------------------------------------------------------- /docs/about.md: -------------------------------------------------------------------------------- 1 | # ABOUT SPRY 2 | 3 | A tool designed by James Campbell. A technologist living in DC. 4 | 5 | ## CONTACT 6 | 7 | CONTACT JAMES SECURELY USING PGP: 8 | 9 | ADD JAMES's PUBLIC KEY 10 | 11 | ``` 12 | -----BEGIN PGP PUBLIC KEY BLOCK----- 13 | Comment: GPGTools - https://gpgtools.org 14 | 15 | mQINBFQa3UgBEAC+N456wLwylXZbW1Ab73ulim7KSprCIS5LtjzaG6FZ7VvTVeEJ 16 | QRQj8MHUpBVEninOYha/JPoTkAnXk9W2850lDw+j2V3dyxLX7ACAbzE7FvffSUEo 17 | mrXaINF0Jj8zkqNRZKt/icKC3MBrBYbh4/rwheqUM5RKfgbIk7ixZmde4CY2NO5h 18 | KATQjOxoeBGLYYuzS+BD3XfPLdXmCV18cGzkhD97yJYkF2buN+c7059ZCcRSFypJ 19 | IqaJCL2VeKaqwrzV9CrYu2tDjN8baqmbVH8WGB3iNMsbFH1oKkZo1iBVUvKmwIms 20 | fsJUHS8WV9XJEKX925EEAz5+L47+vCCd5Cx/1WPZ9/Zvxb+GoTNYaPUYfqU6y6OU 21 | BfK4btrCUXIfC8TtBt5R9m2CCD8BZJtlZCzRh0IAHApENkHOAZNDCwVD3ZOn4sOr 22 | lQNn1N+GQfKyzrci2pJ591VT7UERmJ4toDlMnoaQW3Dz2gjS0T2AvpkVZO6pjCsK 23 | 5R5B1+lS5sRXkaI+gTMvm/ZWWZxXgQaTYrG6sGHMfd0/ea1FJLt74lzQDDx6eNTb 24 | 86WroOBATBPlnL8hjw7eoOO1BB1Y1XAJTpIeKEkZ11O8/r2OpjsKbDPcnb10i8b+ 25 | LnXAh4UqnC+MQr+AEyzA0abWsjB4svzdEv9jQxqRhfIoTyUi2euBF3uoVQARAQAB 26 | tCdKYW1lcyBDYW1wYmVsbCA8amFtZXNAamFtZXNjYW1wYmVsbC51cz6JAj0EEwEK 27 | ACcFAlQa3UgCGwMFCQeGH4AFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQqvio 28 | a/DalRHt2Q//bkvk+eh8eIAoKKzMoxerbI086iUmbE+rx6ARo4CEA5YncLnb9HO2 29 | nyGud7jCRk/e12ysWeYxQ74v5o/EtRBwCu75wslnm08ooICFuwg2hHN+IrFuyPKI 30 | ZWJncjhaRS3QPmKCYteK4gJs4uEGVN4LPoUaK9utbHzR6yatN8U2V/TEkvaGLhGL 31 | wEq01x0XAuTWDBr++1K+4XUjmCiKm3GJf230iPADSRbRjf/qSFhlrBotXGWvhLex 32 | eQ9c6nuSt+M38TYBUZsLBHht0J8mHET6rrNeqFV7aADBJZWBGnYlbQTYkmyEgF8U 33 | vTKe7ZeDuA+kwY1xyzlf0dzh2CwOoJQMmVQi6qn4szSb8VYezBtGBjVoKecYsny8 34 | 0/VVwgRSxUlbW1VjsBOIWswsrlnGiEd+qHlq0qJQgIqvc2g7rx4JupwbFkNGWB9y 35 | tKWY9/afdpHVV0zhseLEp8bThvqvirJauEWJRh2stI9k+/zDDO0CLGcSIi6I+XcM 36 | she3hlWCvNK901YngAus39g/DZf2BJLEod2cfaGAoKL43EbW7ZbDF54WBCLBJW2P 37 | 0ZeVBMYBVW8RSoR0a7zf8sIuOvfImXQaaKwov7q4gpiYmhLVhJdzt+dCu642LYbI 38 | YlMMDuvI+JyOAPKprPAmnjuF3XkPEbzlHXOB1WiV3YBhXpc6lU/ormq0M2tleWJh 39 | c2UuaW8vamFtZXNjYW1wYmVsbCA8amFtZXNjYW1wYmVsbEBrZXliYXNlLmlvPokC 40 | LQQTAQoAFwUCVBrdSAIbAwMLCQcDFQoIAh4BAheAAAoJEKr4qGvw2pURRmoQAISE 41 | uMTY9pFdXXje9t2NIh76xfi57G9D9QSDsNeZkomkfFqx3SK/Y2MNVWTRLOfCNtLt 42 | dNcK3jo+V6ixOJYuRRuSyJKPYf5REjSzzQ4K5YY7tB+23JioHARjYx0fej6cyukD 43 | MBYabhjBwnPHOT+nmrPOtpg6HCbAuOVTblpba5AWOFGn6Dl5Tg18hZAl0bkJUmU/ 44 | zL2Nc8JGanf/2xp0B7vxFoyOFSzShDxGPoNNwSGFKqZueGt/DegNLz/UM/wyodlD 45 | vTj826uK+K+qQbavVpsr9/DURlLzc++LQPVN+oBUBqrV7aTWN4mxpwONHjFNy0sJ 46 | kRG6dl2sKrBln+s2kdku4ogZwBV+NIZKuOyDEaxmWAz3VQRQ2K+ANQnwIZje2VBB 47 | DASoAiyw1V4gQ4+5RAq3FMvuJm4JHMtHcpBX272QXJlzTdO77yOU9hYe197fBoGd 48 | WtNHetQbsFjwlwSeIaGoXxiZoPcGmw4M3SZ5IvA3pI8uoUuJwlh6FRUFNJm1TWH7 49 | 6ObaeZ19OoUoB7CnPcJDk71aBWOz2DzlK+F69l9hPcgoM0opr69LkAFLQR/bsj2c 50 | AkQI+0Ho9dcD+hyucuMBWxDLy1ss4zL/YArL1vYvsuBpbcankGzg6eDGZvjuaOL0 51 | vYz6+GRwFj/dsl1Avgi6Ebns2eiS5jdX6K4ejFsruQINBFQa3UgBEAClPZbQBPs0 52 | pbRVQWhv+h/1aNQhSib+ldfU08nbQDNr+d7YVEfgMiHFfKc/Y6Dm6Pwqe/KPAqKW 53 | snHeQX0t7OBvxbXOf86bEIbXmaveqDLLqbUzWtwPLyi5eIsPaso8Bk65O1p27o2o 54 | 9pVaiVXgfD1Zl5SP6IM+Ftt7I2T4M2Q7OgLQHtU6qD1r3sA1PdSJ4zVEOWApvZAy 55 | EkzdR/HNVco2KuscEavSUUS30rSWCD7L1NKCSRuzliuwGjes91s8S8VozV84u+vD 56 | Ykm5qo16qat8W9SeEJiVztHltV3vo6fkY08uT7B0QVrIh1vZxxa9oF97yFXEmAmr 57 | KbpPDpKPOOSAPx6UdKuKknqHOz6ZWRrTmVIfoHP/Mt6O52kWAqM5fKTyGTJUFDku 58 | FV5ItOw7bkWby1UyhIqbt8kUXWMg7njSVJ9Mi6OoHW/n0ioiffoIY+vQe0RWwXtF 59 | U+BRYnv/IKXcQJhxFzhogBKNOG2YEObq09LuspUcdSkOjwD6OYao9OO398c1s1xP 60 | JLRZJA2Z4taq0NP0TVXiUmsHzKr44U9MCJobJj9WKHqZygZzOpDgpqPyBbEHL+Ax 61 | qNLADWutRyI02AzYucovYoLdoiwAWj3AZxy+QkSqcfstPHdKSxxXJOuMQN9bYPK0 62 | CYBNBfM8hDeHZ4qbVvzZGJSIHCoAtljn3wARAQABiQIlBBgBCgAPBQJUGt1IAhsM 63 | BQkHhh+AAAoJEKr4qGvw2pURKswP/RVNR5ycaBH53r6fj0glUmNkit+uUd9mcGTr 64 | tj1SFppGRG/kXW26fRCsXO1oPoPFI/vB274Fo/3q/TFM9JK8PxN5XtrJqXq8rS+Z 65 | rj+RcYOl4zax0zUXJef0VcbipOsgPZniwPvl4i9ZDcCH2cyIRCnmPEb5TheVHJbU 66 | PGy4DuXSKphok0yrU3kU5XAFfOm5weeDv+zdbE5bcOO/+eMBMu2sTent/an59010 67 | JyPX5I8WICuDkkaoVOcCZN78vNQQKzLTbSZHlR9P3kedJdiGY3ISlbyjmae6k6Wu 68 | ywqwUIONY18Iyaf/J9IJzHE0yHNRqiNomk81GfSD7M93HAe47cIS+tVEoxoPpqlW 69 | P3Nco7/9moOOjLeZTgZGj6bFkomfn+J+8lOCfl+DD2mgmZBEM8UcHh+9TQLl7aiY 70 | EXvqEREgC5vMe7hUzBpLo1wcBriNAx2AbiS3uXuOjHG+zj4V4o43peBGW6GGBJ87 71 | 112J2rowMlaUcLAWQ89Sev37gKAdwU66VMPUWYlkR6r6bXrG5VnXC48gvkxAM1CY 72 | X7PAZCLMlWz/3HKy4LjCaZwjQOP+O8khYjYRANrv8s/z7Vqt/LYVcWf5C6rfD+I5 73 | iLupk/7nb5JkAPb931z767xOe8IBQgoAhrE0jkYh7arEtrD1JHv8iQen1khB+Yuh 74 | pGSs1L6C 75 | =Z6YI 76 | -----END PGP PUBLIC KEY BLOCK----- 77 | 78 | ``` 79 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | #SPRY 2 | 3 | social media intelligence from the command line 4 | 5 | ## OVERVIEW 6 | 7 | WARNING: 8 | 9 | this is in early beta, the PDF only includes a single instagram profile image if found, otherwise errors at end 10 | 11 | KEY FEATURES: 12 | 13 | 1. Saves profile images and content from each profile found in the directory that you ran the command from. 14 | 2. Puts all found data into a single PDF (username-report.pdf) in the directory that you ran the command from. 15 | 3. Progress DOTS and nice COLOURS assuming your terminal supports it. 16 | 4. Randomized pausing between lookups so you don't get blocked. 17 | 5. Randomized list of +8500 User Agent strings in use by default (can override via -u arg). 18 | 6. Proxy override via -p arg. 19 | 7. OVER 30 SOCIAL MEDIA ACCOUNT PROFILES AUTO-MAGICALLY CHECKED & SAVED 20 | 21 | ## EXAMPLES 22 | 23 | _run via tor and check for username pooman_ 24 | `spry pooman -p 127.0.0.1:9050` 25 | 26 | _run without spitting out a PDF report at the end_ 27 | `spry pooman --no-report` 28 | 29 | _run setting the random wait to be 1 to 10 seconds between calls_ 30 | `spry pooman -w 10` 31 | 32 | _run and print out extra info including the user agent used for each request_ 33 | `spry pooman -v` 34 | 35 | _run and override random user agent to specific one_ 36 | `spry pooman -u MY COOL USERAGENT STRING NOT A BOT` 37 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: SPRY 2 | pages: 3 | - Home: index.md 4 | - About: about.md 5 | theme: readthedocs 6 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests # the best way to load URLS 2 | clint # to do the cool dots while waiting 3 | fpdf # to generate a PDF report! 4 | bs4 # to parse data from profile pages 5 | termcolor # for fun colours! 6 | pysocks # for tor proxy support 7 | weasyprint 8 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | # This flag says that the code is written to work on both Python 2 and Python 3 | # 3. If at all possible, it is good practice to do this. If you cannot, you 4 | # will need to generate wheels for each Python version that you support. 5 | universal=1 6 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # spry social media scanner 3 | # 4 | # Spry is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # Spry is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with Spry. If not, see . 16 | 17 | import re 18 | from setuptools import setup, find_packages 19 | #from distutils.core import setup 20 | import codecs 21 | try: 22 | codecs.lookup('mbcs') 23 | except LookupError: 24 | ascii = codecs.lookup('ascii') 25 | func = lambda name, enc=ascii: {True: enc}.get(name=='mbcs') 26 | codecs.register(func) 27 | 28 | version = re.search( 29 | '^__version__\s*=\s*"(.*)"', 30 | open('spry/spry.py').read(), 31 | re.M 32 | ).group(1) 33 | 34 | 35 | with open("README.rst", "rb") as f: 36 | long_descr = f.read().decode("utf-8") 37 | 38 | 39 | setup( 40 | name = "spry", 41 | packages = ['spry','spry.modules'], 42 | install_requires=[ 43 | 'requests', # the best way to load URLS 44 | 'clint', # to do the cool dots while waiting 45 | 'fpdf', # to generate a PDF report! 46 | 'bs4', # to parse data from profile pages 47 | 'termcolor', # for fun colours! 48 | 'pysocks', # for tor proxy support 49 | 'weasyprint', 50 | ], 51 | license = "GNU", 52 | entry_points = { 53 | "console_scripts": ['spry = spry.spry:main'] 54 | }, 55 | version = version, 56 | description = "social media scanner", 57 | long_description = long_descr, 58 | author = "James A. Campbell", 59 | author_email = "james@jamescampbell.us", 60 | url = "https://github.com/jamesacampbell/spry", 61 | download_url = "https://github.com/jamesacampbell/spry/tarball/"+version, 62 | keywords = ['social', 'collector', 'scraper'], # arbitrary keywords 63 | classifiers=[ 64 | 'Development Status :: 4 - Beta', 65 | 'Environment :: Console', 66 | 'Programming Language :: Python', 67 | "Operating System :: OS Independent", 68 | 'Programming Language :: Python :: 3', 69 | 'Programming Language :: Python :: 3.4', 70 | 'Programming Language :: Python :: 3.5'], 71 | ) 72 | -------------------------------------------------------------------------------- /site/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/james-see/spry/43cb502acf114e5872f3d86cf4873575552eef26/site/__init__.py -------------------------------------------------------------------------------- /site/about/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | About - SPRY 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 82 | 83 |
84 | 85 | 86 | 90 | 91 | 92 |
93 |
94 |
95 |
    96 |
  • Docs »
  • 97 | 98 | 99 | 100 |
  • About
  • 101 |
  • 102 | 103 |
  • 104 |
105 |
106 |
107 |
108 |
109 | 110 |

hello again

111 | 112 |
113 |
114 |
115 | 116 | 122 | 123 | 124 |
125 | 126 |
127 | 128 | 129 |
130 | 131 | Built with MkDocs using a theme provided by Read the Docs. 132 |
133 | 134 |
135 |
136 | 137 |
138 | 139 |
140 | 141 |
142 | 143 | 144 | 145 | « Previous 146 | 147 | 148 | 149 |
150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /site/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {% if page_description %}{% endif %} 9 | {% if site_author %}{% endif %} 10 | {% block htmltitle %} 11 | {% if page_title %}{{ page_title }} - {% endif %}{{ site_name }} 12 | {% endblock %} 13 | 14 | {% if favicon %} 15 | {% else %}{% endif %} 16 | 17 | {# CSS #} 18 | 19 | 20 | 21 | 22 | 23 | {%- for path in extra_css %} 24 | 25 | {%- endfor %} 26 | 27 | {% if current_page %} 28 | 34 | {% endif %} 35 | 36 | 37 | 38 | 39 | 40 | {%- block extrahead %} {% endblock %} 41 | 42 | {%- for path in extra_javascript %} 43 | 44 | {%- endfor %} 45 | 46 | {% if google_analytics %} 47 | 56 | {% endif %} 57 | 58 | 59 | 60 | 61 |
62 | 63 | {# SIDE NAV, TOGGLES ON MOBILE #} 64 | 79 | 80 |
81 | 82 | {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #} 83 | 87 | 88 | {# PAGE CONTENT #} 89 |
90 |
91 | {% include "breadcrumbs.html" %} 92 |
93 |
94 | {% block content %} 95 | {{ content }} 96 | {% endblock %} 97 |
98 |
99 | {%- block footer %} 100 | {% include "footer.html" %} 101 | {% endblock %} 102 |
103 |
104 | 105 |
106 | 107 |
108 | 109 | {% include "versions.html" %} 110 | 111 | 112 | 113 | {% if current_page and current_page.is_homepage %} 114 | 118 | {% endif %} 119 | -------------------------------------------------------------------------------- /site/breadcrumbs.html: -------------------------------------------------------------------------------- 1 |
2 |
    3 |
  • Docs »
  • 4 | {% if current_page %} 5 | {% for doc in current_page.ancestors %} 6 | {% if doc.link %} 7 |
  • {{ doc.title }} »
  • 8 | {% else %} 9 |
  • {{ doc.title }} »
  • 10 | {% endif %} 11 | {% endfor %} 12 | {% endif %} 13 | {% if current_page %}
  • {{ current_page.title }}
  • {% endif %} 14 |
  • 15 | {% if repo_url %} 16 | {% if repo_name == 'GitHub' %} 17 | Edit on GitHub 18 | {% elif repo_name == 'Bitbucket' %} 19 | Edit on BitBucket 20 | {% endif %} 21 | {% endif %} 22 |
  • 23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /site/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* 2 | This is the GitHub theme for highlight.js 3 | 4 | github.com style (c) Vasily Polovnyov 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | color: #333; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-comment, 17 | .diff .hljs-header, 18 | .hljs-javadoc { 19 | color: #998; 20 | font-style: italic; 21 | } 22 | 23 | .hljs-keyword, 24 | .css .rule .hljs-keyword, 25 | .hljs-winutils, 26 | .nginx .hljs-title, 27 | .hljs-subst, 28 | .hljs-request, 29 | .hljs-status { 30 | color: #333; 31 | font-weight: bold; 32 | } 33 | 34 | .hljs-number, 35 | .hljs-hexcolor, 36 | .ruby .hljs-constant { 37 | color: #008080; 38 | } 39 | 40 | .hljs-string, 41 | .hljs-tag .hljs-value, 42 | .hljs-phpdoc, 43 | .hljs-dartdoc, 44 | .tex .hljs-formula { 45 | color: #d14; 46 | } 47 | 48 | .hljs-title, 49 | .hljs-id, 50 | .scss .hljs-preprocessor { 51 | color: #900; 52 | font-weight: bold; 53 | } 54 | 55 | .hljs-list .hljs-keyword, 56 | .hljs-subst { 57 | font-weight: normal; 58 | } 59 | 60 | .hljs-class .hljs-title, 61 | .hljs-type, 62 | .vhdl .hljs-literal, 63 | .tex .hljs-command { 64 | color: #458; 65 | font-weight: bold; 66 | } 67 | 68 | .hljs-tag, 69 | .hljs-tag .hljs-title, 70 | .hljs-rule .hljs-property, 71 | .django .hljs-tag .hljs-keyword { 72 | color: #000080; 73 | font-weight: normal; 74 | } 75 | 76 | .hljs-attribute, 77 | .hljs-variable, 78 | .lisp .hljs-body, 79 | .hljs-name { 80 | color: #008080; 81 | } 82 | 83 | .hljs-regexp { 84 | color: #009926; 85 | } 86 | 87 | .hljs-symbol, 88 | .ruby .hljs-symbol .hljs-string, 89 | .lisp .hljs-keyword, 90 | .clojure .hljs-keyword, 91 | .scheme .hljs-keyword, 92 | .tex .hljs-special, 93 | .hljs-prompt { 94 | color: #990073; 95 | } 96 | 97 | .hljs-built_in { 98 | color: #0086b3; 99 | } 100 | 101 | .hljs-preprocessor, 102 | .hljs-pragma, 103 | .hljs-pi, 104 | .hljs-doctype, 105 | .hljs-shebang, 106 | .hljs-cdata { 107 | color: #999; 108 | font-weight: bold; 109 | } 110 | 111 | .hljs-deletion { 112 | background: #fdd; 113 | } 114 | 115 | .hljs-addition { 116 | background: #dfd; 117 | } 118 | 119 | .diff .hljs-change { 120 | background: #0086b3; 121 | } 122 | 123 | .hljs-chunk { 124 | color: #aaa; 125 | } 126 | -------------------------------------------------------------------------------- /site/css/theme_extra.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Tweak the overal size to better match RTD. 3 | */ 4 | html { 5 | font-size: 90%; 6 | } 7 | 8 | h3, h4, h5, h6 { 9 | color: #2980b9; 10 | font-weight: 300 11 | } 12 | 13 | /* 14 | * Sphinx doesn't have support for section dividers like we do in 15 | * MkDocs, this styles the section titles in the nav 16 | * 17 | * https://github.com/mkdocs/mkdocs/issues/175 18 | */ 19 | .wy-menu-vertical span { 20 | line-height: 18px; 21 | padding: 0.4045em 1.618em; 22 | display: block; 23 | position: relative; 24 | font-size: 90%; 25 | color: #838383; 26 | } 27 | 28 | .wy-menu-vertical .subnav a { 29 | padding: 0.4045em 2.427em; 30 | } 31 | 32 | /* 33 | * Long navigations run off the bottom of the screen as the nav 34 | * area doesn't scroll. 35 | * 36 | * https://github.com/mkdocs/mkdocs/pull/202 37 | */ 38 | .wy-nav-side { 39 | height: 100%; 40 | overflow-y: auto; 41 | } 42 | 43 | /* 44 | * readthedocs theme hides nav items when the window height is 45 | * too small to contain them. 46 | * 47 | * https://github.com/mkdocs/mkdocs/issues/#348 48 | */ 49 | .wy-menu-vertical ul { 50 | margin-bottom: 2em; 51 | } 52 | 53 | /* 54 | * Fix wrapping in the code highlighting 55 | * 56 | * https://github.com/mkdocs/mkdocs/issues/233 57 | */ 58 | code { 59 | white-space: pre; 60 | } 61 | 62 | /* 63 | * Wrap inline code samples otherwise they shoot of the side and 64 | * can't be read at all. 65 | * 66 | * https://github.com/mkdocs/mkdocs/issues/313 67 | */ 68 | p code { 69 | word-wrap: break-word; 70 | } 71 | 72 | /* 73 | * The CSS classes from highlight.js seem to clash with the 74 | * ReadTheDocs theme causing some code to be incorrectly made 75 | * bold and italic. 76 | * 77 | * https://github.com/mkdocs/mkdocs/issues/411 78 | */ 79 | code.cs, code.c { 80 | font-weight: inherit; 81 | font-style: inherit; 82 | } 83 | 84 | /* 85 | * Fix some issues with the theme and non-highlighted code 86 | * samples. Without and highlighting styles attached the 87 | * formatting is broken. 88 | * 89 | * https://github.com/mkdocs/mkdocs/issues/319 90 | */ 91 | .no-highlight { 92 | display: block; 93 | padding: 0.5em; 94 | color: #333; 95 | } 96 | 97 | 98 | /* 99 | * Additions specific to the search functionality provided by MkDocs 100 | */ 101 | 102 | #mkdocs-search-results article h3 103 | { 104 | margin-top: 23px; 105 | border-top: 1px solid #E1E4E5; 106 | padding-top: 24px; 107 | } 108 | 109 | #mkdocs-search-results article:first-child h3 { 110 | border-top: none; 111 | } 112 | 113 | #mkdocs-search-query{ 114 | width: 100%; 115 | border-radius: 50px; 116 | padding: 6px 12px; 117 | border-color: #D1D4D5; 118 | } 119 | 120 | .wy-menu-vertical li ul { 121 | display: inherit; 122 | } 123 | 124 | .wy-menu-vertical li ul.subnav ul.subnav{ 125 | padding-left: 1em; 126 | } 127 | 128 | 129 | /* 130 | * Improve inline code blocks within admonitions. 131 | * 132 | * https://github.com/mkdocs/mkdocs/issues/656 133 | */ 134 | div.admonition code { 135 | color: #404040; 136 | border: 1px solid rgba(0, 0, 0, 0.2); 137 | background: rgba(255, 255, 255, 0.7); 138 | } 139 | -------------------------------------------------------------------------------- /site/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/james-see/spry/43cb502acf114e5872f3d86cf4873575552eef26/site/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /site/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/james-see/spry/43cb502acf114e5872f3d86cf4873575552eef26/site/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /site/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/james-see/spry/43cb502acf114e5872f3d86cf4873575552eef26/site/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /site/footer.html: -------------------------------------------------------------------------------- 1 |
2 | {% if next_page or previous_page %} 3 | 11 | {% endif %} 12 | 13 |
14 | 15 |
16 | 17 | {% if copyright %} 18 |

{{ copyright }}

19 | {% endif %} 20 |
21 | 22 | Built with MkDocs using a theme provided by Read the Docs. 23 |
24 | -------------------------------------------------------------------------------- /site/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/james-see/spry/43cb502acf114e5872f3d86cf4873575552eef26/site/img/favicon.ico -------------------------------------------------------------------------------- /site/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | SPRY 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 82 | 83 |
84 | 85 | 86 | 90 | 91 | 92 |
93 |
94 |
95 |
    96 |
  • Docs »
  • 97 | 98 | 99 | 100 |
  • Home
  • 101 |
  • 102 | 103 |
  • 104 |
105 |
106 |
107 |
108 |
109 | 110 |

hello

111 | 112 |
113 |
114 |
115 | 116 | 122 | 123 | 124 |
125 | 126 |
127 | 128 | 129 |
130 | 131 | Built with MkDocs using a theme provided by Read the Docs. 132 |
133 | 134 |
135 |
136 | 137 |
138 | 139 |
140 | 141 |
142 | 143 | 144 | 145 | 146 | Next » 147 | 148 | 149 |
150 | 151 | 152 | 153 | 154 | 158 | -------------------------------------------------------------------------------- /site/js/modernizr-2.8.3.min.js: -------------------------------------------------------------------------------- 1 | window.Modernizr=function(e,t,n){function r(e){b.cssText=e}function o(e,t){return r(S.join(e+";")+(t||""))}function a(e,t){return typeof e===t}function i(e,t){return!!~(""+e).indexOf(t)}function c(e,t){for(var r in e){var o=e[r];if(!i(o,"-")&&b[o]!==n)return"pfx"==t?o:!0}return!1}function s(e,t,r){for(var o in e){var i=t[e[o]];if(i!==n)return r===!1?e[o]:a(i,"function")?i.bind(r||t):i}return!1}function u(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),o=(e+" "+k.join(r+" ")+r).split(" ");return a(t,"string")||a(t,"undefined")?c(o,t):(o=(e+" "+T.join(r+" ")+r).split(" "),s(o,t,n))}function l(){p.input=function(n){for(var r=0,o=n.length;o>r;r++)j[n[r]]=!!(n[r]in E);return j.list&&(j.list=!(!t.createElement("datalist")||!e.HTMLDataListElement)),j}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),p.inputtypes=function(e){for(var r,o,a,i=0,c=e.length;c>i;i++)E.setAttribute("type",o=e[i]),r="text"!==E.type,r&&(E.value=x,E.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(o)&&E.style.WebkitAppearance!==n?(g.appendChild(E),a=t.defaultView,r=a.getComputedStyle&&"textfield"!==a.getComputedStyle(E,null).WebkitAppearance&&0!==E.offsetHeight,g.removeChild(E)):/^(search|tel)$/.test(o)||(r=/^(url|email)$/.test(o)?E.checkValidity&&E.checkValidity()===!1:E.value!=x)),P[e[i]]=!!r;return P}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d,f,m="2.8.3",p={},h=!0,g=t.documentElement,v="modernizr",y=t.createElement(v),b=y.style,E=t.createElement("input"),x=":)",w={}.toString,S=" -webkit- -moz- -o- -ms- ".split(" "),C="Webkit Moz O ms",k=C.split(" "),T=C.toLowerCase().split(" "),N={svg:"http://www.w3.org/2000/svg"},M={},P={},j={},$=[],D=$.slice,F=function(e,n,r,o){var a,i,c,s,u=t.createElement("div"),l=t.body,d=l||t.createElement("body");if(parseInt(r,10))for(;r--;)c=t.createElement("div"),c.id=o?o[r]:v+(r+1),u.appendChild(c);return a=["­",'"].join(""),u.id=v,(l?u:d).innerHTML+=a,d.appendChild(u),l||(d.style.background="",d.style.overflow="hidden",s=g.style.overflow,g.style.overflow="hidden",g.appendChild(d)),i=n(u,e),l?u.parentNode.removeChild(u):(d.parentNode.removeChild(d),g.style.overflow=s),!!i},z=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t)&&n(t).matches||!1;var r;return F("@media "+t+" { #"+v+" { position: absolute; } }",function(t){r="absolute"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position}),r},A=function(){function e(e,o){o=o||t.createElement(r[e]||"div"),e="on"+e;var i=e in o;return i||(o.setAttribute||(o=t.createElement("div")),o.setAttribute&&o.removeAttribute&&(o.setAttribute(e,""),i=a(o[e],"function"),a(o[e],"undefined")||(o[e]=n),o.removeAttribute(e))),o=null,i}var r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return e}(),L={}.hasOwnProperty;f=a(L,"undefined")||a(L.call,"undefined")?function(e,t){return t in e&&a(e.constructor.prototype[t],"undefined")}:function(e,t){return L.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=D.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=t.prototype;var a=new o,i=t.apply(a,n.concat(D.call(arguments)));return Object(i)===i?i:a}return t.apply(e,n.concat(D.call(arguments)))};return r}),M.flexbox=function(){return u("flexWrap")},M.flexboxlegacy=function(){return u("boxDirection")},M.canvas=function(){var e=t.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},M.canvastext=function(){return!(!p.canvas||!a(t.createElement("canvas").getContext("2d").fillText,"function"))},M.webgl=function(){return!!e.WebGLRenderingContext},M.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:F(["@media (",S.join("touch-enabled),("),v,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=9===e.offsetTop}),n},M.geolocation=function(){return"geolocation"in navigator},M.postmessage=function(){return!!e.postMessage},M.websqldatabase=function(){return!!e.openDatabase},M.indexedDB=function(){return!!u("indexedDB",e)},M.hashchange=function(){return A("hashchange",e)&&(t.documentMode===n||t.documentMode>7)},M.history=function(){return!(!e.history||!history.pushState)},M.draganddrop=function(){var e=t.createElement("div");return"draggable"in e||"ondragstart"in e&&"ondrop"in e},M.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e},M.rgba=function(){return r("background-color:rgba(150,255,150,.5)"),i(b.backgroundColor,"rgba")},M.hsla=function(){return r("background-color:hsla(120,40%,100%,.5)"),i(b.backgroundColor,"rgba")||i(b.backgroundColor,"hsla")},M.multiplebgs=function(){return r("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(b.background)},M.backgroundsize=function(){return u("backgroundSize")},M.borderimage=function(){return u("borderImage")},M.borderradius=function(){return u("borderRadius")},M.boxshadow=function(){return u("boxShadow")},M.textshadow=function(){return""===t.createElement("div").style.textShadow},M.opacity=function(){return o("opacity:.55"),/^0.55$/.test(b.opacity)},M.cssanimations=function(){return u("animationName")},M.csscolumns=function(){return u("columnCount")},M.cssgradients=function(){var e="background-image:",t="gradient(linear,left top,right bottom,from(#9f9),to(white));",n="linear-gradient(left top,#9f9, white);";return r((e+"-webkit- ".split(" ").join(t+e)+S.join(n+e)).slice(0,-e.length)),i(b.backgroundImage,"gradient")},M.cssreflections=function(){return u("boxReflect")},M.csstransforms=function(){return!!u("transform")},M.csstransforms3d=function(){var e=!!u("perspective");return e&&"webkitPerspective"in g.style&&F("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){e=9===t.offsetLeft&&3===t.offsetHeight}),e},M.csstransitions=function(){return u("transition")},M.fontface=function(){var e;return F('@font-face {font-family:"font";src:url("https://")}',function(n,r){var o=t.getElementById("smodernizr"),a=o.sheet||o.styleSheet,i=a?a.cssRules&&a.cssRules[0]?a.cssRules[0].cssText:a.cssText||"":"";e=/src/i.test(i)&&0===i.indexOf(r.split(" ")[0])}),e},M.generatedcontent=function(){var e;return F(["#",v,"{font:0/0 a}#",v,':after{content:"',x,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){e=t.offsetHeight>=3}),e},M.video=function(){var e=t.createElement("video"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(r){}return n},M.audio=function(){var e=t.createElement("audio"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(r){}return n},M.localstorage=function(){try{return localStorage.setItem(v,v),localStorage.removeItem(v),!0}catch(e){return!1}},M.sessionstorage=function(){try{return sessionStorage.setItem(v,v),sessionStorage.removeItem(v),!0}catch(e){return!1}},M.webworkers=function(){return!!e.Worker},M.applicationcache=function(){return!!e.applicationCache},M.svg=function(){return!!t.createElementNS&&!!t.createElementNS(N.svg,"svg").createSVGRect},M.inlinesvg=function(){var e=t.createElement("div");return e.innerHTML="",(e.firstChild&&e.firstChild.namespaceURI)==N.svg},M.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(w.call(t.createElementNS(N.svg,"animate")))},M.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(w.call(t.createElementNS(N.svg,"clipPath")))};for(var H in M)f(M,H)&&(d=H.toLowerCase(),p[d]=M[H](),$.push((p[d]?"":"no-")+d));return p.input||l(),p.addTest=function(e,t){if("object"==typeof e)for(var r in e)f(e,r)&&p.addTest(r,e[r]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof h&&h&&(g.className+=" "+(t?"":"no-")+e),p[e]=t}return p},r(""),y=E=null,function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=v[e[h]];return t||(t={},g++,e[h]=g,v[g]=t),t}function a(e,n,r){if(n||(n=t),l)return n.createElement(e);r||(r=o(n));var a;return a=r.cache[e]?r.cache[e].cloneNode():p.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!a.canHaveChildren||m.test(e)||a.tagUrn?a:r.frag.appendChild(a)}function i(e,n){if(e||(e=t),l)return e.createDocumentFragment();n=n||o(e);for(var a=n.frag.cloneNode(),i=0,c=r(),s=c.length;s>i;i++)a.createElement(c[i]);return a}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function s(e){e||(e=t);var r=o(e);return!y.shivCSS||u||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||c(e,r),e}var u,l,d="3.7.0",f=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",g=0,v={};!function(){try{var e=t.createElement("a");e.innerHTML="",u="hidden"in e,l=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){u=!0,l=!0}}();var y={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:d,shivCSS:f.shivCSS!==!1,supportsUnknownElements:l,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:s,createElement:a,createDocumentFragment:i};e.html5=y,s(t)}(this,t),p._version=m,p._prefixes=S,p._domPrefixes=T,p._cssomPrefixes=k,p.mq=z,p.hasEvent=A,p.testProp=function(e){return c([e])},p.testAllProps=u,p.testStyles=F,p.prefixed=function(e,t,n){return t?u(e,t,n):u(e,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(h?" js "+$.join(" "):""),p}(this,this.document); -------------------------------------------------------------------------------- /site/js/theme.js: -------------------------------------------------------------------------------- 1 | $( document ).ready(function() { 2 | 3 | // Shift nav in mobile when clicking the menu. 4 | $(document).on('click', "[data-toggle='wy-nav-top']", function() { 5 | $("[data-toggle='wy-nav-shift']").toggleClass("shift"); 6 | $("[data-toggle='rst-versions']").toggleClass("shift"); 7 | }); 8 | 9 | // Close menu when you click a link. 10 | $(document).on('click', ".wy-menu-vertical .current ul li a", function() { 11 | $("[data-toggle='wy-nav-shift']").removeClass("shift"); 12 | $("[data-toggle='rst-versions']").toggleClass("shift"); 13 | }); 14 | 15 | $(document).on('click', "[data-toggle='rst-current-version']", function() { 16 | $("[data-toggle='rst-versions']").toggleClass("shift-up"); 17 | }); 18 | 19 | // Make tables responsive 20 | $("table.docutils:not(.field-list)").wrap("
"); 21 | 22 | hljs.initHighlightingOnLoad(); 23 | 24 | $('table').addClass('docutils'); 25 | }); 26 | 27 | window.SphinxRtdTheme = (function (jquery) { 28 | var stickyNav = (function () { 29 | var navBar, 30 | win, 31 | stickyNavCssClass = 'stickynav', 32 | applyStickNav = function () { 33 | if (navBar.height() <= win.height()) { 34 | navBar.addClass(stickyNavCssClass); 35 | } else { 36 | navBar.removeClass(stickyNavCssClass); 37 | } 38 | }, 39 | enable = function () { 40 | applyStickNav(); 41 | win.on('resize', applyStickNav); 42 | }, 43 | init = function () { 44 | navBar = jquery('nav.wy-nav-side:first'); 45 | win = jquery(window); 46 | }; 47 | jquery(init); 48 | return { 49 | enable : enable 50 | }; 51 | }()); 52 | return { 53 | StickyNav : stickyNav 54 | }; 55 | }($)); 56 | -------------------------------------------------------------------------------- /site/mkdocs/js/lunr-0.5.7.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.7 3 | * Copyright (C) 2014 Oliver Nightingale 4 | * MIT Licensed 5 | * @license 6 | */ 7 | !function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.5.7",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(t){if(!arguments.length||null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return t.toLowerCase()});for(var e=t.toString().replace(/^\s+/,""),n=e.length-1;n>=0;n--)if(/\S/.test(e.charAt(n))){e=e.substring(0,n+1);break}return e.split(/(?:\s+|\-)/).filter(function(t){return!!t}).map(function(t){return t.toLowerCase()})},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e)+1;this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,o=0;n>o;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;for(var o=i,r=i.next;void 0!=r;){if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(t){~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t)},this),this.length=this.elements.length},t.SortedSet.prototype.toArray=function(){return this.elements.slice()},t.SortedSet.prototype.map=function(t,e){return this.elements.map(t,e)},t.SortedSet.prototype.forEach=function(t,e){return this.elements.forEach(t,e)},t.SortedSet.prototype.indexOf=function(t,e,n){var e=e||0,n=n||this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return 1>=i?r===t?o:-1:t>r?this.indexOf(t,o,n):r>t?this.indexOf(t,e,o):r===t?o:void 0},t.SortedSet.prototype.locationFor=function(t,e,n){var e=e||0,n=n||this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];if(1>=i){if(r>t)return o;if(t>r)return o+1}return t>r?this.locationFor(t,o,n):r>t?this.locationFor(t,e,o):void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.tokenStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,u=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),u=1,l=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);u=1/Math.log(c)}return r>-1&&i.insert(r,a*s*u),Object.keys(h.tokenStore.get(o)).forEach(function(t){l.add(t)}),n.union(l)},new t.SortedSet);o.push(u)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,u="^("+o+")?"+i,l=new RegExp(s),c=new RegExp(h),p=new RegExp(a),f=new RegExp(u),d=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,g=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,O=/^(.+?)(s|t)(ion)$/,F=/^(.+?)e$/,P=/ll$/,T=new RegExp("^"+o+i+"[^aeiouwxy]$"),$=function(n){var i,o,r,s,a,h,u;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=d,a=v,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=m,a=g,s.test(n)){var $=s.exec(n);s=l,s.test($[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var $=a.exec(n);i=$[1],a=f,a.test(i)&&(n=i,a=S,h=w,u=x,a.test(n)?n+="e":h.test(n)?(s=y,n=n.replace(s,"")):u.test(n)&&(n+="e"))}if(s=k,s.test(n)){var $=s.exec(n);i=$[1],n=i+"i"}if(s=b,s.test(n)){var $=s.exec(n);i=$[1],o=$[2],s=l,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var $=s.exec(n);i=$[1],o=$[2],s=l,s.test(i)&&(n=i+e[o])}if(s=_,a=O,s.test(n)){var $=s.exec(n);i=$[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var $=a.exec(n);i=$[1]+$[2],a=c,a.test(i)&&(n=i)}if(s=F,s.test(n)){var $=s.exec(n);i=$[1],s=c,a=p,h=T,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return $}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return-1===t.stopWordFilter.stopWords.indexOf(e)?e:void 0},t.stopWordFilter.stopWords=new t.SortedSet,t.stopWordFilter.stopWords.length=119,t.stopWordFilter.stopWords.elements=["","a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"],t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n":">",'"':""","'":"'","/":"/"};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tags){if(typeof tags==="string")tags=tags.split(spaceRe,2);if(!isArray(tags)||tags.length!==2)throw new Error("Invalid tags: "+tags);openingTagRe=new RegExp(escapeRegExp(tags[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tags[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tags[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function(){return this.tail===""};Scanner.prototype.scan=function(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function(view){return new Context(view,this)};Context.prototype.lookup=function(name){var cache=this.cache;var value;if(name in cache){value=cache[name]}else{var context=this,names,index,lookupHit=false;while(context){if(name.indexOf(".")>0){value=context.view;names=name.split(".");index=0;while(value!=null&&index")value=this._renderPartial(token,context,partials,originalTemplate);else if(symbol==="&")value=this._unescapedValue(token,context);else if(symbol==="name")value=this._escapedValue(token,context);else if(symbol==="text")value=this._rawValue(token);if(value!==undefined)buffer+=value}return buffer};Writer.prototype._renderSection=function(token,context,partials,originalTemplate){var self=this;var buffer="";var value=context.lookup(token[1]);function subRender(template){return self.render(template,context,partials)}if(!value)return;if(isArray(value)){for(var j=0,valueLength=value.length;jthis.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&& 19 | (f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a= 20 | this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f); 21 | if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval", 22 | "fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b, 23 | a);this.check()}));this.errback?q(a,"error",u(this,this.errback)):this.events.error&&q(a,"error",u(this,function(a){this.emit("error",a)}))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b, 24 | registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p,nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a); 25 | b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b,a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n, 26 | q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=!0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d, 27 | e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!==e&&(!("."===k||".."===k)||1e.attachEvent.toString().indexOf("[native code"))&& 34 | !Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"), 35 | s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"=== 36 | b.readyState)return N=b}),e=N;e&&(b||(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this); 37 | -------------------------------------------------------------------------------- /site/mkdocs/js/search-results-template.mustache: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /site/mkdocs/js/search.js: -------------------------------------------------------------------------------- 1 | require([ 2 | base_url + '/mkdocs/js/mustache.min.js', 3 | base_url + '/mkdocs/js/lunr-0.5.7.min.js', 4 | 'text!search-results-template.mustache', 5 | 'text!../search_index.json', 6 | ], function (Mustache, lunr, results_template, data) { 7 | "use strict"; 8 | 9 | function getSearchTerm() 10 | { 11 | var sPageURL = window.location.search.substring(1); 12 | var sURLVariables = sPageURL.split('&'); 13 | for (var i = 0; i < sURLVariables.length; i++) 14 | { 15 | var sParameterName = sURLVariables[i].split('='); 16 | if (sParameterName[0] == 'q') 17 | { 18 | return decodeURIComponent(sParameterName[1].replace(/\+/g, '%20')); 19 | } 20 | } 21 | } 22 | 23 | var index = lunr(function () { 24 | this.field('title', {boost: 10}); 25 | this.field('text'); 26 | this.ref('location'); 27 | }); 28 | 29 | data = JSON.parse(data); 30 | var documents = {}; 31 | 32 | for (var i=0; i < data.docs.length; i++){ 33 | var doc = data.docs[i]; 34 | doc.location = base_url + doc.location; 35 | index.add(doc); 36 | documents[doc.location] = doc; 37 | } 38 | 39 | var search = function(){ 40 | 41 | var query = document.getElementById('mkdocs-search-query').value; 42 | var search_results = document.getElementById("mkdocs-search-results"); 43 | while (search_results.firstChild) { 44 | search_results.removeChild(search_results.firstChild); 45 | } 46 | 47 | if(query === ''){ 48 | return; 49 | } 50 | 51 | var results = index.search(query); 52 | 53 | if (results.length > 0){ 54 | for (var i=0; i < results.length; i++){ 55 | var result = results[i]; 56 | doc = documents[result.ref]; 57 | doc.base_url = base_url; 58 | doc.summary = doc.text.substring(0, 200); 59 | var html = Mustache.to_html(results_template, doc); 60 | search_results.insertAdjacentHTML('beforeend', html); 61 | } 62 | } else { 63 | search_results.insertAdjacentHTML('beforeend', "

No results found

"); 64 | } 65 | 66 | if(jQuery){ 67 | /* 68 | * We currently only automatically hide bootstrap models. This 69 | * requires jQuery to work. 70 | */ 71 | jQuery('#mkdocs_search_modal a').click(function(){ 72 | jQuery('#mkdocs_search_modal').modal('hide'); 73 | }) 74 | } 75 | 76 | }; 77 | 78 | var search_input = document.getElementById('mkdocs-search-query'); 79 | 80 | var term = getSearchTerm(); 81 | if (term){ 82 | search_input.value = term; 83 | search(); 84 | } 85 | 86 | search_input.addEventListener("keyup", search); 87 | 88 | }); 89 | -------------------------------------------------------------------------------- /site/mkdocs/js/text.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. 3 | * Available via the MIT or new BSD license. 4 | * see: http://github.com/requirejs/text for details 5 | */ 6 | /*jslint regexp: true */ 7 | /*global require, XMLHttpRequest, ActiveXObject, 8 | define, window, process, Packages, 9 | java, location, Components, FileUtils */ 10 | 11 | define(['module'], function (module) { 12 | 'use strict'; 13 | 14 | var text, fs, Cc, Ci, xpcIsWindows, 15 | progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], 16 | xmlRegExp = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, 17 | bodyRegExp = /]*>\s*([\s\S]+)\s*<\/body>/im, 18 | hasLocation = typeof location !== 'undefined' && location.href, 19 | defaultProtocol = hasLocation && location.protocol && location.protocol.replace(/\:/, ''), 20 | defaultHostName = hasLocation && location.hostname, 21 | defaultPort = hasLocation && (location.port || undefined), 22 | buildMap = {}, 23 | masterConfig = (module.config && module.config()) || {}; 24 | 25 | text = { 26 | version: '2.0.12', 27 | 28 | strip: function (content) { 29 | //Strips declarations so that external SVG and XML 30 | //documents can be added to a document without worry. Also, if the string 31 | //is an HTML document, only the part inside the body tag is returned. 32 | if (content) { 33 | content = content.replace(xmlRegExp, ""); 34 | var matches = content.match(bodyRegExp); 35 | if (matches) { 36 | content = matches[1]; 37 | } 38 | } else { 39 | content = ""; 40 | } 41 | return content; 42 | }, 43 | 44 | jsEscape: function (content) { 45 | return content.replace(/(['\\])/g, '\\$1') 46 | .replace(/[\f]/g, "\\f") 47 | .replace(/[\b]/g, "\\b") 48 | .replace(/[\n]/g, "\\n") 49 | .replace(/[\t]/g, "\\t") 50 | .replace(/[\r]/g, "\\r") 51 | .replace(/[\u2028]/g, "\\u2028") 52 | .replace(/[\u2029]/g, "\\u2029"); 53 | }, 54 | 55 | createXhr: masterConfig.createXhr || function () { 56 | //Would love to dump the ActiveX crap in here. Need IE 6 to die first. 57 | var xhr, i, progId; 58 | if (typeof XMLHttpRequest !== "undefined") { 59 | return new XMLHttpRequest(); 60 | } else if (typeof ActiveXObject !== "undefined") { 61 | for (i = 0; i < 3; i += 1) { 62 | progId = progIds[i]; 63 | try { 64 | xhr = new ActiveXObject(progId); 65 | } catch (e) {} 66 | 67 | if (xhr) { 68 | progIds = [progId]; // so faster next time 69 | break; 70 | } 71 | } 72 | } 73 | 74 | return xhr; 75 | }, 76 | 77 | /** 78 | * Parses a resource name into its component parts. Resource names 79 | * look like: module/name.ext!strip, where the !strip part is 80 | * optional. 81 | * @param {String} name the resource name 82 | * @returns {Object} with properties "moduleName", "ext" and "strip" 83 | * where strip is a boolean. 84 | */ 85 | parseName: function (name) { 86 | var modName, ext, temp, 87 | strip = false, 88 | index = name.indexOf("."), 89 | isRelative = name.indexOf('./') === 0 || 90 | name.indexOf('../') === 0; 91 | 92 | if (index !== -1 && (!isRelative || index > 1)) { 93 | modName = name.substring(0, index); 94 | ext = name.substring(index + 1, name.length); 95 | } else { 96 | modName = name; 97 | } 98 | 99 | temp = ext || modName; 100 | index = temp.indexOf("!"); 101 | if (index !== -1) { 102 | //Pull off the strip arg. 103 | strip = temp.substring(index + 1) === "strip"; 104 | temp = temp.substring(0, index); 105 | if (ext) { 106 | ext = temp; 107 | } else { 108 | modName = temp; 109 | } 110 | } 111 | 112 | return { 113 | moduleName: modName, 114 | ext: ext, 115 | strip: strip 116 | }; 117 | }, 118 | 119 | xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/, 120 | 121 | /** 122 | * Is an URL on another domain. Only works for browser use, returns 123 | * false in non-browser environments. Only used to know if an 124 | * optimized .js version of a text resource should be loaded 125 | * instead. 126 | * @param {String} url 127 | * @returns Boolean 128 | */ 129 | useXhr: function (url, protocol, hostname, port) { 130 | var uProtocol, uHostName, uPort, 131 | match = text.xdRegExp.exec(url); 132 | if (!match) { 133 | return true; 134 | } 135 | uProtocol = match[2]; 136 | uHostName = match[3]; 137 | 138 | uHostName = uHostName.split(':'); 139 | uPort = uHostName[1]; 140 | uHostName = uHostName[0]; 141 | 142 | return (!uProtocol || uProtocol === protocol) && 143 | (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) && 144 | ((!uPort && !uHostName) || uPort === port); 145 | }, 146 | 147 | finishLoad: function (name, strip, content, onLoad) { 148 | content = strip ? text.strip(content) : content; 149 | if (masterConfig.isBuild) { 150 | buildMap[name] = content; 151 | } 152 | onLoad(content); 153 | }, 154 | 155 | load: function (name, req, onLoad, config) { 156 | //Name has format: some.module.filext!strip 157 | //The strip part is optional. 158 | //if strip is present, then that means only get the string contents 159 | //inside a body tag in an HTML string. For XML/SVG content it means 160 | //removing the declarations so the content can be inserted 161 | //into the current doc without problems. 162 | 163 | // Do not bother with the work if a build and text will 164 | // not be inlined. 165 | if (config && config.isBuild && !config.inlineText) { 166 | onLoad(); 167 | return; 168 | } 169 | 170 | masterConfig.isBuild = config && config.isBuild; 171 | 172 | var parsed = text.parseName(name), 173 | nonStripName = parsed.moduleName + 174 | (parsed.ext ? '.' + parsed.ext : ''), 175 | url = req.toUrl(nonStripName), 176 | useXhr = (masterConfig.useXhr) || 177 | text.useXhr; 178 | 179 | // Do not load if it is an empty: url 180 | if (url.indexOf('empty:') === 0) { 181 | onLoad(); 182 | return; 183 | } 184 | 185 | //Load the text. Use XHR if possible and in a browser. 186 | if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) { 187 | text.get(url, function (content) { 188 | text.finishLoad(name, parsed.strip, content, onLoad); 189 | }, function (err) { 190 | if (onLoad.error) { 191 | onLoad.error(err); 192 | } 193 | }); 194 | } else { 195 | //Need to fetch the resource across domains. Assume 196 | //the resource has been optimized into a JS module. Fetch 197 | //by the module name + extension, but do not include the 198 | //!strip part to avoid file system issues. 199 | req([nonStripName], function (content) { 200 | text.finishLoad(parsed.moduleName + '.' + parsed.ext, 201 | parsed.strip, content, onLoad); 202 | }); 203 | } 204 | }, 205 | 206 | write: function (pluginName, moduleName, write, config) { 207 | if (buildMap.hasOwnProperty(moduleName)) { 208 | var content = text.jsEscape(buildMap[moduleName]); 209 | write.asModule(pluginName + "!" + moduleName, 210 | "define(function () { return '" + 211 | content + 212 | "';});\n"); 213 | } 214 | }, 215 | 216 | writeFile: function (pluginName, moduleName, req, write, config) { 217 | var parsed = text.parseName(moduleName), 218 | extPart = parsed.ext ? '.' + parsed.ext : '', 219 | nonStripName = parsed.moduleName + extPart, 220 | //Use a '.js' file name so that it indicates it is a 221 | //script that can be loaded across domains. 222 | fileName = req.toUrl(parsed.moduleName + extPart) + '.js'; 223 | 224 | //Leverage own load() method to load plugin value, but only 225 | //write out values that do not have the strip argument, 226 | //to avoid any potential issues with ! in file names. 227 | text.load(nonStripName, req, function (value) { 228 | //Use own write() method to construct full module value. 229 | //But need to create shell that translates writeFile's 230 | //write() to the right interface. 231 | var textWrite = function (contents) { 232 | return write(fileName, contents); 233 | }; 234 | textWrite.asModule = function (moduleName, contents) { 235 | return write.asModule(moduleName, fileName, contents); 236 | }; 237 | 238 | text.write(pluginName, nonStripName, textWrite, config); 239 | }, config); 240 | } 241 | }; 242 | 243 | if (masterConfig.env === 'node' || (!masterConfig.env && 244 | typeof process !== "undefined" && 245 | process.versions && 246 | !!process.versions.node && 247 | !process.versions['node-webkit'])) { 248 | //Using special require.nodeRequire, something added by r.js. 249 | fs = require.nodeRequire('fs'); 250 | 251 | text.get = function (url, callback, errback) { 252 | try { 253 | var file = fs.readFileSync(url, 'utf8'); 254 | //Remove BOM (Byte Mark Order) from utf8 files if it is there. 255 | if (file.indexOf('\uFEFF') === 0) { 256 | file = file.substring(1); 257 | } 258 | callback(file); 259 | } catch (e) { 260 | if (errback) { 261 | errback(e); 262 | } 263 | } 264 | }; 265 | } else if (masterConfig.env === 'xhr' || (!masterConfig.env && 266 | text.createXhr())) { 267 | text.get = function (url, callback, errback, headers) { 268 | var xhr = text.createXhr(), header; 269 | xhr.open('GET', url, true); 270 | 271 | //Allow plugins direct access to xhr headers 272 | if (headers) { 273 | for (header in headers) { 274 | if (headers.hasOwnProperty(header)) { 275 | xhr.setRequestHeader(header.toLowerCase(), headers[header]); 276 | } 277 | } 278 | } 279 | 280 | //Allow overrides specified in config 281 | if (masterConfig.onXhr) { 282 | masterConfig.onXhr(xhr, url); 283 | } 284 | 285 | xhr.onreadystatechange = function (evt) { 286 | var status, err; 287 | //Do not explicitly handle errors, those should be 288 | //visible via console output in the browser. 289 | if (xhr.readyState === 4) { 290 | status = xhr.status || 0; 291 | if (status > 399 && status < 600) { 292 | //An http 4xx or 5xx error. Signal an error. 293 | err = new Error(url + ' HTTP status: ' + status); 294 | err.xhr = xhr; 295 | if (errback) { 296 | errback(err); 297 | } 298 | } else { 299 | callback(xhr.responseText); 300 | } 301 | 302 | if (masterConfig.onXhrComplete) { 303 | masterConfig.onXhrComplete(xhr, url); 304 | } 305 | } 306 | }; 307 | xhr.send(null); 308 | }; 309 | } else if (masterConfig.env === 'rhino' || (!masterConfig.env && 310 | typeof Packages !== 'undefined' && typeof java !== 'undefined')) { 311 | //Why Java, why is this so awkward? 312 | text.get = function (url, callback) { 313 | var stringBuffer, line, 314 | encoding = "utf-8", 315 | file = new java.io.File(url), 316 | lineSeparator = java.lang.System.getProperty("line.separator"), 317 | input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)), 318 | content = ''; 319 | try { 320 | stringBuffer = new java.lang.StringBuffer(); 321 | line = input.readLine(); 322 | 323 | // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324 324 | // http://www.unicode.org/faq/utf_bom.html 325 | 326 | // Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK: 327 | // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058 328 | if (line && line.length() && line.charAt(0) === 0xfeff) { 329 | // Eat the BOM, since we've already found the encoding on this file, 330 | // and we plan to concatenating this buffer with others; the BOM should 331 | // only appear at the top of a file. 332 | line = line.substring(1); 333 | } 334 | 335 | if (line !== null) { 336 | stringBuffer.append(line); 337 | } 338 | 339 | while ((line = input.readLine()) !== null) { 340 | stringBuffer.append(lineSeparator); 341 | stringBuffer.append(line); 342 | } 343 | //Make sure we return a JavaScript string and not a Java string. 344 | content = String(stringBuffer.toString()); //String 345 | } finally { 346 | input.close(); 347 | } 348 | callback(content); 349 | }; 350 | } else if (masterConfig.env === 'xpconnect' || (!masterConfig.env && 351 | typeof Components !== 'undefined' && Components.classes && 352 | Components.interfaces)) { 353 | //Avert your gaze! 354 | Cc = Components.classes; 355 | Ci = Components.interfaces; 356 | Components.utils['import']('resource://gre/modules/FileUtils.jsm'); 357 | xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc); 358 | 359 | text.get = function (url, callback) { 360 | var inStream, convertStream, fileObj, 361 | readData = {}; 362 | 363 | if (xpcIsWindows) { 364 | url = url.replace(/\//g, '\\'); 365 | } 366 | 367 | fileObj = new FileUtils.File(url); 368 | 369 | //XPCOM, you so crazy 370 | try { 371 | inStream = Cc['@mozilla.org/network/file-input-stream;1'] 372 | .createInstance(Ci.nsIFileInputStream); 373 | inStream.init(fileObj, 1, 0, false); 374 | 375 | convertStream = Cc['@mozilla.org/intl/converter-input-stream;1'] 376 | .createInstance(Ci.nsIConverterInputStream); 377 | convertStream.init(inStream, "utf-8", inStream.available(), 378 | Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER); 379 | 380 | convertStream.readString(inStream.available(), readData); 381 | convertStream.close(); 382 | inStream.close(); 383 | callback(readData.value); 384 | } catch (e) { 385 | throw new Error((fileObj && fileObj.path || '') + ': ' + e); 386 | } 387 | }; 388 | } 389 | return text; 390 | }); 391 | -------------------------------------------------------------------------------- /site/mkdocs/search_index.json: -------------------------------------------------------------------------------- 1 | { 2 | "docs": [ 3 | { 4 | "location": "/", 5 | "text": "hello", 6 | "title": "Home" 7 | }, 8 | { 9 | "location": "/#hello", 10 | "text": "", 11 | "title": "hello" 12 | }, 13 | { 14 | "location": "/about/", 15 | "text": "hello again", 16 | "title": "About" 17 | }, 18 | { 19 | "location": "/about/#hello-again", 20 | "text": "", 21 | "title": "hello again" 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /site/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | SPRY 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 | 39 | 40 | 71 | 72 |
73 | 74 | 75 | 79 | 80 | 81 |
82 |
83 |
84 |
    85 |
  • Docs »
  • 86 | 87 | 88 |
  • 89 | 90 |
  • 91 |
92 |
93 |
94 |
95 |
96 | 97 | 98 |

Search Results

99 | 100 | 104 | 105 |
106 | Sorry, page not found. 107 |
108 | 109 | 110 |
111 |
112 |
113 | 114 | 115 |
116 | 117 |
118 | 119 | 120 |
121 | 122 | Built with MkDocs using a theme provided by Read the Docs. 123 |
124 | 125 |
126 |
127 | 128 |
129 | 130 |
131 | 132 |
133 | 134 | 135 | 136 | 137 | 138 |
139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /site/searchbox.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 | -------------------------------------------------------------------------------- /site/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | None/ 7 | 2016-08-04 8 | daily 9 | 10 | 11 | 12 | 13 | 14 | None/about/ 15 | 2016-08-04 16 | daily 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /site/toc.html: -------------------------------------------------------------------------------- 1 | {% if nav_item.children %} 2 | 9 | {% else %} 10 | 23 | {% endif %} 24 | -------------------------------------------------------------------------------- /site/versions.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {% if repo_name == 'GitHub' %} 4 | GitHub 5 | {% elif repo_name == 'Bitbucket' %} 6 | BitBucket 7 | {% endif %} 8 | {% if previous_page %} 9 | « Previous 10 | {% endif %} 11 | {% if next_page %} 12 | Next » 13 | {% endif %} 14 | 15 |
16 | -------------------------------------------------------------------------------- /spry-run.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | """Convenience wrapper for running spry directly from source tree.""" 6 | 7 | 8 | from spry.spry import main 9 | 10 | 11 | if __name__ == '__main__': 12 | main() 13 | -------------------------------------------------------------------------------- /spry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/james-see/spry/43cb502acf114e5872f3d86cf4873575552eef26/spry/__init__.py -------------------------------------------------------------------------------- /spry/__main__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | """spry.__main__: executed when spry directory is called as script.""" 5 | 6 | 7 | from .spry import main 8 | main() 9 | -------------------------------------------------------------------------------- /spry/modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/james-see/spry/43cb502acf114e5872f3d86cf4873575552eef26/spry/modules/__init__.py -------------------------------------------------------------------------------- /spry/modules/core.py: -------------------------------------------------------------------------------- 1 | 2 | #!/usr/bin/env python 3 | # -*- coding: utf-8 -*- 4 | 5 | # ---------------------------------------------------------------------- 6 | # This file is part of spry 7 | # 8 | # Spry is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # Spry is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with Spry. If not, see . 20 | # ---------------------------------------------------------------------- 21 | try: import spinner 22 | except: from spry.modules import spinner 23 | try: import pdf_maker 24 | except: from spry.modules import pdf_maker 25 | -------------------------------------------------------------------------------- /spry/modules/pdf_maker.py: -------------------------------------------------------------------------------- 1 | from weasyprint import HTML, CSS 2 | from weasyprint.fonts import FontConfiguration 3 | 4 | def create_pdf(username, totals): 5 | """Test out functionality.""" 6 | html = HTML(string='


SPRY Report

Data about {}

\ 7 |
Total accounts found: {}
'.format(username, username, totals)) 9 | css = CSS(string=''' 10 | .top { text-align: center; border-bottom: 2px dashed deepskyblue; padding: 5px; } 11 | p { font-family: mono; font-size: 12px; } 12 | h2,h3,h4 { font-family: "Andale Mono"; font-size: 14px; } 13 | ul,li { font-family: "Andale Mono"; font-size: 11px; letter-spacing: 0.08em; } 14 | ul { list-style: none; } 15 | ul { width: 500px; margin-bottom: 20px; border-top: 1px solid #ccc; } 16 | li { border-bottom: 1px solid #ccc; float: left; display: inline;} 17 | #double li { width:50%;} 18 | #triple li { width:33.333%; } 19 | #six li { width:16.666%; } 20 | #quad li { width:25%; } 21 | ''') 22 | html.write_pdf( 23 | '{}-report.pdf'.format(username), stylesheets=[css]) -------------------------------------------------------------------------------- /spry/modules/spinner.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | def spinning_cursor(): 5 | while True: 6 | for cursor in '|/-\\': 7 | yield cursor 8 | 9 | def spinwhile(): 10 | spinner = spinning_cursor() 11 | try: 12 | sys.stdout.write(spinner.next()) 13 | except: 14 | sys.stdout.write(next(spinner)) # python 3 15 | sys.stdout.flush() 16 | time.sleep(0.1) 17 | sys.stdout.write('\b') 18 | 19 | 20 | -------------------------------------------------------------------------------- /spry/modules/stuff.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | """spry.stuff: stuff module within the bootstrap package.""" 5 | 6 | 7 | class Stuff(object): 8 | pass 9 | -------------------------------------------------------------------------------- /spry/spry.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | """bootstrap.bootstrap: provides entry point main().""" 5 | 6 | 7 | __version__ = "0.5.5" 8 | # spry social media scanner 9 | # 10 | # Spry is free software: you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation, either version 3 of the License, or 13 | # (at your option) any later version. 14 | # 15 | # Spry is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with Spry. If not, see . 22 | import sys 23 | cur_version = sys.version_info.major 24 | from time import sleep 25 | import argparse, requests 26 | from random import random, randint 27 | import random 28 | from clint.textui import progress # for the dots! 29 | from bs4 import BeautifulSoup, SoupStrainer # parse the html! 30 | try: from urllib.parse import urlparse # get domain names! 31 | except: 32 | from urlparse import urlparse 33 | cur_version = 2.7 34 | #sys.path.append(PYTHONPATH) 35 | from termcolor import * 36 | 37 | if int(cur_version) < 3: 38 | try: 39 | from .modules import stuff 40 | from .modules import core 41 | from .modules.pdf_maker import * 42 | from .modules.useragents import * 43 | except: 44 | from modules import stuff 45 | from modules import core 46 | from modules.pdf_maker import * 47 | from modules.useragents import * 48 | #exit('your python version is too old, please install python 3+ to get SPRY to work') 49 | else: 50 | try: 51 | from modules import stuff 52 | from modules import core 53 | from modules.pdf_maker import * 54 | from modules.useragents import * 55 | except: 56 | from spry.modules import stuff 57 | from spry.modules import core 58 | from spry.modules.pdf_maker import * 59 | from spry.modules.useragents import * 60 | 61 | 62 | welcomer = '\n++++++++++++++++++++++++++++\n+++ SPRY +++ WELCOME +++++++\n+++ s0c1@l m3d1a sc@nn3r +++\n++++++++++++++++++++++++++++\n' 63 | usingtor = False 64 | def main(): 65 | # welcome to the danger zone 66 | 67 | parser = argparse.ArgumentParser( 68 | # random comment here for no reason ;) 69 | formatter_class=argparse.RawTextHelpFormatter, 70 | prog='spry', 71 | description='++++++++++++++++++++++++++++\n+++ SPRY +++++++++++++++++++\n+++ s0c1@l m3d1a sc@nn3r +++\n++++++++++++++++++++++++++++', 72 | epilog = '''EXAMPLE: \n check instagram \n spry jamesanthonycampbell \n ''') 73 | 74 | parser.add_argument('username', help='specific username, like realdonaldtrump') 75 | 76 | parser.add_argument('-p', '--proxy', help='proxy in the form of 127.0.0.1:8118', 77 | nargs=1, dest='setproxy', required=False) 78 | 79 | parser.add_argument('-w', '--wait', help='max random wait time in seconds, \n5 second default (randomly wait 1-5 seconds)', 80 | dest='setwait', nargs='?',const=3,type=int,default=3) 81 | parser.add_argument('-u', '--user-agent', help='override random user-agent\n(by default randomly selects between \n+8500 different user agent strings', 82 | dest='useragent', nargs='?',const='u',default='u') 83 | parser.add_argument('--report', dest='reporting', action='store_true') 84 | parser.add_argument('-v','--verbose-useragent',dest='vu',action='store_true') 85 | parser.add_argument('--version', action='version', 86 | version='%(prog)s {version}'.format(version='Version: '+__version__)) 87 | parser.set_defaults(reporting=False,vu=False) 88 | args = parser.parse_args() 89 | cprint(welcomer,'red') 90 | # args strings 91 | username = args.username 92 | setproxy = args.setproxy 93 | # note, the correct way to check if variable is NoneType 94 | if setproxy != '' and setproxy is not None: 95 | proxyoverride = True 96 | if '9050' in setproxy[0] or '9150' or 'tor' in setproxy[0]: 97 | usingtor = True 98 | else: 99 | usingtor = False 100 | else: 101 | proxyoverride = False 102 | setwait = args.setwait 103 | reporting = args.reporting 104 | useragent = args.useragent 105 | vu = args.vu 106 | if useragent == 'u': 107 | overrideuseragent = False 108 | useragent = random.choice(useragents) # if user agent override not set, select random from list 109 | if vu: 110 | cprint('\nUseragent set as %s\n' % (useragent,),'blue') 111 | headers = {'User-Agent': useragent} 112 | i = 0 # counter for how many are 200's 113 | social_networks_list=['https://twitter.com/','https://www.instagram.com/','https://www.linkedin.com/in/','https://foursquare.com/','https://www.flickr.com/photos/','https://www.facebook.com/','https://www.reddit.com/user/','https://new.vk.com/','https://github.com/','https://ok.ru/','https://www.twitch.tv/','https://venmo.com/','http://www.goodreads.com/','http://www.last.fm/user/','https://api.spotify.com/v1/users/','https://www.pinterest.com/','https://keybase.io/','https://bitbucket.org/','https://pinboard.in/u:','https://disqus.com/by/','https://badoo.com/profile/','http://steamcommunity.com/id/','http://us.viadeo.com/en/profile/','https://www.periscope.tv/','https://www.researchgate.net/profile/','https://www.etsy.com/people/','https://myspace.com/','http://del.icio.us/','https://my.mail.ru/community/','https://www.xing.com/profile/'] 114 | totalnetworks = len(social_networks_list) # get the total networks to check 115 | print('\n\n[*] Starting to process list of {} social networks now [*]\n\n'.format(totalnetworks)) 116 | for soc in social_networks_list: 117 | # get domain name 118 | domainname = urlparse(soc).netloc 119 | domainnamelist = domainname.split('.') 120 | for domainer in domainnamelist: 121 | if len(domainer) > 3 and domainer != 'vk' and domainer != 'ok' and domainer != 'last' and domainer != 'mail': 122 | realdomain = domainer 123 | elif domainer == 'vk': 124 | realdomain = domainer 125 | elif domainer == 'ok': 126 | realdomain = domainer+'.ru' 127 | elif domainer == 'last': 128 | realdomain = domainer+'.fm' 129 | elif domainer == 'mail': 130 | realdomain = domainer+'.ru' 131 | # get proxy settings if any 132 | if proxyoverride == True: 133 | if usingtor: 134 | socks_proxy = "socks5://"+setproxy[0] 135 | proxyDict = { "http" : socks_proxy } 136 | else: 137 | #print(setproxy) 138 | http_proxy = "http://"+setproxy[0] 139 | https_proxy = "https://"+setproxy[0] 140 | proxyDict = { 141 | "http" : http_proxy, 142 | "https" : https_proxy 143 | } 144 | sleep(randint(1,setwait)) 145 | sys.stdout.flush() 146 | # try to load the social network for the respective user name 147 | # make sure to load proxy if proxy set otherwise don't pass a proxy arg 148 | # DONT FORGET TO HANDLE LOAD TIMEOUT ERRORS! - ADDED exception handlers finally 2-5-2017 JC 149 | if proxyoverride == True: 150 | try: 151 | r=requests.get(soc+username,stream=True, headers=headers, proxies=proxyDict) 152 | except requests.Timeout as err: 153 | print(err) 154 | continue 155 | except requests.RequestException as err: 156 | print(err) 157 | continue 158 | else: 159 | try: 160 | r=requests.get(soc+username,stream=True, headers=headers) 161 | except requests.Timeout as err: 162 | print(err) 163 | continue 164 | except requests.RequestException as err: 165 | print(err) 166 | continue 167 | # switch user agents again my friend 168 | if overrideuseragent == False: 169 | useragent = random.choice(useragents) 170 | # if user agent override not set, select random from list 171 | if vu: # if verbose output then print the user agent string 172 | cprint('\nUseragent set as %s\n' % (useragent,),'blue') 173 | if soc == 'https://www.instagram.com/' and r.status_code == 200: 174 | #print(r.text) 175 | soup = BeautifulSoup(r.content,'html.parser') 176 | aa = soup.find("meta", {"property":"og:image"}) 177 | # test instagram profile image print 178 | #print (aa['content']) # this is the instagram profile image 179 | instagram_profile_img = requests.get(aa['content']) # get instagram profile pic 180 | open('./'+username+'.jpg' , 'wb').write(instagram_profile_img.content) 181 | #exit() 182 | try: 183 | total_length = int(r.headers.get('content-length')) 184 | except: 185 | total_length = 102399 186 | for chunk in progress.dots(r.iter_content(chunk_size=1024),label='Loading '+realdomain): 187 | sleep(random.random() * 0.2) 188 | if chunk: 189 | #sys.stdout.write(str(chunk)) 190 | sys.stdout.flush() 191 | sys.stdout.flush() 192 | #print(r.text) 193 | if r.status_code == 200: 194 | cprint("user found @ {}".format(soc+username),'green') 195 | i = i+1 196 | else: 197 | cprint("Status code: {} no user found".format(r.status_code),'red') 198 | print('\n\n[*] Total networks with username found: {} [*]\n'.format(i)) 199 | if reporting: # if pdf reporting is turned on (default on) 200 | create_pdf(username, i) 201 | cprint('Report saved as {}-report.pdf. \nTo turn off this feature dont pass in the --report flag.\n'.format(username),'yellow') 202 | class Boo(stuff.Stuff): 203 | pass 204 | 205 | if __name__ == '__main__': 206 | main() 207 | --------------------------------------------------------------------------------