├── .gitignore ├── LICENSE ├── LICENSE.gojs ├── README.md ├── img ├── basics_screenshot.jpg ├── details_screenshot.jpg ├── nmapscan.jpg └── ports_screenshot.jpg ├── map.html ├── nmapscan.pl └── tablefilter ├── LICENSE ├── style ├── colsVisibility.css ├── filtersVisibility.css ├── tablefilter.css └── themes │ ├── blank.png │ ├── btn_clear_filters.png │ ├── btn_filter.png │ ├── btn_first_page.gif │ ├── btn_last_page.gif │ ├── btn_next_page.gif │ ├── btn_previous_page.gif │ ├── default │ ├── default.css │ └── images │ │ ├── bg_infDiv.jpg │ │ ├── bg_th.jpg │ │ ├── btn_eraser.gif │ │ ├── btn_first_page.gif │ │ ├── btn_last_page.gif │ │ ├── btn_next_page.gif │ │ ├── btn_over_eraser.gif │ │ ├── btn_over_first_page.gif │ │ ├── btn_over_last_page.gif │ │ ├── btn_over_next_page.gif │ │ ├── btn_over_previous_page.gif │ │ ├── btn_previous_page.gif │ │ └── img_loading.gif │ ├── downsimple.png │ ├── icn_clp.png │ ├── icn_exp.png │ ├── icn_filter.gif │ ├── icn_filterActive.gif │ ├── mytheme │ ├── images │ │ ├── bg_headers.jpg │ │ ├── bg_infDiv.jpg │ │ ├── btn_filter.png │ │ ├── btn_first_page.gif │ │ ├── btn_last_page.gif │ │ ├── btn_next_page.gif │ │ ├── btn_previous_page.gif │ │ └── img_loading.gif │ └── mytheme.css │ ├── skyblue │ ├── images │ │ ├── bg_skyblue.gif │ │ ├── btn_first_page.gif │ │ ├── btn_last_page.gif │ │ ├── btn_next_page.gif │ │ ├── btn_prev_page.gif │ │ ├── icn_clear_filters.png │ │ └── img_loading.gif │ └── skyblue.css │ ├── transparent │ ├── images │ │ ├── btn_first_page.gif │ │ ├── btn_last_page.gif │ │ ├── btn_next_page.gif │ │ ├── btn_prev_page.gif │ │ ├── icn_clear_filters.png │ │ └── img_loading.gif │ └── transparent.css │ └── upsimple.png ├── tablefilter.js ├── tablefilter.js.map ├── tf-0-6e52526f635250daf64a.js └── tf-0-6e52526f635250daf64a.js.map /.gitignore: -------------------------------------------------------------------------------- 1 | go.js 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /LICENSE.gojs: -------------------------------------------------------------------------------- 1 | If you wish to use the GoJS library for your private evaluation, you may do so only under the terms of the Evaluation License Agreement. 2 | http://gojs.net/latest/doc/download.html 3 | http://gojs.net/latest/doc/license.html 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nmap 2 | Scans subnets using nmap and visualizes network topology in a browser. 3 | 4 | Table of Contents 5 | ================= 6 | 7 | * [nmap](#nmap) 8 | * [Features](#features) 9 | * [Network diagram](#network-diagram) 10 | * [Help](#help) 11 | * [Display host properties](#display-host-properties) 12 | * [Prerequisites](#prerequisites) 13 | * [Installation instructions](#installation-instructions) 14 | * [Install packages](#install-packages) 15 | * [Test packages](#test-packages) 16 | * [Clone repo](#clone-repo) 17 | * [Install gojs](#install-gojs) 18 | * [Run nmapscan.pl](#run-nmapscanpl) 19 | * [Nmap video](#nmap-video) 20 | 21 | ## Features 22 | 23 | * Performs OS detection and port scanning. 24 | * Tracks subnet(s) gateways and route to internet. 25 | * Shows network diagram of subnets with hosts. 26 | * Use the mouse to drag the host objects around. 27 | * Displays MAC address, vendor type, IP address, hostname, gateway, netmask, OS type, etc. 28 | * Click on the icons in the corners of the host objects to display the host properties. 29 | 30 | ## Network diagram 31 | [![nmap scan](https://raw.githubusercontent.com/tedsluis/nmap/master/img/nmapscan.jpg)](https://raw.githubusercontent.com/tedsluis/nmap/master/img/nmapscan.jpg) 32 | 33 | ## Help 34 | 35 | 'nmapscan.pl' is a commandline script written in Perl. It creates 'map.html' which contains html, javascript and the network topology data. 36 | 37 | ```` 38 | ./nmapscan.pl -help 39 | Help 40 | 41 | Usage: 42 | ./nmapscan.pl 43 | Optional: 44 | ./nmapscan.pl -subnet [,] Subnet(s) in CIDR notation. 45 | ./nmapscan.pl -debug Display debug info. 46 | ./nmapscan.pl -help This helptext. 47 | 48 | Example: 49 | ./nmapscan.pl -subnet 192.168.1.0/24,192.168.100.0/24 50 | 51 | View result 'map.html' in a webbrowser. 52 | 53 | CIDR is /. 54 | Lookup your Netbits: 55 | +------+----------+------------------------------------+ 56 | | Net | Number | | 57 | | bits | of hosts | Netmask | 58 | +------+----------+------------------------------------+ 59 | | /8 | 16777214 | 255.0.0.0 | 60 | | /9 | 8388606 | 255.128.0.0 | 61 | | /10 | 4194302 | 255.192.0.0 | 62 | | /11 | 2097150 | 255.224.0.0 | 63 | | /12 | 1048574 | 255.240.0.0 | 64 | | /13 | 524286 | 255.248.0.0 | 65 | | /14 | 262142 | 255.252.0.0 | 66 | | /15 | 131070 | 255.254.0.0 | 67 | | /16 | 65534 | 255.255.0.0 | 68 | | /17 | 32766 | 255.255.128.0 | 69 | | /18 | 16382 | 255.255.192.0 | 70 | | /19 | 8190 | 255.255.224.0 | 71 | | /20 | 4094 | 255.255.240.0 | 72 | | /21 | 2046 | 255.255.248.0 | 73 | | /22 | 1022 | 255.255.252.0 | 74 | | /23 | 510 | 255.255.254.0 | 75 | | /24 | 254 | 255.255.255.0 | 76 | | /25 | 126 | 255.255.255.128 | 77 | | /26 | 62 | 255.255.255.192 | 78 | | /27 | 30 | 255.255.255.224 | 79 | | /28 | 14 | 255.255.255.240 | 80 | | /29 | 6 | 255.255.255.248 | 81 | | /30 | 2 | 255.255.255.252 | 82 | | /31 | - | point to point links only | 83 | | /32 | 1 | 255.255.255.255 single IP address | 84 | +------+----------+------------------------------------+ 85 | Notes: 86 | - Number of hosts = usable number of hosts. 87 | - CIDR = network address + /netbits, for example: 192.168.1.0/24 88 | - Instead of the network address, any IP within the subnet is accepted. 89 | - Be sure 'nmap', 'traceroute', 'iproute' and 'gojs' are installed! 90 | - You may need to do sudo (to become root) to run nmap: $ sudo ./nmapscan.pl -subnet 192.168.1.0/24 91 | ```` 92 | ## Display host properties 93 | 94 | Click on the icons in the corners of the hosts object to display the host properties. There are 3 different types: Basic, detailed and port properties. 95 | 96 | Top right corner: Basisc host info. 97 | [![nmap scan basics](https://raw.githubusercontent.com/tedsluis/nmap/master/img/basics_screenshot.jpg)](https://raw.githubusercontent.com/tedsluis/nmap/master/img/basics_screenshot.jpg) 98 | 99 | Bottom right corner: Host details: 100 | [![nmap scan details](https://raw.githubusercontent.com/tedsluis/nmap/master/img/details_screenshot.jpg)](https://raw.githubusercontent.com/tedsluis/nmap/master/img/details_screenshot.jpg) 101 | 102 | Top left corner: Port host info: 103 | [![nmap scan ports](https://raw.githubusercontent.com/tedsluis/nmap/master/img/ports_screenshot.jpg)](https://raw.githubusercontent.com/tedsluis/nmap/master/img/ports_screenshot.jpg) 104 | 105 | ## Prerequisites 106 | 107 | * nmap 108 | * traceroute 109 | * iproute 110 | * perl 111 | * gojs (check the license) 112 | * root permissions 113 | 114 | note: If your system does not meet these requirements then follow the installation instructions. 115 | 116 | ## Installation instructions 117 | 118 | ### Install packages 119 | 120 | Ubuntu/Debian/Raspbian 121 | ```` 122 | $ sudo apt-get install nmap traceroute iproute perl git wget 123 | ```` 124 | 125 | Centos/RHEL 126 | ```` 127 | $ yum install nmap traceroute iproute perl git wget 128 | ```` 129 | 130 | Fedora 131 | ```` 132 | $ dnf install nmap traceroute iproute perl git wget 133 | ```` 134 | 135 | ### Test packages 136 | 137 | To test nmap (specify our own subnet): 138 | ```` 139 | $ nmap -O -n 192.168.1.0/24 140 | ```` 141 | 142 | To test traceroute: 143 | ```` 144 | $ traceroute 8.8.8.8 145 | ```` 146 | 147 | To test iproute: 148 | ```` 149 | $ ip add 150 | ```` 151 | 152 | ### Clone repo 153 | 154 | Clone the repo to your locale host: 155 | ```` 156 | $ mkdir ~/git 157 | $ cd ~/git 158 | $ git clone https://github.com/tedsluis/nmap.git 159 | $ cd ~/git/nmap 160 | ```` 161 | 162 | ### Install GoJS 163 | 164 | To install the GoJS framework: 165 | ```` 166 | $ cd ~/git/nmap 167 | $ wget https://gojs.net/latest/release/go.js 168 | ```` 169 | Note: read the license info! 170 | 171 | ## Run nmapscan.pl 172 | 173 | To run it (specify our own subnets): 174 | ```` 175 | $ ./nmapscan.pl -subnet 192.168.1.0/24,192.168.11.0/24 176 | 177 | Interface=enp2s0 (ip=192.168.11.80) 178 | Interface=virbr0 (ip=192.168.122.1) 179 | Host gateway=192.168.11.1 180 | 192.168.1.0/24 (subnetwork=192.168.1.0/24, netbit=24, subnetmask=255.255.255.0, network=192.168.1.0, broadcast=192.168.1.255), number of IP's=254 181 | 192.168.11.0/24 (subnetwork=192.168.11.0/24, netbit=24, subnetmask=255.255.255.0, network=192.168.11.0, broadcast=192.168.11.255), number of IP's=254 182 | 192.168.122.1/24 (subnetwork=192.168.122.0/24, netbit=24, subnetmask=255.255.255.0, network=192.168.122.0, broadcast=192.168.122.255), number of IP's=254 183 | ```` 184 | Depeding on your system and network scanning will take quite a while! On a raspberry pi it can even take up to an hour! 185 | Ones it is finshed you can view 'map.html' is a web browser. 186 | 187 | ======= 188 | ## Nmap video 189 | 190 | Watch a video at youtube: https://youtu.be/DMpabcP0r_U 191 | [![Alt text](https://img.youtube.com/vi/DMpabcP0r_U/0.jpg)](https://www.youtube.com/watch?v=DMpabcP0r_U) 192 | 193 | ## GoJS framework 194 | 195 | If you wish to use the GoJS library for your private evaluation, you may do so only under the terms of the Evaluation License Agreement. 196 | * http://gojs.net/latest/doc/download.html 197 | * http://gojs.net/latest/doc/license.html 198 | 199 | 200 | --------------------------- 201 | 202 | Ted Sluis 203 | ted.sluis@gmail.com 204 | https://www.youtube.com/tedsluis 205 | 206 | 207 | 208 | 209 | -------------------------------------------------------------------------------- /img/basics_screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/img/basics_screenshot.jpg -------------------------------------------------------------------------------- /img/details_screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/img/details_screenshot.jpg -------------------------------------------------------------------------------- /img/nmapscan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/img/nmapscan.jpg -------------------------------------------------------------------------------- /img/ports_screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/img/ports_screenshot.jpg -------------------------------------------------------------------------------- /nmapscan.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | use Getopt::Long; 4 | use POSIX qw/strftime/; 5 | # 6 | # Input parameters 7 | my $help; 8 | my $cidrs; 9 | my $debug; 10 | GetOptions( 11 | "help!"=>\$help, 12 | "debug!"=>\$debug, 13 | "subnets=s"=>\$cidrs 14 | ) or exit(1); 15 | # 16 | # Help 17 | if ($help) { 18 | print "Help 19 | 20 | Usage: 21 | $0 22 | Optional: 23 | $0 -subnet [,] Subnet(s) in CIDR notation. 24 | $0 -debug Display debug info. 25 | $0 -help This helptext. 26 | 27 | Examples: 28 | $0 -subnet 192.168.1.0/24 29 | $0 -subnet 192.168.1.0/24,192.168.11.0/24 30 | 31 | View result 'map.html' in a webbrowser. 32 | 33 | Lookup your Netbits: 34 | +------+----------+------------------------------------+ 35 | | Net | Number | | 36 | | bits | of hosts | Netmask | 37 | +------+----------+------------------------------------+ 38 | | /8 | 16777214 | 255.0.0.0 | 39 | | /9 | 8388606 | 255.128.0.0 | 40 | | /10 | 4194302 | 255.192.0.0 | 41 | | /11 | 2097150 | 255.224.0.0 | 42 | | /12 | 1048574 | 255.240.0.0 | 43 | | /13 | 524286 | 255.248.0.0 | 44 | | /14 | 262142 | 255.252.0.0 | 45 | | /15 | 131070 | 255.254.0.0 | 46 | | /16 | 65534 | 255.255.0.0 | 47 | | /17 | 32766 | 255.255.128.0 | 48 | | /18 | 16382 | 255.255.192.0 | 49 | | /19 | 8190 | 255.255.224.0 | 50 | | /20 | 4094 | 255.255.240.0 | 51 | | /21 | 2046 | 255.255.248.0 | 52 | | /22 | 1022 | 255.255.252.0 | 53 | | /23 | 510 | 255.255.254.0 | 54 | | /24 | 254 | 255.255.255.0 | 55 | | /25 | 126 | 255.255.255.128 | 56 | | /26 | 62 | 255.255.255.192 | 57 | | /27 | 30 | 255.255.255.224 | 58 | | /28 | 14 | 255.255.255.240 | 59 | | /29 | 6 | 255.255.255.248 | 60 | | /30 | 2 | 255.255.255.252 | 61 | | /31 | - | point to point links only | 62 | | /32 | 1 | 255.255.255.255 single IP address | 63 | +------+----------+------------------------------------+ 64 | Notes: 65 | - Number of hosts = usable number of hosts. 66 | - CIDR = network address + /netbits, for example: 192.168.1.0/24 67 | - Instead of the network address, any IP within the subnet is accepted. 68 | - Be sure 'nmap', 'traceroute', 'iproute' and 'gojs' are installed! 69 | 70 | \n"; 71 | exit 0; 72 | } 73 | 74 | # 75 | # Prerequisites check 76 | if (! -e "go.js") { 77 | print "\nNo 'go.js' file found!\nIf you wish to use the GoJS library for your private evaluation, you may do so only under the terms of the Evaluation License Agreement.\nCheck http://gojs.net/latest/doc/download.html\n\n"; 78 | exit; 79 | } 80 | my @cmd; 81 | @cmd=`which nmap`; 82 | if (join('',@cmd) !~ /nmap/) { 83 | print "\nPackage 'nmap' not found!"; 84 | exit; 85 | } 86 | @cmd=`which ip`; 87 | if (join('',@cmd) !~ /ip/) { 88 | print "\nPackage 'iproute' not found!"; 89 | exit; 90 | }@cmd=`which traceroute`; 91 | if (join('',@cmd) !~ /traceroute/) { 92 | print "\nPackage 'traceroute' not found!"; 93 | exit; 94 | } 95 | 96 | # 97 | # Get host IP(s), interfaces and subnets 98 | my @data=`ip add | grep inet | grep -v inet6 | grep -v 127.0.0.1`; 99 | my %hostips; 100 | my %hostmac; 101 | my @cidrs; 102 | @cidrs=split(/,/,$cidrs) if ($cidrs); 103 | foreach my $hostip (@data) { 104 | print $hostip if ($debug); 105 | if ($hostip =~ /inet\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\/(\d{1,3})\s.+\s([a-z0-9\-]+)$/i) { 106 | my ($ip,$netbit,$interface)=($1,$2,$3); 107 | # Get IP's and interface name 108 | $hostips{$ip}=$interface; 109 | # Get networks if non were specified 110 | push(@cidrs,"$ip/$netbit") if ((!$cidrs) || (($cidrs) && ($cidrs !~ /^$ip\/$netbit$/))); 111 | # Get mac address interface 112 | my @mac=`ifconfig $interface | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'`; 113 | $hostmac{$ip}=$1 if ($mac[0] =~ /^([0-9a-f:]+)$/i); 114 | print "Interface=$interface (ip=$ip,mac=$hostmac{$ip})\n"; 115 | } 116 | } 117 | 118 | # 119 | # default gateway 120 | @data=`ip route`; 121 | my $hostgateway; 122 | foreach my $line (@data) { 123 | $hostgateway = $1 if ($line =~ /^default\s+via\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s+/); 124 | } 125 | print "Host gateway=$hostgateway\n"; 126 | 127 | # 128 | # Initialize variables 129 | my %fact; 130 | my %port; 131 | my %host; 132 | my %route; 133 | my %trace; 134 | my %reverse; 135 | my %interface; 136 | my %interfacesubnet; 137 | my %subnets; # subnets{ip} => subnet 138 | my %gateway; # gateway{subnet} => ip gateway 139 | my %cidr; 140 | my %subnet2ip; 141 | my %ip2subnet; 142 | my $internetgateway; 143 | my @subnets; 144 | 145 | # 146 | # Get CIDR, network address & broadcast address 147 | foreach my $subnet (@cidrs) { 148 | # Validate CIDR 149 | if ($subnet !~ /(^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$)/) { 150 | print "Error: CIDR '$1' is invalid!\n"; 151 | exit 1; 152 | } 153 | # 10.0.0.0/24 192.168.1.0/16 154 | my($subnetwork, $netbit)=split(m'/',$subnet); 155 | # Decimal representation of mask 156 | my $mask = (2 ** $netbit - 1) << (32 - $netbit); 157 | # Convert decimal representation to ip format 158 | my $netmask = join( '.', unpack( "C4", pack( "N", $mask ) ) ); 159 | # Split to decimals 160 | my ($ip1,$ip2,$ip3,$ip4)=($1,$2,$3,$4) if ($subnet =~ /\s*(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/\d{1,2}\s*/); 161 | my ($ma1,$ma2,$ma3,$ma4)=($1,$2,$3,$4) if ($netmask =~ /\s*(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\s*/); 162 | # Convert to bits 163 | my ($ip) = unpack( "N", pack( "C4", $ip1,$ip2,$ip3,$ip4 ) ); 164 | my ($mask) = unpack( "N", pack( "C4", $ma1,$ma2,$ma3,$ma4 ) ); 165 | my ($fullmask)= unpack( "N", pack( "C4", 255,255,255,255 ) ); 166 | # Calculate network and broadcast, convert to ip format 167 | my $network = join( '.', unpack( "C4", pack( "N", ( $ip & $mask ) ) ) ); 168 | my $broadcast = join( '.', unpack( "C4", pack( "N", ( $ip | ($fullmask ^ $mask )) ) ) ); 169 | next if (exists $cidr{"$network/$netbit"}); 170 | $cidr{"$network/$netbit"}{'subnetmask'}=$netmask; 171 | $cidr{"$network/$netbit"}{'network'}=$network; 172 | $cidr{"$network/$netbit"}{'broadcast'}=$broadcast; 173 | push(@subnets,"$network/$netbit"); 174 | # Determine IP's per subnet 175 | my ($n1,$n2,$n3,$n4)=($1,$2,$3,$4) if ($cidr{"$network/$netbit"}{'network'} =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/); 176 | my ($b1,$b2,$b3,$b4)=($1,$2,$3,$4) if ($cidr{"$network/$netbit"}{'broadcast'} =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/); 177 | for (my $ip1 = $n1; $ip1 <= $b1; $ip1++) { 178 | for (my $ip2 = $n2; $ip2 <= $b2; $ip2++) { 179 | for (my $ip3 = $n3; $ip3 <= $b3; $ip3++) { 180 | for (my $ip4 = $n4; $ip4 <= $b4; $ip4++) { 181 | my $ip="$ip1.$ip2.$ip3.$ip4"; 182 | $subnet2ip{$subnet}{$ip}=""; 183 | $ip2subnet{$ip}=$subnet; 184 | } 185 | } 186 | } 187 | } 188 | print " $subnet (subnetwork=$network/$netbit, netbit=$netbit, subnetmask=$netmask, network=$network, broadcast=$broadcast), number of IP's=".(((keys %{$subnet2ip{$subnet}})-2)||1)."\n"; 189 | } 190 | 191 | # 192 | # subroutine traceroute 193 | sub TraceRoute(@) { 194 | my $ipaddress = shift; 195 | my $subnet= shift; 196 | my @route; 197 | foreach my $hostip (keys %hostips) { 198 | next if ((exists $interface{$hostip}) && (exists $interface{$hostip}{$subnet}) && ($interface{$hostip}{$subnet} =~ /UNREACHABLE/)); 199 | my @traceroute=`traceroute -i $hostips{$hostip} $ipaddress`; 200 | print "traceroute -i $hostips{$hostip} $ipaddress " if ($debug); 201 | foreach my $line (@traceroute) { 202 | chomp($line); 203 | # Parse route 204 | if ($line =~ /^\s*(\d+)\s+\*\s+\*\s+\*/) { 205 | my $hop=$1; 206 | $interface{$hostip}{$subnet}="UNREACHABLE" if (! exists $interface{$hostip}{$subnet}); 207 | if (($hop>1) && (exists $trace{$ipaddress}{($hop-1)}) && ($trace{$ipaddress}{($hop-1)} =~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/)) { 208 | my $gw=$trace{$ipaddress}{($hop-1)}; 209 | if (exists $subnets{$gw}) { 210 | $gateway{$subnets{$gw}} = $gw; 211 | if ($ipaddress =~ /^8\.8\.8\.8$/) { 212 | print " INTERNET GATEWAY FOUND: $gw in $subnets{$gw} (HOP=$hop)\n" if ($debug); 213 | $internetgateway=$gw; 214 | } else { 215 | print " GATEWAY FOUND: $gw in $subnets{$gw} (HOP=$hop)\n" if ($debug); 216 | } 217 | } 218 | } 219 | } elsif ($line =~ /^\s*(\d+)\s+([a-z0-9\.\-]+)\s+\((\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\)\s(.+)$/i) { 220 | my ($hop,$name,$ip,$rest)=($1,$2,$3,$4); 221 | $subnets{$ip}=$ip2subnet{$ip} if ((!exists $subnets{$ip}) && (exists $ip2subnet{$ip})); 222 | $trace{$ipaddress}{$hop}=$ip; 223 | $reverse{$ipaddress}{$ip}=$hop; 224 | push(@route,"\[$name ($ip)\]"); 225 | print " IPADDRESS=$ipaddress ---> HOP=$name $ip ($hop) [via: interface=$hostips{$hostip} ($hostip)]\n" if ($debug); 226 | # Store gateway subnet. 227 | if ($hop > 1) { 228 | if (($rest =~ /\s!H\s/) && (exists $trace{$ipaddress}) && (exists $trace{$ipaddress}{$hop-1})){ 229 | $route{$ip}=$trace{$ipaddress}{$hop-1}; 230 | print " ROUTE FOUND: $ip in subnet $subnets{$ip} to gateway $trace{$ipaddress}{$hop-1} in subnet $subnets{$trace{$ipaddress}{$hop-1}} (HOP=$hop)\n" if ($debug); 231 | } 232 | if ((exists $trace{$ipaddress}{($hop-1)}) && ($trace{$ipaddress}{($hop-1)} =~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/)) { 233 | my $gw=$trace{$ipaddress}{($hop-1)}; 234 | if (exists $subnets{$gw}) { 235 | $gateway{$subnets{$gw}} = $gw; 236 | print " GATEWAY FOUND: $gw in $subnets{$gw} (HOP=$hop)\n" if ($debug); 237 | } else { 238 | print " NO GATEWAY FOUND: (hop=$hop), ip $gw not jet scanned.\n" if ($debug); 239 | } 240 | } else { 241 | print " NO GATEWAY FOUND: (HOP=$hop)\n" if ($debug); 242 | } 243 | } else { 244 | if ((exists $subnets{$ip}) && (exists $subnets{$hostip}) && ($subnets{$ip} !~ /^$subnets{$hostip}$/) && (exists $gateway{$subnets{$hostip}})) { 245 | $route{$ip}=$gateway{$subnets{$hostip}}; 246 | print " ROUTE FOUND: $ip in subnet $subnets{$ip} to $gateway{$hostip} in subnet $subnets{$hostip} (HOP=1) \n" if ($debug); 247 | } 248 | if ($subnets{$hostgateway} =~ /^$subnet$/) { 249 | $gateway{$subnet}=$hostgateway; 250 | print " GATEWAY FOUND: $hostgateway in subnet $subnets{$hostgateway} (HOP=1) (host gateway)\n" if ($debug); 251 | } else { 252 | print " NO GATEWAY FOUND (HOP=1)\n" if ($debug); 253 | } 254 | } 255 | # Gateway Host IP's other subnets 256 | if ((exists $hostips{$ipaddress}) && (!exists $gateway{$subnets{$ipaddress}}) && (exists $subnets{$hostgateway})){ 257 | foreach my $ip (keys %hostips) { 258 | if ($subnets{$ip} =~ /^$subnets{$hostgateway}$/) { 259 | $gateway{$subnets{$ipaddress}}=$ip; 260 | print "IPADRESS=$ipaddress (subnet=".$subnets{$ipaddress}."), hostip/gateway=$ip (subnet=".$subnets{$ip}.")\n" if ($debug); 261 | } 262 | } 263 | } 264 | # subnet is reachable using hostip 265 | $interface{$hostip}{$subnet}=$hostips{$hostip}; 266 | $interfacesubnet{$subnet}=$hostip; 267 | } 268 | } 269 | } 270 | return @route; 271 | } 272 | 273 | # 274 | # Get cache files 275 | mkdir("nmapdata"); 276 | my %ipcache; 277 | my @datafiles=`find nmapdata -name '*.txt'`; 278 | foreach my $file (@datafiles) { 279 | chomp($file); 280 | my $ipaddress=$1 if ($file =~ /nmapdata\/(.+)\.txt$/); 281 | $ipaddress=~s/_/\./g; 282 | print "READ IP=$ipaddress, CACHE_FILE=$file\n" if ($debug); 283 | next unless (exists $ip2subnet{$ipaddress}); 284 | $ipcache{$ipaddress}=$file; 285 | } 286 | 287 | 288 | # 289 | # Scan subnets 290 | foreach my $subnet (@subnets) { 291 | print "~~~~~~~~~~~~~~~~~ Start scanning SUBNET=$subnet ~~~~~~~~~~~~~~~~~\n" if ($debug); 292 | my @data=`nmap -A -n $subnet`; 293 | my $ipaddress="unknown"; 294 | # Parse scan output 295 | foreach my $line (@data) { 296 | chomp($line); 297 | next if ($line =~ /^\s*$/); 298 | if ($line =~ /Nmap\sscan\sreport\sfor\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*/) { 299 | # parse IP address 300 | $ipaddress=$1; 301 | $host{$ipaddress}{'subnet'}=$subnet; 302 | $host{$ipaddress}{'color'}='gold'; 303 | $subnets{$ipaddress}=$subnet; 304 | print "++++++++++++++ SCAN HOST IP =$ipaddress, subnet=$subnet +++++++++++++++++\n" if ($debug); 305 | # 306 | # get hostname 307 | my @hostname=`nslookup $ipaddress`; 308 | foreach my $line (@hostname) { 309 | chomp($line); 310 | # Parse hostname 311 | if ($line =~ /in-addr\.arpa\s+name\s=\s(.+)\.$/){ 312 | $host{$ipaddress}{'hostname'}=uc($1); 313 | $host{$ipaddress}{'color'}='lightcyan' if (! exists $host{$ipaddress}{'color'}); 314 | print "HOSTNAME=".uc($1)."\n" if ($debug); 315 | } 316 | } 317 | my $route=join("-->",TraceRoute($ipaddress,$subnet)); 318 | print "\nROUTE=$route\n" if ($debug); 319 | next; 320 | } elsif ($line =~ /MAC\sAddress:\s+([0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})\s+\((.+)\)$/i) { 321 | $host{$ipaddress}{'mac'}=$1; 322 | $host{$ipaddress}{'vendor'}=$2; 323 | print "MAC ADDRESS=$1 $2\n" if ($debug); 324 | next; 325 | } elsif ($line =~ /Host\sis\sup\s\((\d+\.\d+s\slatency)\)/) { 326 | $host{$ipaddress}{'status'}='up'; 327 | $host{$ipaddress}{'latency'}=$1; 328 | print "LATENCY=$1\n" if ($debug); 329 | next; 330 | } elsif ($line =~ /Network\sDistance:\s(\d+)\shop/) { 331 | $host{$ipaddress}{'hops'}=$1; 332 | print "HOPS=$1\n" if ($debug); 333 | next; 334 | } elsif ($line =~ /Device type:\s(.+)$/) { 335 | $host{$ipaddress}{'devicetype'}=$1; 336 | print "DEVICE TYPE=$1\n" if ($debug); 337 | next; 338 | } elsif ($line =~ /Running:?\s(.+)$/) { 339 | $host{$ipaddress}{'running'}=$1; 340 | print "RUNNING=$1\n" if ($debug); 341 | next; 342 | } elsif ($line =~ /Not\sshown:\s(.+)$/) { 343 | push(@{$port{$ipaddress}},"$1"); 344 | print "NOT SHOWN=$1\n" if ($debug); 345 | next; 346 | } elsif ($line =~ /OS\sCPE:\s(.+)$/) { 347 | $host{$ipaddress}{'os_cpe'}="$1"; 348 | print "OS CPE=$1\n" if ($debug); 349 | next; 350 | } elsif ($line =~ /OS\sdetails:\s(.+)$/) { 351 | $host{$ipaddress}{'os_details'}="$1."; 352 | print "OS DETAILS=$1\n" if ($debug); 353 | next; 354 | } elsif ($line =~ /Warning:\s(.+)$/) { 355 | push(@{$fact{$ipaddress}},"$1."); 356 | print "WARNING=$1\n" if ($debug); 357 | next; 358 | } elsif ($line =~ /(All\s1000\sscanned\sports)\son\s(.+)\s(are\s.+)/) { 359 | push(@{$port{$ipaddress}},"$1 $3"); 360 | print "NOT SHOWN=$1.$3\n" if ($debug); 361 | next; 362 | } elsif ($line =~ /Aggressive\sOS\sguesses:\s(.+)$/) { 363 | push(@{$fact{$ipaddress}},"$1"); 364 | print "AGGRESSIVE OS GUESSES=$1\n" if ($debug); 365 | next; 366 | } elsif ($line =~ /(Too\smany\sfingerprints.+)$/) { 367 | push(@{$fact{$ipaddress}},"$1."); 368 | print "TOO MANY FINGERPRINTS=$1.\n" if ($debug); 369 | next; 370 | } elsif ($line =~ /(No\sexact\sOS\smatches.+)$/) { 371 | push(@{$fact{$ipaddress}},"$1."); 372 | print "NO EXACT OS MATCHES=$1\n" if ($debug); 373 | next; 374 | } elsif ($line =~ /^(\d+\/[tu][cd]p)\s+([^\s]+)\s+([^\s]+)\s*(.*)$/i) { 375 | my ($p,$s,$t,$d)=($1,$2,$3,$4); 376 | my $port=sprintf("%-9s %-8s %-14s %-50s",$p,$s,$t,($d||"")); 377 | $port =~ s/\s*$//; 378 | push(@{$port{$ipaddress}},"$port."); 379 | $host{$ipaddress}{'ports'}=($host{$ipaddress}{'ports'}||"").$p." "; 380 | print "PORT=$port\n" if ($debug); 381 | } elsif ($line =~ /http-title:\s+(\S.+)$/i) { 382 | $host{$ipaddress}{'http-title'}="$1"; 383 | print "HTTP-TITLE=$1\n" if ($debug); 384 | } elsif ($line =~ /Service Info:\s+(\S.+)$/i) { 385 | $host{$ipaddress}{'service_info'}="$1"; 386 | print "Service Info=$1\n" if ($debug); 387 | # 388 | # Parse service info 389 | my @info=split(/;\s/,$host{$ipaddress}{'service_info'}); 390 | foreach my $type (@info) { 391 | if ($type =~ /^(\w+):\s(.+)$/){ 392 | my $t=$1; 393 | my @i=split(/,/,$2); 394 | foreach my $info (@i) { 395 | if (($t =~ /CPE/) && ((! exists $host{$ipaddress}{'os_cpe'}) || ((exists $host{$ipaddress}{'os_cpe'}) && ($host{$ipaddress}{'os_cpe'} !~ /\Q$info\E/i)))) { 396 | $host{$ipaddress}{'os_cpe'}=$info." ".($host{$ipaddress}{'os_cpe'}||""); 397 | print " + SERVICE_INFO/OS_CPE=$host{$ipaddress}{'os_cpe'} -> $ipaddress\n" if ($debug); 398 | } elsif (($t =~ /OSs?/) && ((! exists $host{$ipaddress}{'running'}) || ((exists $host{$ipaddress}{'running'}) && ($host{$ipaddress}{'running'} !~ /\Q$info\E/i)))) { 399 | $host{$ipaddress}{'running'}=$info." ".($host{$ipaddress}{'running'}||""); 400 | print " + SERVICE_INFO/RUNNING=$host{$ipaddress}{'running'} -> $ipaddress\n" if ($debug); 401 | } elsif (($t =~ /Device/) && ((! exists $host{$ipaddress}{'devicetype'}) || ((exists $host{$ipaddress}{'devicetype'}) && ($host{$ipaddress}{'devicetype'} !~ /\Q$info\E/i)))) { 402 | $host{$ipaddress}{'devicetype'}=$info||$host{$ipaddress}{'devicetype'}; 403 | print " + SERVICE_INFO/DEVICE_TYPE=$host{$ipaddress}{'devicetype'} -> $ipaddress\n" if ($debug); 404 | } 405 | } 406 | } 407 | } 408 | } else { 409 | print "NOT PARSED! >>>$line<<<\n" if ($debug); 410 | } 411 | } 412 | } 413 | 414 | # 415 | # Trace a non scanned IP in every subnets 416 | print "--------------- TRACEROUTE a non scanned IP in every subnet -------------------------------\n" if ($debug); 417 | foreach my $subnet (sort keys %cidr) { 418 | foreach my $ip (keys %{$subnet2ip{$subnet}}) { 419 | next if (($ip =~ /^$cidr{$subnet}{'network'}$/) || ($ip =~ /^$cidr{$subnet}{'broadcast'}$/)); 420 | next if ((exists $subnets{$ip}) || (exists $cidr{$subnet}{'scanned_non_existing_ip'})); 421 | $subnets{$ip}=$subnet; 422 | $cidr{$subnet}{'scanned_non_existing_ip'}="yes"; 423 | print "--------------------->>> START=$cidr{$subnet}{'network'}, END=$cidr{$subnet}{'broadcast'}, IP=$ip\n" if ($debug); 424 | print " ".join("-->",TraceRoute($ip,$subnet))."\n" if ($debug); 425 | delete $subnets{$ip}; 426 | } 427 | } 428 | 429 | # 430 | # Scan internet gateway 431 | print "--------------- SCAN INTERNET GATEWAY -------------------------------\n" if ($debug); 432 | my @internetroute=TraceRoute("8.8.8.8","8.8.8.8/31"); 433 | print "INTERNET GATEWAY ".join("-->",@internetroute)."\n" if ($debug); 434 | 435 | # 436 | # get default gateways & routes 437 | print "--------------- RESCAN GATEWAYS & ROUTES -------------------------------\n" if ($debug); 438 | foreach my $ipaddress (sort keys %subnets) { 439 | my $subnet=$subnets{$ipaddress}; 440 | print " IP=$ipaddress ".join("-->",TraceRoute($ipaddress,$subnet))."\n\n" if ($debug); 441 | } 442 | 443 | # 444 | # Add hostname to IP 445 | sub NAME(@) { 446 | my $ipaddress=shift; 447 | my $name=$ipaddress; 448 | $name=$host{$ipaddress}{'hostname'}."\\n".$name if (exists $host{$ipaddress}{'hostname'}); 449 | return $name; 450 | } 451 | 452 | # 453 | # gather scanned and cached ip(s). 454 | my %ipall; 455 | foreach my $ipaddress (sort keys %subnets) { 456 | print "ipaddress=$ipaddress,subnet=$subnets{$ipaddress}\n" if ($debug); 457 | $ipall{$ipaddress}=$subnets{$ipaddress}; 458 | } 459 | foreach my $ipaddress (sort keys %ipcache) { 460 | print "ipaddress=$ipaddress,subnet=$ip2subnet{$ipaddress}\n" if ($debug); 461 | $ipall{$ipaddress}=$ip2subnet{$ipaddress}; 462 | } 463 | 464 | # 465 | # Compose subnet and host data 466 | my @nodes; 467 | my @links; 468 | my $tabledata=""; 469 | foreach my $ipaddress (sort keys %ipall) { 470 | print "-------------->> $ipaddress is scanned\n" if ((exists $subnets{$ipaddress}) && ($debug)); 471 | print "-------------->> $ipaddress is cached\n" if ((exists $ipcache{$ipaddress}) && ($debug)); 472 | my @basics; 473 | my @details; 474 | my @ports; 475 | my ($subnet,$hostname,$name,$gateway,$subnetmask,$devicetype,$running,$mac,$vendor,$status,$latency,$hop,$os_cpe,$os_details,$ports,$fact,$port,$link,$firstscanned,$lastscanned,$timesscanned,$totalscans,$color,$ostype); 476 | $subnet= $ip2subnet{$ipaddress}; 477 | if (exists $subnets{$ipaddress}) { 478 | $gateway= $gateway{$subnets{$ipaddress}} if (exists $gateway{$subnets{$ipaddress}}); 479 | $subnetmask=$cidr{$subnet}{'subnetmask'} if (exists $cidr{$subnet}); 480 | $hostname= $host{$ipaddress}{'hostname'} if (exists $host{$ipaddress}{'hostname'}); 481 | $devicetype=$host{$ipaddress}{'devicetype'} if (exists $host{$ipaddress}{'devicetype'}); 482 | $running= $host{$ipaddress}{'running'} if (exists $host{$ipaddress}{'running'}); 483 | $running=~ s/(.{45,60}[^\s,]+)[\s,]+/$1\\n/g; 484 | $vendor= $host{$ipaddress}{'vendor'} if (exists $host{$ipaddress}{'vendor'}); 485 | $status= $host{$ipaddress}{'status'}||"up"; 486 | $latency= $host{$ipaddress}{'latency'} if (exists $host{$ipaddress}{'latency'}); 487 | $hop= $host{$ipaddress}{'hops'} if (exists $host{$ipaddress}{'hops'}); 488 | $os_cpe= $host{$ipaddress}{'os_cpe'} if (exists $host{$ipaddress}{'os_cpe'}); 489 | $os_cpe=~ s/(.{45,60}[^\s,]+)[\s,]+/$1\\n/g; 490 | $os_details=$host{$ipaddress}{'os_details'} if (exists $host{$ipaddress}{'os_details'}); 491 | $os_details=~s/(.{45,60}[^\s,]+)[\s,]+/$1\\n/g; 492 | $ports= $host{$ipaddress}{'ports'} if (exists $host{$ipaddress}{'ports'}); 493 | $mac= $host{$ipaddress}{'mac'} if (exists $host{$ipaddress}{'mac'}); 494 | $mac= $hostmac{$ipaddress} if ((exists $hostmac{$ipaddress}) && (!$mac)); 495 | $fact= join("\\n",@{$fact{$ipaddress}}) if ((exists $fact{$ipaddress}) && (@{$fact{$ipaddress}})); 496 | $fact=~ s/(.{45,60}[^\s,]+)[\s,]+/$1\\n/g; 497 | $port= join("\\n",@{$port{$ipaddress}}) if ((exists $port{$ipaddress}) && (@{$port{$ipaddress}})); 498 | $firstscanned=strftime("%F %T", localtime); 499 | $lastscanned= strftime("%F %T", localtime); 500 | 501 | # 502 | # Gather host info 503 | my $info=""; 504 | $info.= $host{$ipaddress}{'os_cpe'} if (exists $host{$ipaddress}{'os_cpe'}); 505 | $info.= $host{$ipaddress}{'os_details'} if (exists $host{$ipaddress}{'os_details'}); 506 | $info.= $host{$ipaddress}{'vendor'} if (exists $host{$ipaddress}{'vendor'}); 507 | $info.= $host{$ipaddress}{'devicetype'} if (exists $host{$ipaddress}{'devicetype'}); 508 | $info.= $host{$ipaddress}{'http-title'} if (exists $host{$ipaddress}{'http-title'}); 509 | $info.= $host{$ipaddress}{'service_info'} if (exists $host{$ipaddress}{'service_info'}); 510 | $info.= $port if ($port); 511 | 512 | # 513 | # Determine color, os and hosttype 514 | my ($c,$o,$d,$r)=(($host{$ipaddress}{'color'} || "gold"),"unknown",($devicetype||"unknown")); 515 | ($c,$o)= ("tomato","unknown") if ($info =~ /hewlett\spackard/i); 516 | ($c,$o)= ("lightgreen","unknown") if ($info =~ /intel/i); 517 | ($c,$o)= ("lightsalmon","Linux") if ($info =~ /linux/i); 518 | ($c,$o,$d)=("lime","IOS","media device|phone") if ($info =~ /\bios|apple/i); 519 | ($c,$o,$d)=("green","Android","phone") if ($info =~ /android|Motorola\sMobility/i); 520 | ($c,$o,$d)=("dodgerblue","Windows","general purpose") if ($info =~ /windows/i); 521 | ($c,$o,$d)=("chartreuse","Linux","switch") if ($info =~ /switch|netgear/i); 522 | ($c,$o,$d)=("olivedrab","Android","phone") if ($info =~ /oneplus/i); 523 | ($c,$o,$d)=("chocolate","Linux","router") if ($info =~ /router/i); 524 | ($c,$o,$d)=("tomato","Linux","printer") if ($info =~ /printer|laserjet/i); 525 | ($c,$o,$d)=("antiquewhite","Linux","nas") if ($info =~ /Segate\sTechnology/i); 526 | ($c,$o,$r)=("orchid","Linux","Google Chrome Cast") if ($port =~ /chromecast/i); 527 | ($c,$o,$d,$r)=("sienna","Linux","bridge","philips hue bridge") if ($info =~ /Philips\sHue/i); 528 | ($c,$o,$r)=("yellowgreen","Linux","samsung tv") if ($info =~ /Samsung\sAllShare/i); 529 | ($c,$o,$r)=("palevioletred","Linux","QNAP") if ($info =~ /qnap/i); 530 | ($c,$o,$r)=("orangered","Linux","internet radio") if ($info =~ /Internet\sRadio/i); 531 | $c= "lightblue" if ($info =~ /raspberry/i); 532 | $c= "orange" if (exists $route{$ipaddress}); 533 | $c= "aquamarine" if ((exists $gateway{$subnet}) && ($gateway{$subnet} =~ /^$ipaddress$/)); 534 | $color=$c; 535 | $ostype=$o; 536 | $devicetype=$d; 537 | $running=$r." ".$running if ($r); 538 | 539 | # 540 | # Remove cpe: and double words 541 | print ">>$os_cpe<< " if ($debug); 542 | $os_cpe =~ s/cpe://g; 543 | print ">>$os_cpe<< " if ($debug); 544 | $os_cpe =~ s/(\/?\b\S{4,50})\s*(.+)\1/${1}${2}\//i; 545 | print ">>$os_cpe<< \n" if ($debug); 546 | 547 | # 548 | # Gather basics, details and ports 549 | push(@basics, "Subnet: " .$subnet); 550 | push(@basics, "Gateway: " .$gateway) if ($gateway); 551 | push(@basics, "Netmask: " .$subnetmask) if ($subnetmask); 552 | push(@basics, "Device type: " .$devicetype) if ($devicetype); 553 | push(@basics, "Running: " .$running) if ($running); 554 | push(@basics, "MAC: " .$mac) if ($mac); 555 | push(@basics, "MAC Vendor: " .$vendor) if ($vendor); 556 | push(@basics, "OS type: " .$ostype) if ($ostype); 557 | push(@details,"First Scanned: ".$firstscanned) if ($firstscanned); 558 | push(@details,"Last Scanned: " .$lastscanned) if ($lastscanned); 559 | push(@details,"Times Scanned: "."first time"); 560 | push(@details,"Status: " .$status) if ($status); 561 | push(@details,"Latency: " .$latency) if ($latency); 562 | push(@details,"Hops: " .$hop) if ($hop); 563 | push(@details,"OC CPE: " .$os_cpe) if ($os_cpe); 564 | push(@details,"OS Details: " .$os_details) if ($os_details); 565 | push(@details,"Warnings: " .$fact) if ($fact); 566 | push(@ports, $port) if ($port); 567 | 568 | # 569 | # IP address and hostname 570 | $name=NAME($ipaddress); 571 | } 572 | 573 | # 574 | # Read host object from file 575 | if (exists $ipcache{$ipaddress}) { 576 | my $file=$ipcache{$ipaddress}; 577 | print "READ CACHE FILE=$file\n" if ($debug); 578 | my @file=`cat $file`; 579 | foreach my $line (@file) { 580 | chomp($line); 581 | next if ($line=~/^\s*$/); 582 | my @var=split(/##/,$line); 583 | foreach my $var (@var) { 584 | $var=~s/NEWLINE/\\n/g; 585 | print "VAR=>>$var<<\n"; 586 | if (exists $subnets{$ipaddress}) { 587 | # 588 | # Host is scanned 589 | my $h=$1 if ($var =~ /HOSTNAME:(.+)$/); 590 | my $m=$1 if ($var =~ /MAC:(.+)$/); 591 | my $d=$1 if ($var =~ /DEVICETYPE:(.+)$/); 592 | my $r=$1 if ($var =~ /RUNNING:(.+)$/); 593 | if ((($h) && ($hostname) && ($h !~ /^$hostname$/)) || 594 | (($m) && ($mac) && ($m !~ /^$mac$/)) || 595 | (($d) && ($devicetype) && ($d !~ /^$devicetype$/)) || 596 | (($r) && ($running) && ($r !~ /^$running$/))) { 597 | print "Cache file does not match scanned host $ipaddress! Cache file $file will be removed!\n" if ($debug); 598 | unlink($file); 599 | } else { 600 | if ($var =~ /TIMESSCANNED:(.+)$/) { 601 | $timesscanned=$1; 602 | if ($timesscanned=~ /^(\d+)\/(\d+)$/) { 603 | ($timesscanned,$totalscans)=($1,$2); 604 | } elsif ($timesscanned=~/^(\d+)$/) { 605 | ($timesscanned,$totalscans)=($1,$1); 606 | } else { 607 | ($timesscanned,$totalscans)=(1,1); 608 | } 609 | $totalscans+=1; 610 | $timesscanned+=1; 611 | } 612 | $firstscanned=$1 if ($var =~ /FIRSTSCANNED:(.+)$/); 613 | foreach my $index (0 .. $#details) { 614 | $details[$index]=~s/Times\sScanned:.*$/Times Scanned: $timesscanned\/$totalscans/g; 615 | $details[$index]=~s/First\sScanned:\s.+$/First Scanned: $firstscanned/g; 616 | } 617 | } 618 | } else { 619 | # 620 | # Host is down 621 | @basics =split(/@@/,$1) if ($var =~ /BASICS:(.+)\z/sm); 622 | @details =split(/@@/,$1) if ($var =~ /DETAILS:(.+)\z/sm); 623 | @ports =split(/@@/,$1) if ($var =~ /PORTS:(.+)\z/sm); 624 | $name =$1 if ($var =~ /^NAME:(.+)\z/sm); 625 | $color =$1 if ($var =~ /COLOR:(.+)$/); 626 | $subnet =$1 if ($var =~ /SUBNET:(.+)$/); 627 | $hostname =$1 if ($var =~ /HOSTNAME:(.+)$/); 628 | $mac =$1 if ($var =~ /MAC:(.+)$/); 629 | $vendor =$1 if ($var =~ /VENDOR:(.+)$/); 630 | $subnetmask =$1 if ($var =~ /SUBNETMASK:(.+)$/); 631 | $gateway =$1 if ($var =~ /GATEWAY:(.+)$/); 632 | $devicetype =$1 if ($var =~ /DEVICETYPE:(.+)$/); 633 | $ostype =$1 if ($var =~ /OSTYPE:(.+)$/); 634 | $running =$1 if ($var =~ /RUNNING:(.+)$/); 635 | $hop =$1 if ($var =~ /HOP:(.+)$/); 636 | $os_cpe =$1 if ($var =~ /OS_CPE:(.+)\z/sm); 637 | $os_details =$1 if ($var =~ /OS_DETAILS:(.+)\z/sm); 638 | $ports =$1 if ($var =~ /PORTS:(.+)\z/sm); 639 | $link =$1 if ($var =~ /LINK:(.+)\z/sm); 640 | $firstscanned=$1 if ($var =~ /FIRSTSCANNED:(.+)$/); 641 | $lastscanned =$1 if ($var =~ /LASTSCANNED:(.+)$/); 642 | if ($var =~ /TIMESSCANNED:(.+)$/) { 643 | $timesscanned=$1; 644 | if ($timesscanned=~ /^(\d+)\/(\d+)$/) { 645 | ($timesscanned,$totalscans)=($1,$2); 646 | } elsif ($timesscanned=~/^(\d+)$/) { 647 | ($timesscanned,$totalscans)=($1,$1); 648 | } else { 649 | ($timesscanned,$totalscans)=(1,1); 650 | } 651 | $totalscans+=1; 652 | } 653 | $status ="down"; 654 | foreach my $index (0 .. $#details) { 655 | $details[$index]=~s/Times\sScanned:.*$/Times Scanned: $timesscanned\/$totalscans/g; 656 | $details[$index]=~s/Status:\s.+$/Status: down/g; 657 | } 658 | } 659 | } 660 | } 661 | print "IPADDRESS=$ipaddress, TIMES_SCANNED=$timesscanned/$totalscans, FIRST_SCANNED=$firstscanned, LAST_SCANNED=$lastscanned, STATUS=$status, FILE=$file\n" if ($debug); 662 | $timesscanned="$timesscanned/$totalscans"; 663 | } 664 | 665 | # 666 | # Save links between hostobjects 667 | if ($link) { 668 | print "PUSH LINK FROM CACHE: -->>$link<<-- \nNAME: -->>$name<<--\n"; 669 | push(@links,$link); 670 | } elsif ((exists $gateway{$ipall{$ipaddress}}) && (NAME($gateway{$ipall{$ipaddress}}) !~ /${name}/)) { 671 | $link="{ from: \"${name}\", to: \"".NAME($gateway{$ipall{$ipaddress}})."\" }"; 672 | print "PUSH NEW CREATED LINK: -->>$link<<--\nNAME: -->>$name<<--\n"; 673 | push(@links,$link); 674 | } else { 675 | print "NO LINK PUSHED! NAME [".NAME($gateway{$ipall{$ipaddress}})."] matches [".$name."]! Gateway=".($gateway{$ipaddress}||"none").", subnet=".$ipall{$ipaddress}.", gateway=".$gateway{$ipall{$ipaddress}}.", ip=$ipaddress\n"; 676 | } 677 | 678 | # 679 | # Store host objects 680 | push(@nodes,"{ key: \"${name}\", basics: \"".join("\\n",@basics)."\", details: \"".join("\\n",@details)."\",ports: \"".join("\\n",@ports)."\", color: \"$color\", category: \"name\" }"); 681 | 682 | # 683 | # Write to cache file 684 | if (exists $subnets{$ipaddress}) { 685 | my $output="##BASICS:" .join("@@",@basics). 686 | "##DETAILS:" .join("@@",@details). 687 | "##PORTS:" .join("@@",@ports). 688 | "##NAME:" .$name. 689 | "##COLOR:" .$color. 690 | "##SUBNET:" .$subnet. 691 | "##HOSTNAME:" .($hostname ||""). 692 | "##MAC:" .($mac ||""). 693 | "##VENDOR:" .($vendor ||""). 694 | "##SUBNETMASK:" .($subnetmask ||""). 695 | "##GATEWAY:" .($gateway ||""). 696 | "##DEVICETYPE:" .($devicetype ||""). 697 | "##OSTYPE:" .($ostype ||""). 698 | "##RUNNING:" .($running ||""). 699 | "##HOP:" .($hop ||""). 700 | "##OS_CPE:" .($os_cpe ||""). 701 | "##OS_DETAILS:" .($os_details ||""). 702 | "##PORTS:" .($ports ||""). 703 | "##LINK:" .($link ||""). 704 | "##FIRSTSCANNED:".($firstscanned||strftime("%F %T", localtime)). 705 | "##LASTSCANNED:" .($lastscanned ||strftime("%F %T", localtime)). 706 | "##TIMESSCANNED:".($timesscanned||"1/1")."##"; 707 | $output=~s/\Q\n\E/NEWLINE/gm; 708 | my $datafile="nmapdata/$ipaddress"; 709 | $datafile=~s/\./_/g; 710 | $datafile.=".txt"; 711 | open my $out, '>', "$datafile" or die "Can't write '$datafile' file: $!"; 712 | print $out $output; 713 | close $out; 714 | } 715 | 716 | # 717 | # construct html table row 718 | $tabledata.=' 719 | '.($status ||"" ).' 720 | '.($firstscanned||"" ).' 721 | '.($lastscanned ||"" ).' 722 | '.($timesscanned||"1").' 723 | '.($subnet ||"" ).' 724 | '.($hostname ||"" ).' 725 | '.($ipaddress ||"" ).' 726 | '.($mac ||"" ).' 727 | '.($vendor ||"" ).' 728 | '.($subnetmask ||"" ).' 729 | '.($gateway ||"" ).' 730 | '.($devicetype ||"" ).' 731 | '.($ostype ||"" ).' 732 | '.($running ||"" ).' 733 | '.($hop ||'0' ).' 734 | '.($os_cpe ||"" ).' 735 | '.($os_details ||"" ).' 736 | '.($ports ||"" ).' 737 | 738 | '; 739 | } 740 | 741 | # 742 | # Add Internet host object + link 743 | if ($internetgateway) { 744 | push(@nodes,"{ key: \"Internet Gateway\", basics: \"Hops:".join("\\n",@internetroute)."\", details: \"".join("--->",@internetroute)."\",ports: \"*any*\", color: \"yellow\", category: \"name\" }"); 745 | push(@links,"{ from: \"".NAME($internetgateway)."\", to: \"Internet Gateway\" }"); 746 | } 747 | 748 | # 749 | # Add link for each routes 750 | foreach my $route (keys %route) { 751 | next if (! exists $subnets{$route}); 752 | my $gateway=$route{$route}; 753 | next if (! exists $subnets{$gateway}); 754 | if ($gateway =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/) { 755 | push(@links,"{ from: \"".NAME($gateway)."\", to: \"".NAME($route)."\" }"); 756 | } 757 | } 758 | 759 | 760 | # 761 | # Add data to map.html 762 | my $node= "diagram.model.nodeDataArray = [".join(",",@nodes)."];"; 763 | my $link= "diagram.model.linkDataArray = [".join(",",@links)."];"; 764 | # 765 | # Open output file 766 | open my $out, '>', "map.html" or die "Can't write map.html file: $!"; 767 | # 768 | # Read html data from __DATA__ 769 | while( ) 770 | { 771 | # Insert host data and links 772 | s/^\s*diagram\.model\.nodeDataArray\s=\s\[.+$/${node}/g; 773 | s/^\s*diagram\.model\.linkDataArray\s=\s\[.+$/${link}/g; 774 | s/^INSERTTABLEDATA/${tabledata}/; 775 | print $out $_; 776 | } 777 | 778 | close $out; 779 | 780 | # 781 | # End for perl script 782 | exit 783 | 784 | # 785 | # HTML data for map.html 786 | __DATA__ 787 | 788 | 789 | 790 | 791 | 792 | Nmap scan 793 | 794 | 838 | 839 | 840 |
841 | 842 | 843 |

Network map

844 | 970 | 971 | 972 | 973 |
974 |
975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | INSERTTABLEDATA 1000 | 1001 |
StatusFirst ScannedLast ScannedTimes
Scanned
NetworkHost nameIP AddressMAC AddressMAC VendorNetmaskGatewayDevice typeOS typeRunningHopsOS CPOS DetailsPorts
1002 | 1003 | 1004 | 1053 | 1054 |
1055 | 1056 | 1057 | 1058 | 1059 | -------------------------------------------------------------------------------- /tablefilter/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Max Guglielmi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included 14 | in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /tablefilter/style/colsVisibility.css: -------------------------------------------------------------------------------- 1 | /** 2 | * tablefilter v0.5.6 by Max Guglielmi 3 | * build date: 2017-04-10T16:27:15.240Z 4 | * MIT License 5 | */ 6 | span.colVisSpan{text-align:left;}span.colVisSpan a.colVis{display:inline-block;padding:7px 5px 0;font-size:inherit;font-weight:inherit;vertical-align:top}div.colVisCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;border:1px solid #ccc;height:auto;width:250px;background-color:#fff;margin:35px 0 0 -100px;z-index:10000;padding:10px 10px 10px 10px;text-align:left;font-size:12px;}div.colVisCont:after,div.colVisCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.colVisCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.colVisCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.colVisCont p{margin:6px auto 6px auto}div.colVisCont a.colVis{display:initial;font-weight:inherit}ul.cols_checklist{padding:0;margin:0;list-style:none;}ul.cols_checklist label{display:block}ul.cols_checklist input{vertical-align:middle;margin:2px 5px 2px 1px}li.cols_checklist_item{padding:4px;margin:0;}li.cols_checklist_item:hover{background-color:#335ea8;color:#fff}.cols_checklist_slc_item{background-color:#335ea8;color:#fff} -------------------------------------------------------------------------------- /tablefilter/style/filtersVisibility.css: -------------------------------------------------------------------------------- 1 | /** 2 | * tablefilter v0.5.6 by Max Guglielmi 3 | * build date: 2017-04-10T16:27:15.240Z 4 | * MIT License 5 | */ 6 | span.expClpFlt a.btnExpClpFlt{width:35px;height:35px;display:inline-block;}span.expClpFlt a.btnExpClpFlt:hover{background-color:#f4f4f4}span.expClpFlt img{padding:8px 11px 11px 11px} -------------------------------------------------------------------------------- /tablefilter/style/tablefilter.css: -------------------------------------------------------------------------------- 1 | /** 2 | * tablefilter v0.5.6 by Max Guglielmi 3 | * build date: 2017-04-10T16:27:15.240Z 4 | * MIT License 5 | */ 6 | .activeHeader{background-color:#66afe9 !important;color:#fff !important} 7 | .even{background-color:#fff}.odd{background-color:#f9f9f9} 8 | 9 | .ezActiveRow{background-color:#2852a8 !important;color:#fff}.ezSelectedRow{background-color:#316ac5 !important;color:#fff}.ezActiveCell{background-color:#d9e8fb !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#ffdc61 !important;font-weight:bold;color:#000 !important}.ezUnselectable{-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.ezInputEditor{width:95%;height:auto;font-size:inherit;border:1px solid #aaccf6}.ezTextareaEditor{width:95%;height:35px;font-size:inherit;border:1px solid #aaccf6}.ezSelectEditor{width:100%;font-size:inherit;border:1px solid #aaccf6}.ezModifiedCell{background:transparent url("themes/bg_mod_cell.png") 0 0 no-repeat}select[multiple="multiple"].ezSelectEditor{height:35px}.ezCommandEditor{margin:2px;}.ezCommandEditor button,.ezCommandEditor input[type="button"]{min-height:22px;margin:1px;padding:3px;border:1px solid #ccc;background:#fff;border-radius:4px 4px 4px 4px;-moz-border-radius:4px 4px 4px 4px;}.ezCommandEditor button:hover,.ezCommandEditor input[type="button"]:hover{border:1px solid #999}.ezCommandEditor img{border:0;vertical-align:middle;margin:2px}.ezOpacity{opacity:.6}.alignLeft{text-align:left}.alignCenter{text-align:center}.alignRight{text-align:right} 10 | .div_checklist{width:100%;height:90px;line-height:24px;border:1px solid #f4f4f4;overflow:auto;text-align:left;background-color:#fff;color:#444;}.div_checklist ul.flt_checklist{padding:0 !important;margin:0 !important;list-style:none !important}.div_checklist li.flt_checklist_item{padding:1px !important;margin:0 !important;font-size:6px !important;border-bottom:1px solid #f4f4f4 !important;}.div_checklist li.flt_checklist_item:hover{background-color:#335ea8 !important;color:#fff !important}.div_checklist label{display:block !important}.div_checklist input{vertical-align:middle !important;margin:2px 5px 2px 1px !important}.flt_checklist_item_disabled{background-color:#e5e5e5}.flt_checklist_slc_item{background-color:#335ea8 !important;color:#fff !important} 11 | .fltrow{height:1em;background-color:#eaeaea;}.fltrow td{border-bottom:1px solid #ccc !important;border-top:1px solid #f4f4f4;border-left:1px solid #ccc;border-right:1px solid #f4f4f4;padding:.2em !important;}.fltrow td:last-child{border-right:1px solid #ccc}.btnflt{height:35px;font-family:inherit;font-size:inherit;vertical-align:middle;margin:0 2px 0 2px;padding:0 1px 0 1px}.btnflt_icon{font-family:inherit;font-size:inherit;width:35px;height:35px;cursor:pointer !important;border:0 !important;vertical-align:middle;background:transparent url("themes/btn_filter.png") center center no-repeat !important}.flt,.flt_s,.single_flt{font-family:inherit;display:block;color:#444;background-color:#fff;border:1px inset #f4f4f4;margin:0;padding:0 0 0 .2em;width:100%;height:35px;vertical-align:middle;border-radius:2px;box-sizing:border-box;}.flt:focus,.flt_s:focus,.single_flt:focus{border-color:#66afe9;outline:0 none;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6);box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}select.flt_multi{font-family:inherit;color:#444;background-color:#fff;border:1px solid #f4f4f4;margin:0;padding:.2em;width:100%;height:90px;vertical-align:middle;box-sizing:border-box;}select.flt_multi option{padding-top:5px;padding-bottom:5px}.flt_s{width:60%;box-sizing:initial;display:initial}.single_flt{width:70%;box-sizing:initial;display:initial}div.popUpFilter{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;margin:30px auto 0 0;position:absolute;display:none;width:100px;background-color:#eaeaea;border:1px solid #eaeaea;padding:0}div.popUpFilter:after,div.popUpFilter:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.popUpFilter:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.popUpFilter:before{border-color:rgba(255,255,255,0);border-bottom-color:#eaeaea;border-width:12px;margin-left:-12px} 12 | div.grd_Cont{-webkit-box-shadow:4px 4px 10px 0 rgba(50,50,50,0.75);-moz-box-shadow:4px 4px 10px 0 rgba(50,50,50,0.75);box-shadow:4px 4px 10px 0 rgba(50,50,50,0.75);width:800px;height:auto;overflow:hidden;padding:3px 3px 3px 3px;background-color:#c8e0fb;border:1px solid #99bbe8;}div.grd_Cont .fltrow{background-color:transparent}div.grd_Cont .flt{border:1px solid #99bbe8;width:100%;}div.grd_Cont .flt :focus{border:1px solid #558dd9}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#dfe8f6}div.grd_Cont .no-results{background-color:transparent}div.grd_Cont .sort-arrow{position:initial}div.grd_tblCont{height:400px;width:800px;background:#fff;overflow-x:auto;overflow-y:scroll}div.grd_headTblCont{height:auto;width:800px;overflow:hidden;border-bottom:1px solid #99bbe8;background-color:#c8e0fb}div.grd_tblCont table,div.grd_headTblCont table{border-collapse:collapse;table-layout:fixed;box-sizing:initial}div.grd_tblCont table{border-right:1px solid #99bbe8;box-sizing:initial}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{height:35px;background-color:#c8e0fb;padding:.1em .5em;color:#333;border-right:1px solid #99bbe8 !important;overflow:hidden;text-overflow:ellipsis}div.grd_headTblCont table td{padding:.2em .2em}div.grd_tblCont table td{padding:.5em .7em;border-bottom:1px solid #99bbe8;overflow:hidden;text-overflow:ellipsis}.grd_inf{clear:both;width:auto;height:35px;background-color:#c8e0fb;margin:0;padding:1px 3px 1px 3px;border-top:1px solid #99bbe8;}.grd_inf a{color:#333;text-decoration:none;font-weight:bold;}.grd_inf a:hover{text-decoration:underline;background-color:transparent}.grd_inf input.reset:hover{background-color:transparent}.grd_inf .mdiv{width:40% !important}.grd_inf .ldiv div{border:0}.grd_inf .helpBtn{border:0 !important}.grd_inf div.status{position:absolute;float:none !important;height:auto !important;margin:19px 0 !important;font-size:12px;color:#333;border:0 !important}.grd_inf div.tot{border:0 !important} 13 | .helpBtn{display:inline-block;height:27px;margin:0;padding:8px 15px 0 15px;vertical-align:top;}.helpBtn:hover{background-color:#f4f4f4}div.helpCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;width:300px;padding:10px;margin:45px 0 0 -150px;border:1px solid #ccc;line-height:20px;font-size:inherit;color:#333;background:#fff;text-align:left;}div.helpCont:after,div.helpCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.helpCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.helpCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.helpCont a{color:#c00;text-decoration:underline;font-weight:normal}div.helpCont a.close{color:#333 !important;text-decoration:none !important;font-weight:bold;}div.helpCont a.close:hover{text-decoration:none}div.helpCont hr{border:1px solid #ccc}div.helpFooter{margin:10px 0 0 0;}div.helpFooter h4{margin:2px 2px 2px 2px;color:#333} 14 | span.keyword{font-weight:700;font-style:italic;border-bottom:1px dotted #ccc} 15 | .loader{position:absolute;padding:.5em .7em;margin:10em 0 0 3em;width:auto;z-index:1000;font-weight:600;background-color:#a7a7a8;vertical-align:middle;border-radius:10px;color:#fff;text-shadow:1px 1px #333} 16 | .no-results{display:none;color:#333;margin:0;padding:1em 0;text-align:center;max-height:5em;background-color:#f4f4f4} 17 | select.pgSlc{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;vertical-align:middle}select.pgSlc:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}input.pgNbInp{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;width:35px}input.pgNbInp:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}input.pgInp,.nextPage,.previousPage,.firstPage,.lastPage{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;vertical-align:middle;width:35px;border:0;font-weight:bold}input.pgInp:focus,.nextPage:focus,.previousPage:focus,.firstPage:focus,.lastPage:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}.nextPage{background:transparent url("themes/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background-color:#f4f4f4 !important}.previousPage{background:transparent url("themes/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background-color:#f4f4f4 !important}.firstPage{background:transparent url("themes/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background-color:#f4f4f4 !important}.lastPage{background:transparent url("themes/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background-color:#f4f4f4 !important}span.nbpg{padding:0 5px}select.rspg{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;margin:0 0 0 5px;vertical-align:middle}select.rspg:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}span.rspgSpan{font-size:inherit} 18 | input.reset{display:inline-block;width:35px;height:35px;border:0;background:transparent url("themes/btn_clear_filters.png") center center no-repeat;vertical-align:top;}input.reset:hover{background-color:#f4f4f4} 19 | div.tot{float:left;overflow:hidden;min-width:150px;height:100%;margin:0;padding:.5em;vertical-align:middle;}div.tot span{font-weight:500} 20 | .sort-arrow{position:absolute;display:none;width:11px;height:11px;margin:0;background-position:center center;background-repeat:no-repeat}.descending{display:inline;background-image:url("themes/downsimple.png")}.ascending{display:inline;background-image:url("themes/upsimple.png")} 21 | div.status{float:left;overflow:hidden;min-width:120px;height:100%;margin:0;padding:.5em;}div.status span{font-size:inherit} 22 | table.TF{font-family:monospace;border-spacing:0;border:0;}table.TF th{height:35px;margin:0;background-color:#eaeaea;border-bottom:2px solid #ccc;border-top:2px solid #f4f4f4;border-left:2px solid #ccc;border-right:2px solid #f4f4f4;padding:.1em .7em;color:#333;}table.TF th:last-child{border-right:2px solid #ccc}table.TF td{margin:0;padding:.3em .5em;border-bottom:2px solid #c6c6c6;font-size:12px}table.TF.resp{display:block;overflow-x:auto;}table.TF.resp .sort-arrow{position:initial} 23 | .inf{clear:both;width:auto;height:35px;background-color:#fff;font-size:inherit;margin:0;padding:0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;overflow:hidden;border-top-left-radius:3px;border-top-right-radius:3px;}.inf a{color:#333;text-decoration:none;font-weight:bold;box-sizing:initial;}.inf a:hover{text-decoration:underline}.ldiv{float:left;width:30%;position:inherit;text-align:left}.mdiv{float:left;width:38%;position:inherit;text-align:center;padding:0}.rdiv{float:right;width:30%;position:inherit;text-align:right} 24 | -------------------------------------------------------------------------------- /tablefilter/style/themes/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/blank.png -------------------------------------------------------------------------------- /tablefilter/style/themes/btn_clear_filters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/btn_clear_filters.png -------------------------------------------------------------------------------- /tablefilter/style/themes/btn_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/btn_filter.png -------------------------------------------------------------------------------- /tablefilter/style/themes/btn_first_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/btn_first_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/btn_last_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/btn_last_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/btn_next_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/btn_next_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/btn_previous_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/btn_previous_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/default.css: -------------------------------------------------------------------------------- 1 | /** 2 | * tablefilter v0.5.6 by Max Guglielmi 3 | * build date: 2017-04-10T16:27:15.240Z 4 | * MIT License 5 | */ 6 | table.TF{border-left:1px solid #ccc;border-top:none;border-right:none;border-bottom:none;}table.TF th{background:#ebecee url("images/bg_th.jpg") left top repeat-x;border-bottom:1px solid #d0d0d0;border-right:1px solid #d0d0d0;border-left:1px solid #fff;border-top:1px solid #fff;color:#333}table.TF td{border-bottom:1px dotted #999;padding:5px}.fltrow{background-color:#ebecee !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #666 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #999 !important}input.flt{width:99% !important}.inf{height:$min-height;background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important}input.reset{background:transparent url("images/btn_eraser.gif") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background:transparent url("images/btn_over_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background:transparent url("images/btn_over_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background:transparent url("images/btn_over_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background:transparent url("images/btn_over_last_page.gif") center center no-repeat !important}div.grd_Cont{background-color:#ebecee !important;border:1px solid #ccc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#d5d5d5}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important;}div.grd_headTblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#ebecee url("images/bg_th.jpg") left top repeat-x !important;border-bottom:1px solid #d0d0d0 !important;border-right:1px solid #d0d0d0 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #999 !important}.grd_inf{background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important;border-top:1px solid #d0d0d0 !important}.loader{border:1px solid #999}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#fff}.odd{background-color:#d5d5d5}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#999 !important} -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/bg_infDiv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/bg_infDiv.jpg -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/bg_th.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/bg_th.jpg -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_eraser.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_eraser.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_first_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_first_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_last_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_last_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_next_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_next_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_over_eraser.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_over_eraser.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_over_first_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_over_first_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_over_last_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_over_last_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_over_next_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_over_next_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_over_previous_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_over_previous_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/btn_previous_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/btn_previous_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/default/images/img_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/default/images/img_loading.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/downsimple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/downsimple.png -------------------------------------------------------------------------------- /tablefilter/style/themes/icn_clp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/icn_clp.png -------------------------------------------------------------------------------- /tablefilter/style/themes/icn_exp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/icn_exp.png -------------------------------------------------------------------------------- /tablefilter/style/themes/icn_filter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/icn_filter.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/icn_filterActive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/icn_filterActive.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/mytheme/images/bg_headers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/mytheme/images/bg_headers.jpg -------------------------------------------------------------------------------- /tablefilter/style/themes/mytheme/images/bg_infDiv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/mytheme/images/bg_infDiv.jpg -------------------------------------------------------------------------------- /tablefilter/style/themes/mytheme/images/btn_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/mytheme/images/btn_filter.png -------------------------------------------------------------------------------- /tablefilter/style/themes/mytheme/images/btn_first_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/mytheme/images/btn_first_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/mytheme/images/btn_last_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/mytheme/images/btn_last_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/mytheme/images/btn_next_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/mytheme/images/btn_next_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/mytheme/images/btn_previous_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/mytheme/images/btn_previous_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/mytheme/images/img_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/mytheme/images/img_loading.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/mytheme/mytheme.css: -------------------------------------------------------------------------------- 1 | /** 2 | * tablefilter v0.5.6 by Max Guglielmi 3 | * build date: 2017-04-10T16:27:15.240Z 4 | * MIT License 5 | */ 6 | table.TF{border-left:1px dotted #81963b;border-top:none;border-right:0;border-bottom:none;}table.TF th{background:#39424b url("images/bg_headers.jpg") left top repeat-x;border-bottom:0;border-right:1px dotted #d0d0d0;border-left:0;border-top:0;color:#fff}table.TF td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b;padding:5px}.fltrow{background-color:#81963b !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #687830 !important}input.flt{width:99% !important}.inf{background:#d8d8d8;height:$min-height}input.reset{width:53px;background:transparent url("images/btn_filter.png") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important}div.grd_Cont{background:#81963b url("images/bg_headers.jpg") left top repeat-x !important;border:1px solid #ccc !important;padding:0 1px 1px 1px !important;}div.grd_Cont .even{background-color:#bccd83}div.grd_Cont .odd{background-color:#fff}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important;}div.grd_tblCont table td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b}div.grd_tblCont table th,div.grd_headTblCont table th{background:transparent url("images/bg_headers.jpg") 0 0 repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;padding:0 4px 0 4px !important;color:#fff !important;height:35px !important}div.grd_headTblCont table td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;background-color:#81963b !important;padding:1px 3px 1px 3px !important}.grd_inf{background-color:#d8d8d8;border-top:1px solid #d0d0d0 !important}.loader{border:0 !important;background:#81963b !important}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#bccd83}.odd{background-color:#fff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#81963b !important} -------------------------------------------------------------------------------- /tablefilter/style/themes/skyblue/images/bg_skyblue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/skyblue/images/bg_skyblue.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/skyblue/images/btn_first_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/skyblue/images/btn_first_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/skyblue/images/btn_last_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/skyblue/images/btn_last_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/skyblue/images/btn_next_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/skyblue/images/btn_next_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/skyblue/images/btn_prev_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/skyblue/images/btn_prev_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/skyblue/images/icn_clear_filters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/skyblue/images/icn_clear_filters.png -------------------------------------------------------------------------------- /tablefilter/style/themes/skyblue/images/img_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/skyblue/images/img_loading.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/skyblue/skyblue.css: -------------------------------------------------------------------------------- 1 | /** 2 | * tablefilter v0.5.6 by Max Guglielmi 3 | * build date: 2017-04-10T16:27:15.240Z 4 | * MIT License 5 | */ 6 | table.TF{padding:0;color:#000;border-right:1px solid #a4bed4;border-top:1px solid #a4bed4;border-left:1px solid #a4bed4;border-bottom:0;}table.TF th{margin:0;color:inherit;background:#d1e5fe url("images/bg_skyblue.gif") 0 0 repeat-x;border-color:#fdfdfd #a4bed4 #a4bed4 #fdfdfd;border-width:1px;border-style:solid}table.TF td{margin:0;padding:5px;color:inherit;border-bottom:1px solid #a4bed4;border-left:0;border-top:0;border-right:0}.fltrow{background-color:#d1e5fe !important;}.fltrow th,.fltrow td{padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #a4bed4 !important}input.flt{width:99% !important}.inf{background-color:#e3efff !important;border:1px solid #a4bed4;height:$min-height;color:#004a6f}div.tot,div.status{border-right:0 !important}.helpBtn:hover{background-color:transparent}input.reset{background:transparent url("images/icn_clear_filters.png") center center no-repeat !important}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.nextPage:hover{background:#ffe4ab url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.previousPage{background:transparent url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.previousPage:hover{background:#ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.firstPage:hover{background:#ffe4ab url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.lastPage:hover{background:#ffe4ab url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.activeHeader{background:#ffe4ab !important;border:1px solid #ffb552 !important;color:inherit !important}div.grd_Cont{background-color:#d9eaed !important;border:1px solid #9cc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#e3efff}div.grd_headTblCont{background-color:#d9eaed !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#d9eaed url("images/bg_skyblue.gif") left top repeat-x;border-bottom:1px solid #a4bed4;border-right:1px solid #a4bed4 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #a4bed4 !important;border-right:0 !important;border-left:0 !important;border-top:0 !important}.grd_inf{background-color:#cce2fe;color:#004a6f;border-top:1px solid #9cc !important;}.grd_inf a{text-decoration:none;font-weight:bold}.loader{background-color:#2d8eef;border:1px solid #cce2fe;border-radius:5px}.even{background-color:#fff}.odd{background-color:#e3efff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.ezActiveRow{background-color:#ffdc61 !important;color:inherit}.ezSelectedRow{background-color:#ffe4ab !important;color:inherit}.ezActiveCell{background-color:#fff !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#fff !important;font-weight:bold;color:#000 !important} -------------------------------------------------------------------------------- /tablefilter/style/themes/transparent/images/btn_first_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/transparent/images/btn_first_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/transparent/images/btn_last_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/transparent/images/btn_last_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/transparent/images/btn_next_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/transparent/images/btn_next_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/transparent/images/btn_prev_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/transparent/images/btn_prev_page.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/transparent/images/icn_clear_filters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/transparent/images/icn_clear_filters.png -------------------------------------------------------------------------------- /tablefilter/style/themes/transparent/images/img_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/transparent/images/img_loading.gif -------------------------------------------------------------------------------- /tablefilter/style/themes/transparent/transparent.css: -------------------------------------------------------------------------------- 1 | /** 2 | * tablefilter v0.5.6 by Max Guglielmi 3 | * build date: 2017-04-10T16:27:15.240Z 4 | * MIT License 5 | */ 6 | table.TF{padding:0;color:inherit;border-right:1px solid transparent;border-top:1px solid transparent;border-left:1px solid transparent;border-bottom:0;}table.TF th{margin:0;color:inherit;background-color:transparent;border-color:transparent;border-width:1px;border-style:solid;}table.TF th:last-child{border-right:1px solid transparent}table.TF td{margin:0;padding:5px;color:inherit;border-bottom:1px solid transparent;border-left:0;border-top:0;border-right:0}.fltrow{background-color:transparent;}.fltrow th,.fltrow td{padding:1px 3px 1px 3px;border-bottom:1px solid transparent !important;}.fltrow th:last-child,.fltrow td:last-child{border-right:1px solid transparent}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #a4bed4}input.flt{width:99% !important}.inf{background-color:transparent;border:1px solid transparent;height:$min-height;color:inherit}div.tot,div.status{border-right:0 !important}.helpBtn:hover{background-color:transparent}input.reset{background:transparent url("images/icn_clear_filters.png") center center no-repeat !important}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.nextPage:hover{background:#f7f7f7 url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid #f7f7f7 !important}.previousPage{background:transparent url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.previousPage:hover{background:#f7f7f7 url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid #f7f7f7 !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.firstPage:hover{background:#f7f7f7 url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid #f7f7f7 !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.lastPage:hover{background:#f7f7f7 url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid #f7f7f7 !important}.activeHeader{background:#f7f7f7 !important;border:1px solid transparent;color:inherit !important}div.grd_Cont{-webkit-box-shadow:0 0 0 0 rgba(50,50,50,0.75);-moz-box-shadow:0 0 0 0 rgba(50,50,50,0.75);box-shadow:0 0 0 0 rgba(50,50,50,0.75);background-color:transparent;border:1px solid transparent;padding:0 !important;}div.grd_Cont .even{background-color:transparent}div.grd_Cont .odd{background-color:#f7f7f7}div.grd_headTblCont{background-color:transparent;border-bottom:none !important}div.grd_tblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:transparent;border-bottom:1px solid transparent;border-right:1px solid transparent !important;border-left:1px solid transparent;border-top:1px solid transparent}div.grd_tblCont table td{border-bottom:1px solid transparent;border-right:0 !important;border-left:0 !important;border-top:0 !important}.grd_inf{background-color:transparent;color:inherit;border-top:1px solid transparent;}.grd_inf a{text-decoration:none;font-weight:bold}.loader{background-color:#f7f7f7;border:1px solid #f7f7f7;border-radius:5px;color:#000;text-shadow:none}.even{background-color:transparent}.odd{background-color:#f7f7f7}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.ezActiveRow{background-color:#ccc !important;color:inherit}.ezSelectedRow{background-color:#ccc !important;color:inherit}.ezActiveCell{background-color:transparent;color:inherit;font-weight:bold}.ezETSelectedCell{background-color:transparent;font-weight:bold;color:inherit} -------------------------------------------------------------------------------- /tablefilter/style/themes/upsimple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tedsluis/nmap/95c07ec563640195606d2612bb30798d740292d7/tablefilter/style/themes/upsimple.png -------------------------------------------------------------------------------- /tablefilter/tf-0-6e52526f635250daf64a.js: -------------------------------------------------------------------------------- 1 | /** 2 | * tablefilter v0.5.6 by Max Guglielmi 3 | * build date: 2017-04-10T16:27:15.224Z 4 | * MIT License 5 | */ 6 | 7 | webpackJsonp([0],{436:function(t,e,n){function r(t){return n(i(t))}function i(t){var e=o[t];if(!(e+1))throw new Error("Cannot find module '"+t+"'.");return e}var o={"./array":67,"./array.js":67,"./const":15,"./const.js":15,"./cookie":120,"./cookie.js":120,"./dom":8,"./dom.js":8,"./emitter":69,"./emitter.js":69,"./event":17,"./event.js":17,"./extensions/advancedGrid/adapterEzEditTable":437,"./extensions/advancedGrid/adapterEzEditTable.js":437,"./extensions/advancedGrid/advancedGrid":439,"./extensions/advancedGrid/advancedGrid.js":439,"./extensions/colOps/colOps":440,"./extensions/colOps/colOps.js":440,"./extensions/colsVisibility/colsVisibility":441,"./extensions/colsVisibility/colsVisibility.js":441,"./extensions/filtersVisibility/filtersVisibility":442,"./extensions/filtersVisibility/filtersVisibility.js":442,"./extensions/sort/adapterSortabletable":438,"./extensions/sort/adapterSortabletable.js":438,"./extensions/sort/sort":443,"./extensions/sort/sort.js":443,"./feature":10,"./feature.js":10,"./modules/alternateRows":70,"./modules/alternateRows.js":70,"./modules/checkList":71,"./modules/checkList.js":71,"./modules/clearButton":72,"./modules/clearButton.js":72,"./modules/dateType":73,"./modules/dateType.js":73,"./modules/dropdown":74,"./modules/dropdown.js":74,"./modules/gridLayout":75,"./modules/gridLayout.js":75,"./modules/hash":121,"./modules/hash.js":121,"./modules/help":76,"./modules/help.js":76,"./modules/highlightKeywords":77,"./modules/highlightKeywords.js":77,"./modules/loader":78,"./modules/loader.js":78,"./modules/noResults":79,"./modules/noResults.js":79,"./modules/paging":80,"./modules/paging.js":80,"./modules/popupFilter":81,"./modules/popupFilter.js":81,"./modules/rowsCounter":82,"./modules/rowsCounter.js":82,"./modules/state":83,"./modules/state.js":83,"./modules/statusBar":84,"./modules/statusBar.js":84,"./modules/storage":122,"./modules/storage.js":122,"./number":68,"./number.js":68,"./root":14,"./root.js":14,"./sort":66,"./sort.js":66,"./string":19,"./string.js":19,"./tablefilter":123,"./tablefilter.js":123,"./types":11,"./types.js":11};r.keys=function(){return Object.keys(o)},r.resolve=i,t.exports=r,r.id=436},437:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(10),a=n(8),l=n(15),d=n(14),c='Failed to instantiate EditTable object.\n \n"ezEditTable" dependency not found.',u=function(t){function e(n,o){r(this,e);var s=i(this,t.call(this,n,o.name));return s.desc=o.description||"ezEditTable adapter",s.filename=o.filename||"ezEditTable.js",s.vendorPath=o.vendor_path,s.loadStylesheet=Boolean(o.load_stylesheet),s.stylesheet=o.stylesheet||s.vendorPath+"ezEditTable.css",s.stylesheetName=o.stylesheet_name||"ezEditTableCss",o.scroll_into_view=o.scroll_into_view!==!1&&n.gridLayout,s._ezEditTable=null,s.cfg=o,s.enable(),s}return o(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf;if(d.root.EditTable)this._setAdvancedGrid();else{var n=this.vendorPath+this.filename;e.import(this.filename,n,function(){return t._setAdvancedGrid()})}this.loadStylesheet&&!e.isImported(this.stylesheet,"link")&&e.import(this.stylesheetName,this.stylesheet,null,"link"),this.emitter.on(["filter-focus","filter-blur"],function(){return t._toggleForInputFilter()}),this.initialized=!0}},e.prototype._setAdvancedGrid=function(){var t=this.tf,e=void 0,n=this.cfg,r=(0,a.tag)(t.tbl,"thead");e=r.length>0&&!n.startRow?void 0:n.startRow||t.refRow,n.base_path=n.base_path||t.basePath+"ezEditTable/";var i=n.editable,o=n.selection;o&&(n.default_selection=n.default_selection||"row"),n.active_cell_css=n.active_cell_css||"ezETSelectedCell";var s=0,l=0;o&&!function(){var e=function(e,n,r){var i=e.Selection,o=function(r){if("row"===e.defaultSelection)i.SelectRowByIndex(r);else{e.ClearSelections();var o=n.cellIndex,s=t.tbl.rows[r];"both"===e.defaultSelection&&i.SelectRowByIndex(r),s&&i.SelectCell(s.cells[o])}if(t.validRowsIndex.length!==t.getRowsNb()){var a=t.tbl.rows[r];a&&a.scrollIntoView(!1),u&&(u.cellIndex===t.getCellsNb()-1&&t.gridLayout?t.tblCont.scrollLeft=1e8:0===u.cellIndex&&t.gridLayout?t.tblCont.scrollLeft=0:u.scrollIntoView(!1))}};if(t.validRowsIndex){var a=t.validRowsIndex,d=a.length,c="row"!==e.defaultSelection?n.parentNode:n,u="TD"===n.nodeName?n:null,h=void 0!==r?e.Event.GetKey(r):0,f=a.indexOf(c.rowIndex)!==-1,p=void 0,b=t.feature("paging"),g=34===h||33===h?b&&b.pagingLength||e.nbRowsPerPage:1;if(f)34!==h&&33!==h?(s=a.indexOf(c.rowIndex),l=c.rowIndex):(p=34===h?s+g<=d-1?a[s+g]:[d-1]:s-g<=a[0]?a[0]:a[s-g],l=p,s=a.indexOf(p),o(p));else{if(c.rowIndex>l)if(c.rowIndex>=a[d-1])p=a[d-1];else{var m=s+g;p=m>d-1?a[d-1]:a[m]}else if(c.rowIndex<=a[0])p=a[0];else{var y=a[s-g];p=y?y:a[0]}l=c.rowIndex,o(p)}}},r=function(e,n){var r="row"!==e.defaultSelection?n.parentNode:n;if(t.paging&&t.feature("paging").nbPages>1){var i=t.feature("paging");e.nbRowsPerPage=i.pagingLength;var o=t.validRowsIndex,s=o.length,a=parseInt(i.startPagingRow,10)+parseInt(i.pagingLength,10),l=r.rowIndex;l===o[s-1]&&i.currentPageNb!==i.nbPages?i.setPage("last"):l===o[0]&&1!==i.currentPageNb?i.setPage("first"):l>o[a-1]&&lo[0]&&i.setPage("previous")}};t.paging&&(t.feature("paging").onAfterChangePage=function(t){var e=t.tf.extension("advancedGrid"),n=e._ezEditTable,r=n.Selection,i=r.GetActiveRow();i&&i.scrollIntoView(!1);var o=r.GetActiveCell();o&&o.scrollIntoView(!1)}),"row"===n.default_selection?!function(){var t=n.on_before_selected_row;n.on_before_selected_row=function(){var e=arguments;r(e[0],e[1],e[2]),t&&t.call(null,e[0],e[1],e[2])};var i=n.on_after_selected_row;n.on_after_selected_row=function(){var t=arguments;e(t[0],t[1],t[2]),i&&i.call(null,t[0],t[1],t[2])}}():!function(){var t=n.on_before_selected_cell;n.on_before_selected_cell=function(){var e=arguments;r(e[0],e[1],e[2]),t&&t.call(null,e[0],e[1],e[2])};var i=n.on_after_selected_cell;n.on_after_selected_cell=function(){var t=arguments;e(t[0],t[1],t[2]),i&&i.call(null,t[0],t[1],t[2])}}()}(),i&&!function(){var e=n.on_added_dom_row;n.on_added_dom_row=function(){var n=arguments;t.nbFilterableRows++,t.paging?(t.nbFilterableRows++,t.paging=!1,t.feature("paging").destroy(),t.feature("paging").reset()):t.emitter.emit("rows-changed",t,this),t.alternateRows&&t.feature("alternateRows").init(),e&&e.call(null,n[0],n[1],n[2])},n.actions&&n.actions.delete&&!function(){var e=n.actions.delete.on_after_submit;n.actions.delete.on_after_submit=function(){var n=arguments;t.nbFilterableRows--,t.paging?(t.nbFilterableRows--,t.paging=!1,t.feature("paging").destroy(),t.feature("paging").reset(!1)):t.emitter.emit("rows-changed",t,this),t.alternateRows&&t.feature("alternateRows").init(),e&&e.call(null,n[0],n[1])}}()}();try{this._ezEditTable=new EditTable(t.id,n,e),this._ezEditTable.Init()}catch(t){throw new Error(c)}this.initialized=!0},e.prototype.reset=function(){var t=this._ezEditTable;t&&(this.cfg.selection&&t.Selection.Set(),this.cfg.editable&&t.Editable.Set())},e.prototype.toggle=function(){var t=this._ezEditTable;t.editable?t.Editable.Remove():t.Editable.Set(),t.selection?t.Selection.Remove():t.Selection.Set()},e.prototype._toggleForInputFilter=function(){var t=this.tf;if(t.getActiveFilterId()){var e=t.getColumnIndexFromFilterId(t.getActiveFilterId()),n=t.getFilterType(e);n===l.INPUT&&this.toggle()}},e.prototype.destroy=function(){var t=this;if(this.initialized){var e=this._ezEditTable;e&&(this.cfg.selection&&(e.Selection.ClearSelections(),e.Selection.Remove()),this.cfg.editable&&e.Editable.Remove()),this.emitter.off(["filter-focus","filter-blur"],function(){return t._toggleForInputFilter()}),this.initialized=!1}},e}(s.Feature);e.default=u},438:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e=t.split(".");for(var n in e){for(var r=e[n];3>r.length;)r="0"+r;e[n]=r}return e.join(".")}function a(t,e){var n=s(t.value.toLowerCase()),r=s(e.value.toLowerCase());return n===r?0:n0){var o=t.triggerIds;n=[],r=o.length;for(var s=0;s0&&!function(){for(var e=t.triggerIds,n=0;n1&&void 0!==arguments[1]?arguments[1]:b,n=arguments[2],r=this.excludeRows||[],i=tf.getVisibleColumnData(t,!1,r);return Number(this.calc(i,e,n))},e.prototype.calc=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,n=arguments[2],r=0;switch(e!==T&&e!==_&&e!==v||(t=this.sortColumnValues(t,c.numSortAsc)),e){case g:r=this.calcMean(t);break;case b:r=this.calcSum(t);break;case m:r=this.calcMin(t);break;case y:r=this.calcMax(t);break;case v:r=this.calcMedian(t);break;case T:r=this.calcQ1(t);break;case _:r=this.calcQ3(t)}return(0,d.isEmpty)(n)?r:r.toFixed(n)},e.prototype.calcSum=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if((0,d.isEmpty)(t))return 0;var e=t.reduce(function(t,e){return Number(t)+Number(e)});return e},e.prototype.calcMean=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.calcSum(t)/t.length;return Number(e)},e.prototype.calcMax=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Math.max.apply(null,t)},e.prototype.calcMin=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Math.min.apply(null,t)},e.prototype.calcMedian=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length,n=0;return e%2===1?(n=Math.floor(e/2),Number(t[n])):(Number(t[e/2])+Number(t[e/2-1]))/2},e.prototype.calcQ1=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length,n=0;return n=Math.floor(e/4),4*n===e?(Number(t[n-1])+Number(t[n]))/2:Number(t[n])},e.prototype.calcQ3=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length,n=0,r=0;return n=Math.floor(e/4),4*n===e?(r=3*n,(Number(t[r])+Number(t[r-1]))/2):Number(t[e-n-1])},e.prototype.sortColumnValues=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];return t.sort(e)},e.prototype.writeResult=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"innerhtml",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=(0,l.elm)(e);if(o)switch(t=t.toFixed(r),t=isNaN(t)||!isFinite(t)?"":(0,f.default)(i)(t),n.toLowerCase()){case"innerhtml":o.innerHTML=t;break;case"setvalue":o.value=t;break;case"createtextnode":var s=o.firstChild,a=(0,l.createText)(t);o.replaceChild(a,s)}},e.prototype.configureFormat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.tf;if(n.hasType(t,[u.FORMATTED_NUMBER])){var r=n.colTypes[t];r.decimal&&!e.decimal&&(e.decimal=r.decimal),r.thousands&&!e.integerSeparator&&(e.integerSeparator=r.thousands)}else e.decimal=e.decimal||"",e.integerSeparator=e.integerSeparator||"";return e},e.prototype.destroy=function(){var t=this;this.initialized&&(this.emitter.off(p,function(){return t.calcAll()}),this.initialized=!1)},e}(a.Feature);e.default=w},441:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(10),a=n(8),l=n(11),d=n(17),c=n(14),u=function(t){function e(n,o){r(this,e);var s=i(this,t.call(this,n,o.name)),a=s.config;return s.name=o.name,s.desc=o.description||"Columns visibility manager",s.spanEl=null,s.btnEl=null,s.contEl=null,s.tickToHide=o.tick_to_hide!==!1,s.manager=o.manager!==!1,s.headersTbl=o.headers_table||null,s.headersIndex=o.headers_index||1,s.contElTgtId=o.container_target_id||null,s.headersText=o.headers_text||null,s.btnTgtId=o.btn_target_id||null,s.btnText=o.btn_text||"Columns▼",s.btnHtml=o.btn_html||null,s.btnCssClass=o.btn_css_class||"colVis",s.btnCloseText=o.btn_close_text||"Close",s.btnCloseHtml=o.btn_close_html||null,s.btnCloseCssClass=o.btn_close_css_class||s.btnCssClass,s.stylesheet=o.stylesheet||"colsVisibility.css",s.spanCssClass=o.span_css_class||"colVisSpan",s.contCssClass=o.cont_css_class||"colVisCont",s.listCssClass=a.list_css_class||"cols_checklist",s.listItemCssClass=a.checklist_item_css_class||"cols_checklist_item",s.listSlcItemCssClass=a.checklist_selected_item_css_class||"cols_checklist_slc_item",s.text=o.text||(s.tickToHide?"Hide: ":"Show: "),s.atStart=o.at_start||[],s.enableHover=Boolean(o.enable_hover),s.enableTickAll=Boolean(o.enable_tick_all),s.tickAllText=o.tick_all_text||"Select all:",s.hiddenCols=[],s.boundMouseup=null,s.onLoaded=(0,l.isFn)(o.on_loaded)?o.on_loaded:l.EMPTY_FN,s.onBeforeOpen=(0,l.isFn)(o.on_before_open)?o.on_before_open:l.EMPTY_FN,s.onAfterOpen=(0,l.isFn)(o.on_after_open)?o.on_after_open:l.EMPTY_FN,s.onBeforeClose=(0,l.isFn)(o.on_before_close)?o.on_before_close:l.EMPTY_FN,s.onAfterClose=(0,l.isFn)(o.on_after_close)?o.on_after_close:l.EMPTY_FN,s.onBeforeColHidden=(0,l.isFn)(o.on_before_col_hidden)?o.on_before_col_hidden:l.EMPTY_FN,s.onAfterColHidden=(0,l.isFn)(o.on_after_col_hidden)?o.on_after_col_hidden:l.EMPTY_FN,s.onBeforeColDisplayed=(0,l.isFn)(o.on_before_col_displayed)?o.on_before_col_displayed:l.EMPTY_FN,s.onAfterColDisplayed=(0,l.isFn)(o.on_after_col_displayed)?o.on_after_col_displayed:l.EMPTY_FN,n.gridLayout&&(s.headersTbl=n.feature("gridLayout").headTbl,s.headersIndex=0,s.onAfterColDisplayed=function(){},s.onAfterColHidden=function(){}),n.import(o.name+"Style",n.stylePath+s.stylesheet,null,"link"),s.enable(),s}return o(e,t),e.prototype.onMouseup=function(t){for(var e=(0,d.targetEvt)(t);e&&e!==this.contEl&&e!==this.btnEl;)e=e.parentNode;e!==this.contEl&&e!==this.btnEl&&this.toggle()},e.prototype.toggle=function(){(0,d.removeEvt)(c.root,"mouseup",this.boundMouseup);var t=this.contEl.style.display;"inline"!==t&&this.onBeforeOpen(this),"inline"===t&&this.onBeforeClose(this),this.contEl.style.display="inline"===t?"none":"inline","inline"!==t&&(this.onAfterOpen(this),(0,d.addEvt)(c.root,"mouseup",this.boundMouseup)),"inline"===t&&this.onAfterClose(this)},e.prototype.checkItem=function(t){var e=t.parentNode;if(e&&t){var n=t.firstChild.checked,r=t.firstChild.getAttribute("id").split("_")[1];r=parseInt(r,10),n?(0,a.addClass)(e,this.listSlcItemCssClass):(0,a.removeClass)(e,this.listSlcItemCssClass);var i=!1;(this.tickToHide&&n||!this.tickToHide&&!n)&&(i=!0),this.setHidden(r,i)}},e.prototype.init=function(){var t=this;!this.initialized&&this.manager&&(this.emitter.on(["hide-column"],function(e,n){return t.hideCol(n)}),this.buildBtn(),this.buildManager(),this.initialized=!0,this.boundMouseup=this.onMouseup.bind(this),this.emitter.emit("columns-visibility-initialized",this.tf,this),this._hideAtStart())},e.prototype.buildBtn=function(){var t=this;if(!this.btnEl){var e=this.tf,n=(0,a.createElm)("span");n.className=this.spanCssClass,this.btnTgtId||e.setToolbar();var r=this.btnTgtId?(0,a.elm)(this.btnTgtId):e.rDiv;if(this.btnTgtId)r.appendChild(n);else{var i=r.firstChild;i.parentNode.insertBefore(n,i)}if(this.btnHtml){n.innerHTML=this.btnHtml;var o=n.firstChild;this.enableHover?(0,d.addEvt)(o,"mouseover",function(e){return t.toggle(e)}):(0,d.addEvt)(o,"click",function(e){return t.toggle(e)})}else{var s=(0,a.createElm)("a",["href","javascript:;"]);s.className=this.btnCssClass,s.title=this.desc,s.innerHTML=this.btnText,n.appendChild(s),this.enableHover?(0,d.addEvt)(s,"mouseover",function(e){return t.toggle(e)}):(0,d.addEvt)(s,"click",function(e){return t.toggle(e)})}this.spanEl=n,this.btnEl=this.spanEl.firstChild,this.onLoaded(this)}},e.prototype.buildManager=function(){var t=this,e=this.tf,n=this.contElTgtId?(0,a.elm)(this.contElTgtId):(0,a.createElm)("div");n.className=this.contCssClass;var r=(0,a.createElm)("p");r.innerHTML=this.text,n.appendChild(r);var i=(0,a.createElm)("ul");i.className=this.listCssClass;var o=this.headersTbl?this.headersTbl:e.tbl,s=this.headersTbl?this.headersIndex:e.getHeadersRowIndex(),l=o.rows[s];this.enableTickAll&&!function(){var n=(0,a.createCheckItem)("col__"+e.id,t.tickAllText,t.tickAllText);(0,a.addClass)(n,t.listItemCssClass),i.appendChild(n),n.check.checked=!t.tickToHide,(0,d.addEvt)(n.check,"click",function(){for(var t=0;t',s.icnCollapseHtml='Collapse filters',s.defaultText="Toggle filters",s.targetId=o.target_id||null,s.enableIcon=o.enable_icon!==!1,s.btnText=o.btn_text||"",s.collapseBtnHtml=s.enableIcon?s.icnCollapseHtml+s.btnText:s.btnText||s.defaultText,s.expandBtnHtml=s.enableIcon?s.icnExpandHtml+s.btnText:s.btnText||s.defaultText,s.btnHtml=o.btn_html||null,s.btnCssClass=o.btn_css_class||"btnExpClpFlt",s.contCssClass=o.cont_css_class||"expClpFlt",s.filtersRowIndex=(0,l.isUndef)(o.filters_row_index)?n.getFiltersRowIndex():o.filters_row_index,s.visibleAtStart=!!(0,l.isUndef)(o.visible_at_start)||Boolean(o.visible_at_start),s.onBeforeShow=(0,l.isFn)(o.on_before_show)?o.on_before_show:l.EMPTY_FN,s.onAfterShow=(0,l.isFn)(o.on_after_show)?o.on_after_show:l.EMPTY_FN,s.onBeforeHide=(0,l.isFn)(o.on_before_hide)?o.on_before_hide:l.EMPTY_FN,s.onAfterHide=(0,l.isFn)(o.on_after_hide)?o.on_after_hide:l.EMPTY_FN,n.import(o.name+"Style",n.stylePath+s.stylesheet,null,"link"),s.enable(),s}return o(e,t),e.prototype.init=function(){var t=this;this.initialized||(this.buildUI(),this.initialized=!0,this.emitter.on(["show-filters"],function(e,n){ 8 | return t.show(n)}),this.emitter.emit("filters-visibility-initialized",this.tf,this))},e.prototype.buildUI=function(){var t=this,e=this.tf,n=(0,a.createElm)("span");n.className=this.contCssClass,this.targetId||e.setToolbar();var r=this.targetId?(0,a.elm)(this.targetId):e.rDiv;if(this.targetId)r.appendChild(n);else{var i=r.firstChild;i.parentNode.insertBefore(n,i)}var o=void 0;this.btnHtml?(n.innerHTML=this.btnHtml,o=n.firstChild):(o=(0,a.createElm)("a",["href","javascript:void(0);"]),o.className=this.btnCssClass,o.title=this.btnText||this.defaultText,o.innerHTML=this.collapseBtnHtml,n.appendChild(o)),(0,d.addEvt)(o,"click",function(){return t.toggle()}),this.contEl=n,this.btnEl=o,this.visibleAtStart||this.toggle()},e.prototype.toggle=function(){var t=this.tf,e=t.gridLayout?t.feature("gridLayout").headTbl:t.tbl,n=e.rows[this.filtersRowIndex],r=""===n.style.display;this.show(!r)},e.prototype.show=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.tf,n=e.gridLayout?e.feature("gridLayout").headTbl:e.tbl,r=n.rows[this.filtersRowIndex];t&&this.onBeforeShow(this),t||this.onBeforeHide(this),r.style.display=t?"":"none",this.enableIcon&&!this.btnHtml&&(this.btnEl.innerHTML=t?this.collapseBtnHtml:this.expandBtnHtml),t&&this.onAfterShow(this),t||this.onAfterHide(this),this.emitter.emit("filters-toggled",e,this,t)},e.prototype.destroy=function(){var t=this;this.initialized&&(this.emitter.off(["show-filters"],function(e,n){return t.show(n)}),this.btnEl.innerHTML="",(0,a.removeElm)(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",(0,a.removeElm)(this.contEl),this.contEl=null,this.initialized=!1)},e}(s.Feature);e.default=c},443:function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(438),o=r(i),s=n(14);s.root.SortableTable||n(447),e.default=o.default},444:function(t,e){function n(t){function e(e,n){if(n=n||{},!e&&0!==e)return"";e=""+e;var d=[],c="-"===e.charAt(0);return e=e.replace(/^\-/g,""),t.negativeLeftOut||n.noUnits||d.push(t.prefix),c&&d.push(t.negativeLeftSymbol),t.negativeLeftOut&&!n.noUnits&&d.push(t.prefix),e=e.split("."),null!=t.round&&l(e,t.round),null!=t.truncate&&(e[1]=a(e[1],t.truncate)),t.padLeft>0&&(e[0]=o(e[0],t.padLeft)),t.padRight>0&&(e[1]=s(e[1],t.padRight)),!n.noSeparator&&e[1]&&(e[1]=i(e[1],t.decimalsSeparator)),!n.noSeparator&&e[0]&&(e[0]=r(e[0],t.integerSeparator)),d.push(e[0]),e[1]&&(d.push(t.decimal),d.push(e[1])),t.negativeRightOut&&!n.noUnits&&d.push(t.suffix),c&&d.push(t.negativeRightSymbol),t.negativeRightOut||n.noUnits||d.push(t.suffix),d.join("")}function n(e,n){n=n||[],t.allowedSeparators&&t.allowedSeparators.forEach(function(t){n.push(t)}),n.push(t.integerSeparator),n.push(t.decimalsSeparator),e=e.replace(t.prefix,""),e=e.replace(t.suffix,"");var r=e;do{e=r;for(var i=0;ie?t.substr(0,e):t}function l(t,e){if(t[1]&&e>=0&&t[1].length>e){var n=t[1].slice(0,e);if(+t[1].substr(e,1)>=5){for(var r="";"0"===n.charAt(0);)r+="0",n=n.substr(1);n=+n+1+"",n=r+n,n.length>e&&(t[0]=+t[0]+ +n.charAt(0)+"",n=n.substring(1))}t[1]=n}return t}t.exports=n},445:function(t,e){t.exports='/*----------------------------------------------------------------------------\\\r\n| Sortable Table 1.12 |\r\n|-----------------------------------------------------------------------------|\r\n| Created by Erik Arvidsson |\r\n| (http://webfx.eae.net/contact.html#erik) |\r\n| For WebFX (http://webfx.eae.net/) |\r\n|-----------------------------------------------------------------------------|\r\n| A DOM 1 based script that allows an ordinary HTML table to be sortable. |\r\n|-----------------------------------------------------------------------------|\r\n| Copyright (c) 1998 - 2006 Erik Arvidsson |\r\n|-----------------------------------------------------------------------------|\r\n| Licensed under the Apache License, Version 2.0 (the "License"); you may not |\r\n| use this file except in compliance with the License. You may obtain a copy |\r\n| of the License at http://www.apache.org/licenses/LICENSE-2.0 |\r\n| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |\r\n| Unless required by applicable law or agreed to in writing, software |\r\n| distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |\r\n| WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |\r\n| License for the specific language governing permissions and limitations |\r\n| under the License. |\r\n|-----------------------------------------------------------------------------|\r\n| 2003-01-10 | First version |\r\n| 2003-01-19 | Minor changes to the date parsing |\r\n| 2003-01-28 | JScript 5.0 fixes (no support for \'in\' operator) |\r\n| 2003-02-01 | Sloppy typo like error fixed in getInnerText |\r\n| 2003-07-04 | Added workaround for IE cellIndex bug. |\r\n| 2003-11-09 | The bDescending argument to sort was not correctly working |\r\n| | Using onclick DOM0 event if no support for addEventListener |\r\n| | or attachEvent |\r\n| 2004-01-13 | Adding addSortType and removeSortType which makes it a lot |\r\n| | easier to add new, custom sort types. |\r\n| 2004-01-27 | Switch to use descending = false as the default sort order. |\r\n| | Change defaultDescending to suit your needs. |\r\n| 2004-03-14 | Improved sort type None look and feel a bit |\r\n| 2004-08-26 | Made the handling of tBody and tHead more flexible. Now you |\r\n| | can use another tHead or no tHead, and you can chose some |\r\n| | other tBody. |\r\n| 2006-04-25 | Changed license to Apache Software License 2.0 |\r\n|-----------------------------------------------------------------------------|\r\n| Created 2003-01-10 | All changes are in the log above. | Updated 2006-04-25 |\r\n\\----------------------------------------------------------------------------*/\r\n\r\n\r\nfunction SortableTable(oTable, oSortTypes) {\r\n\r\n\tthis.sortTypes = oSortTypes || [];\r\n\r\n\tthis.sortColumn = null;\r\n\tthis.descending = null;\r\n\r\n\tvar oThis = this;\r\n\tthis._headerOnclick = function (e) {\r\n\t\toThis.headerOnclick(e);\r\n\t};\r\n\r\n\tif (oTable) {\r\n\t\tthis.setTable( oTable );\r\n\t\tthis.document = oTable.ownerDocument || oTable.document;\r\n\t}\r\n\telse {\r\n\t\tthis.document = document;\r\n\t}\r\n\r\n\r\n\t// only IE needs this\r\n\tvar win = this.document.defaultView || this.document.parentWindow;\r\n\tthis._onunload = function () {\r\n\t\toThis.destroy();\r\n\t};\r\n\tif (win && typeof win.attachEvent != "undefined") {\r\n\t\twin.attachEvent("onunload", this._onunload);\r\n\t}\r\n}\r\n\r\nSortableTable.gecko = navigator.product == "Gecko";\r\nSortableTable.msie = /msie/i.test(navigator.userAgent);\r\n// Mozilla is faster when doing the DOM manipulations on\r\n// an orphaned element. MSIE is not\r\nSortableTable.removeBeforeSort = SortableTable.gecko;\r\n\r\nSortableTable.prototype.onsort = function () {};\r\n\r\n// default sort order. true -> descending, false -> ascending\r\nSortableTable.prototype.defaultDescending = false;\r\n\r\n// shared between all instances. This is intentional to allow external files\r\n// to modify the prototype\r\nSortableTable.prototype._sortTypeInfo = {};\r\n\r\nSortableTable.prototype.setTable = function (oTable) {\r\n\tif ( this.tHead )\r\n\t\tthis.uninitHeader();\r\n\tthis.element = oTable;\r\n\tthis.setTHead( oTable.tHead );\r\n\tthis.setTBody( oTable.tBodies[0] );\r\n};\r\n\r\nSortableTable.prototype.setTHead = function (oTHead) {\r\n\tif (this.tHead && this.tHead != oTHead )\r\n\t\tthis.uninitHeader();\r\n\tthis.tHead = oTHead;\r\n\tthis.initHeader( this.sortTypes );\r\n};\r\n\r\nSortableTable.prototype.setTBody = function (oTBody) {\r\n\tthis.tBody = oTBody;\r\n};\r\n\r\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\r\n\tif ( this.tHead )\r\n\t\tthis.uninitHeader();\r\n\tthis.sortTypes = oSortTypes || [];\r\n\tif ( this.tHead )\r\n\t\tthis.initHeader( this.sortTypes );\r\n};\r\n\r\n// adds arrow containers and events\r\n// also binds sort type to the header cells so that reordering columns does\r\n// not break the sort types\r\nSortableTable.prototype.initHeader = function (oSortTypes) {\r\n\tif (!this.tHead) return;\r\n\tvar cells = this.tHead.rows[0].cells;\r\n\tvar doc = this.tHead.ownerDocument || this.tHead.document;\r\n\tthis.sortTypes = oSortTypes || [];\r\n\tvar l = cells.length;\r\n\tvar img, c;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tc = cells[i];\r\n\t\tif (this.sortTypes[i] != null && this.sortTypes[i] != "None") {\r\n\t\t\timg = doc.createElement("IMG");\r\n\t\t\timg.src = "images/blank.png";\r\n\t\t\tc.appendChild(img);\r\n\t\t\tif (this.sortTypes[i] != null)\r\n\t\t\t\tc._sortType = this.sortTypes[i];\r\n\t\t\tif (typeof c.addEventListener != "undefined")\r\n\t\t\t\tc.addEventListener("click", this._headerOnclick, false);\r\n\t\t\telse if (typeof c.attachEvent != "undefined")\r\n\t\t\t\tc.attachEvent("onclick", this._headerOnclick);\r\n\t\t\telse\r\n\t\t\t\tc.onclick = this._headerOnclick;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tc.setAttribute( "_sortType", oSortTypes[i] );\r\n\t\t\tc._sortType = "None";\r\n\t\t}\r\n\t}\r\n\tthis.updateHeaderArrows();\r\n};\r\n\r\n// remove arrows and events\r\nSortableTable.prototype.uninitHeader = function () {\r\n\tif (!this.tHead) return;\r\n\tvar cells = this.tHead.rows[0].cells;\r\n\tvar l = cells.length;\r\n\tvar c;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tc = cells[i];\r\n\t\tif (c._sortType != null && c._sortType != "None") {\r\n\t\t\tc.removeChild(c.lastChild);\r\n\t\t\tif (typeof c.removeEventListener != "undefined")\r\n\t\t\t\tc.removeEventListener("click", this._headerOnclick, false);\r\n\t\t\telse if (typeof c.detachEvent != "undefined")\r\n\t\t\t\tc.detachEvent("onclick", this._headerOnclick);\r\n\t\t\tc._sortType = null;\r\n\t\t\tc.removeAttribute( "_sortType" );\r\n\t\t}\r\n\t}\r\n};\r\n\r\nSortableTable.prototype.updateHeaderArrows = function () {\r\n\tif (!this.tHead) return;\r\n\tvar cells = this.tHead.rows[0].cells;\r\n\tvar l = cells.length;\r\n\tvar img;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tif (cells[i]._sortType != null && cells[i]._sortType != "None") {\r\n\t\t\timg = cells[i].lastChild;\r\n\t\t\tif (i == this.sortColumn)\r\n\t\t\t\timg.className = "sort-arrow " + (this.descending ? "descending" : "ascending");\r\n\t\t\telse\r\n\t\t\t\timg.className = "sort-arrow";\r\n\t\t}\r\n\t}\r\n};\r\n\r\nSortableTable.prototype.headerOnclick = function (e) {\r\n\t// find TD element\r\n\tvar el = e.target || e.srcElement;\r\n\twhile (el.tagName != "TD")\r\n\t\tel = el.parentNode;\r\n\r\n\tthis.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\r\n};\r\n\r\n// IE returns wrong cellIndex when columns are hidden\r\nSortableTable.getCellIndex = function (oTd) {\r\n\tvar cells = oTd.parentNode.childNodes\r\n\tvar l = cells.length;\r\n\tvar i;\r\n\tfor (i = 0; cells[i] != oTd && i < l; i++)\r\n\t\t;\r\n\treturn i;\r\n};\r\n\r\nSortableTable.prototype.getSortType = function (nColumn) {\r\n\treturn this.sortTypes[nColumn] || "String";\r\n};\r\n\r\n// only nColumn is required\r\n// if bDescending is left out the old value is taken into account\r\n// if sSortType is left out the sort type is found from the sortTypes array\r\n\r\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\r\n\tif (!this.tBody) return;\r\n\tif (sSortType == null)\r\n\t\tsSortType = this.getSortType(nColumn);\r\n\r\n\t// exit if None\r\n\tif (sSortType == "None")\r\n\t\treturn;\r\n\r\n\tif (bDescending == null) {\r\n\t\tif (this.sortColumn != nColumn)\r\n\t\t\tthis.descending = this.defaultDescending;\r\n\t\telse\r\n\t\t\tthis.descending = !this.descending;\r\n\t}\r\n\telse\r\n\t\tthis.descending = bDescending;\r\n\r\n\tthis.sortColumn = nColumn;\r\n\r\n\tif (typeof this.onbeforesort == "function")\r\n\t\tthis.onbeforesort();\r\n\r\n\tvar f = this.getSortFunction(sSortType, nColumn);\r\n\tvar a = this.getCache(sSortType, nColumn);\r\n\tvar tBody = this.tBody;\r\n\r\n\ta.sort(f);\r\n\r\n\tif (this.descending)\r\n\t\ta.reverse();\r\n\r\n\tif (SortableTable.removeBeforeSort) {\r\n\t\t// remove from doc\r\n\t\tvar nextSibling = tBody.nextSibling;\r\n\t\tvar p = tBody.parentNode;\r\n\t\tp.removeChild(tBody);\r\n\t}\r\n\r\n\t// insert in the new order\r\n\tvar l = a.length;\r\n\tfor (var i = 0; i < l; i++)\r\n\t\ttBody.appendChild(a[i].element);\r\n\r\n\tif (SortableTable.removeBeforeSort) {\r\n\t\t// insert into doc\r\n\t\tp.insertBefore(tBody, nextSibling);\r\n\t}\r\n\r\n\tthis.updateHeaderArrows();\r\n\r\n\tthis.destroyCache(a);\r\n\r\n\tif (typeof this.onsort == "function")\r\n\t\tthis.onsort();\r\n};\r\n\r\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\r\n\tvar oThis = this;\r\n\tthis._asyncsort = function () {\r\n\t\toThis.sort(nColumn, bDescending, sSortType);\r\n\t};\r\n\twindow.setTimeout(this._asyncsort, 1);\r\n};\r\n\r\nSortableTable.prototype.getCache = function (sType, nColumn) {\r\n\tif (!this.tBody) return [];\r\n\tvar rows = this.tBody.rows;\r\n\tvar l = rows.length;\r\n\tvar a = new Array(l);\r\n\tvar r;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tr = rows[i];\r\n\t\ta[i] = {\r\n\t\t\tvalue:\t\tthis.getRowValue(r, sType, nColumn),\r\n\t\t\telement:\tr\r\n\t\t};\r\n\t};\r\n\treturn a;\r\n};\r\n\r\nSortableTable.prototype.destroyCache = function (oArray) {\r\n\tvar l = oArray.length;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\toArray[i].value = null;\r\n\t\toArray[i].element = null;\r\n\t\toArray[i] = null;\r\n\t}\r\n};\r\n\r\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\r\n\t// if we have defined a custom getRowValue use that\r\n\tif (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\r\n\t\treturn this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\r\n\r\n\tvar s;\r\n\tvar c = oRow.cells[nColumn];\r\n\tif (typeof c.innerText != "undefined")\r\n\t\ts = c.innerText;\r\n\telse\r\n\t\ts = SortableTable.getInnerText(c);\r\n\treturn this.getValueFromString(s, sType);\r\n};\r\n\r\nSortableTable.getInnerText = function (oNode) {\r\n\tvar s = "";\r\n\tvar cs = oNode.childNodes;\r\n\tvar l = cs.length;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tswitch (cs[i].nodeType) {\r\n\t\t\tcase 1: //ELEMENT_NODE\r\n\t\t\t\ts += SortableTable.getInnerText(cs[i]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\t//TEXT_NODE\r\n\t\t\t\ts += cs[i].nodeValue;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn s;\r\n};\r\n\r\nSortableTable.prototype.getValueFromString = function (sText, sType) {\r\n\tif (this._sortTypeInfo[sType])\r\n\t\treturn this._sortTypeInfo[sType].getValueFromString( sText );\r\n\treturn sText;\r\n\t/*\r\n\tswitch (sType) {\r\n\t\tcase "Number":\r\n\t\t\treturn Number(sText);\r\n\t\tcase "CaseInsensitiveString":\r\n\t\t\treturn sText.toUpperCase();\r\n\t\tcase "Date":\r\n\t\t\tvar parts = sText.split("-");\r\n\t\t\tvar d = new Date(0);\r\n\t\t\td.setFullYear(parts[0]);\r\n\t\t\td.setDate(parts[2]);\r\n\t\t\td.setMonth(parts[1] - 1);\r\n\t\t\treturn d.valueOf();\r\n\t}\r\n\treturn sText;\r\n\t*/\r\n\t};\r\n\r\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\r\n\tif (this._sortTypeInfo[sType])\r\n\t\treturn this._sortTypeInfo[sType].compare;\r\n\treturn SortableTable.basicCompare;\r\n};\r\n\r\nSortableTable.prototype.destroy = function () {\r\n\tthis.uninitHeader();\r\n\tvar win = this.document.parentWindow;\r\n\tif (win && typeof win.detachEvent != "undefined") {\t// only IE needs this\r\n\t\twin.detachEvent("onunload", this._onunload);\r\n\t}\r\n\tthis._onunload = null;\r\n\tthis.element = null;\r\n\tthis.tHead = null;\r\n\tthis.tBody = null;\r\n\tthis.document = null;\r\n\tthis._headerOnclick = null;\r\n\tthis.sortTypes = null;\r\n\tthis._asyncsort = null;\r\n\tthis.onsort = null;\r\n};\r\n\r\n// Adds a sort type to all instance of SortableTable\r\n// sType : String - the identifier of the sort type\r\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\r\n// string and casts it to a desired format. If left out the string is just\r\n// returned\r\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\r\n// compare function. Takes two values and compares them. If left out less than,\r\n// <, compare is used\r\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\r\n// that takes the row and the column index and returns the value used to compare.\r\n// If left out then the innerText is first taken for the cell and then the\r\n// fGetValueFromString is used to convert that string the desired value and type\r\n\r\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\r\n\tthis._sortTypeInfo[sType] = {\r\n\t\ttype:\t\t\t\tsType,\r\n\t\tgetValueFromString:\tfGetValueFromString || SortableTable.idFunction,\r\n\t\tcompare:\t\t\tfCompareFunction || SortableTable.basicCompare,\r\n\t\tgetRowValue:\t\tfGetRowValue\r\n\t};\r\n};\r\n\r\n// this removes the sort type from all instances of SortableTable\r\nSortableTable.prototype.removeSortType = function (sType) {\r\n\tdelete this._sortTypeInfo[sType];\r\n};\r\n\r\nSortableTable.basicCompare = function compare(n1, n2) {\r\n\tif (n1.value < n2.value)\r\n\t\treturn -1;\r\n\tif (n2.value < n1.value)\r\n\t\treturn 1;\r\n\treturn 0;\r\n};\r\n\r\nSortableTable.idFunction = function (x) {\r\n\treturn x;\r\n};\r\n\r\nSortableTable.toUpperCase = function (s) {\r\n\treturn s.toUpperCase();\r\n};\r\n\r\nSortableTable.toDate = function (s) {\r\n\tvar parts = s.split("-");\r\n\tvar d = new Date(0);\r\n\td.setFullYear(parts[0]);\r\n\td.setDate(parts[2]);\r\n\td.setMonth(parts[1] - 1);\r\n\treturn d.valueOf();\r\n};\r\n\r\n\r\n// add sort types\r\nSortableTable.prototype.addSortType("Number", Number);\r\nSortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);\r\nSortableTable.prototype.addSortType("Date", SortableTable.toDate);\r\nSortableTable.prototype.addSortType("String");\r\n// None is a special case\r\n'},446:function(t,e){t.exports=function(t){"undefined"!=typeof execScript?execScript(t):eval.call(null,t)}},447:function(t,e,n){n(446)(n(445))}}); 9 | //# sourceMappingURL=tf-0-6e52526f635250daf64a.js.map --------------------------------------------------------------------------------