diff options
-rw-r--r-- | css/ssl.css | 16 | ||||
-rw-r--r-- | functions/connection.php | 26 | ||||
-rw-r--r-- | functions/crl.php | 26 | ||||
-rw-r--r-- | functions/numerical.php | 28 | ||||
-rw-r--r-- | functions/ocsp.php | 26 | ||||
-rw-r--r-- | functions/parse_certificate.php | 26 | ||||
-rw-r--r-- | functions/textual.php | 42 | ||||
-rw-r--r-- | functions/variables.php | 28 | ||||
-rw-r--r-- | functions/verify_certifitcate.php | 27 | ||||
-rw-r--r-- | index.php | 16 | ||||
-rw-r--r-- | js/ajax.js | 15 |
11 files changed, 153 insertions, 123 deletions
diff --git a/css/ssl.css b/css/ssl.css index 1def2d6..d30e89e 100644 --- a/css/ssl.css +++ b/css/ssl.css @@ -1,3 +1,19 @@ +/* +Copyright (C) 2015 Remy van Elst + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ #preloader{ display:none; } diff --git a/functions/connection.php b/functions/connection.php index 33af1ad..7fcae27 100644 --- a/functions/connection.php +++ b/functions/connection.php @@ -1,20 +1,18 @@ -<!-- -Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function fixed_gethostbyname($host) { $ip = gethostbyname($host); diff --git a/functions/crl.php b/functions/crl.php index 7e477b2..959a6a4 100644 --- a/functions/crl.php +++ b/functions/crl.php @@ -1,20 +1,18 @@ -<!-- - Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function crl_verify($raw_cert_data, $verbose=true) { global $random_blurp; diff --git a/functions/numerical.php b/functions/numerical.php index a363374..00c9ade 100644 --- a/functions/numerical.php +++ b/functions/numerical.php @@ -1,20 +1,19 @@ -<!-- - Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php function bcdechex($dec) { $hex = ''; @@ -24,7 +23,6 @@ function bcdechex($dec) { $dec = bcdiv(bcsub($dec, $last), 16); } while($dec>0); return $hex; - } } ?>
\ No newline at end of file diff --git a/functions/ocsp.php b/functions/ocsp.php index 21b03d7..98947c7 100644 --- a/functions/ocsp.php +++ b/functions/ocsp.php @@ -1,20 +1,18 @@ -<!-- -Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function ocsp_stapling($host, $port){ $result = ""; diff --git a/functions/parse_certificate.php b/functions/parse_certificate.php index 1bdfedd..ddd4dfa 100644 --- a/functions/parse_certificate.php +++ b/functions/parse_certificate.php @@ -1,20 +1,18 @@ -<!-- - Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function cert_parse($raw_cert_data, $raw_next_cert_data=null, $csr=false, $host=null, $port=null, $is_issuer=false) { diff --git a/functions/textual.php b/functions/textual.php index 4287283..cf17e23 100644 --- a/functions/textual.php +++ b/functions/textual.php @@ -1,20 +1,18 @@ -<!-- - Copyright (C) 2015 Remy van Elst - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> <?php +// Copyright (C) 2015 Remy van Elst + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function startsWith($haystack, $needle) { // search backwards starting from haystack length characters from the end @@ -27,4 +25,16 @@ function endsWith($haystack, $needle) { } } + +function get_current_folder(){ + $url = $_SERVER['REQUEST_URI']; + $parts = explode('/',$url); + $folder = ''; + for ($i = 0; $i < count($parts) - 1; $i++) { + $folder .= $parts[$i] . "/"; + } + return $folder; +} + + ?>
\ No newline at end of file diff --git a/functions/variables.php b/functions/variables.php index 479dccd..5b020fa 100644 --- a/functions/variables.php +++ b/functions/variables.php @@ -1,24 +1,24 @@ -<!-- - Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. $random_blurp = rand(1000,99999); # 2014-11-10 (nov) from wikipedia $ev_oids = array("1.3.6.1.4.1.34697.2.1", "1.3.6.1.4.1.34697.2.2", "1.3.6.1.4.1.34697.2.3", "1.3.6.1.4.1.34697.2.4", "1.2.40.0.17.1.22", "2.16.578.1.26.1.3.3", "1.3.6.1.4.1.17326.10.14.2.1.2", "1.3.6.1.4.1.17326.10.8.12.1.2", "1.3.6.1.4.1.6449.1.2.1.5.1", "2.16.840.1.114412.2.1", "2.16.840.1.114412.1.3.0.2", "2.16.528.1.1001.1.1.1.12.6.1.1.1", "2.16.840.1.114028.10.1.2", "0.4.0.2042.1.4", "0.4.0.2042.1.5", "1.3.6.1.4.1.13177.10.1.3.10", "1.3.6.1.4.1.14370.1.6", "1.3.6.1.4.1.4146.1.1", "2.16.840.1.114413.1.7.23.3", "1.3.6.1.4.1.14777.6.1.1", "2.16.792.1.2.1.1.5.7.1.9", "1.3.6.1.4.1.22234.2.5.2.3.1", "1.3.6.1.4.1.782.1.2.1.8.1", "1.3.6.1.4.1.8024.0.2.100.1.2", "1.2.392.200091.100.721.1", "2.16.840.1.114414.1.7.23.3", "1.3.6.1.4.1.23223.2", "1.3.6.1.4.1.23223.1.1.1", "2.16.756.1.83.21.0", "2.16.756.1.89.1.2.1.1", "2.16.840.1.113733.1.7.48.1", "2.16.840.1.114404.1.1.2.4.1", "2.16.840.1.113733.1.7.23.6", "1.3.6.1.4.1.6334.1.100.1", "2.16.840.1.114171.500.9", "1.3.6.1.4.1.36305.2"); +$current_folder = get_current_folder(); + ?>
\ No newline at end of file diff --git a/functions/verify_certifitcate.php b/functions/verify_certifitcate.php index 95a4a9f..ccb2ac9 100644 --- a/functions/verify_certifitcate.php +++ b/functions/verify_certifitcate.php @@ -1,20 +1,19 @@ -<!-- -Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php function verify_certificate_hostname($raw_cert, $host, $port) { $cert_data = openssl_x509_parse($raw_cert); if ($cert_data['subject']['CN']) { @@ -31,11 +31,11 @@ foreach (glob("functions/*.php") as $filename) { <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>SSL Decoder</title> - <link rel="stylesheet" href="/css/bootstrap.min.css"> - <link rel="stylesheet" href="/css/ssl.css"> - <script src="/js/jquery.min.js"></script> - <script src="/js/bootstrap.min.js"></script> - <script src="/js/ajax.js"></script> + <link rel="stylesheet" href="<?php echo(htmlspecialchars($current_folder)); ?>css/bootstrap.min.css"> + <link rel="stylesheet" href="<?php echo(htmlspecialchars($current_folder)); ?>css/ssl.css"> + <script src="<?php echo(htmlspecialchars($current_folder)); ?>js/jquery.min.js"></script> + <script src="<?php echo(htmlspecialchars($current_folder)); ?>js/bootstrap.min.js"></script> + <script src="<?php echo(htmlspecialchars($current_folder)); ?>js/ajax.js"></script> </head> <body> <a id="top-of-page"></a> @@ -97,7 +97,7 @@ foreach (glob("functions/*.php") as $filename) { </form> </div> - <div id="preloader"><p><img src="/img/ajax-loader.gif" /><br> <br>The SSL Decoder is processing your request. Please wait a few moments.<br></p></div> + <div id="preloader"><p><img src="<?php echo(htmlspecialchars($current_folder)); ?>img/ajax-loader.gif" /><br> <br>The SSL Decoder is processing your request. Please wait a few moments.<br></p></div> <div id="resultDiv"></div> @@ -152,7 +152,7 @@ foreach (glob("functions/*.php") as $filename) { if ($write_cache == 1) { ?> - <p>This result is saved at most 60 days on <a href="<?php echo htmlspecialchars(explode('?', $_SERVER['REQUEST_URI'], 2)[0] . $cache_filename); ?>">the following URL</a>. Do note that this might be deleted earlier if space runs out.</p> + <p>This result is saved at most 60 days on <a href="<?php echo(htmlspecialchars($current_folder) . $cache_filename); ?>">the following URL</a>. Do note that this might be deleted earlier if space runs out.</p> <?php } @@ -230,7 +230,7 @@ foreach (glob("functions/*.php") as $filename) { <h2 class="panel-title">Saved result</h2> </div> <div class="panel-body"> - <p>This result is saved at most 60 days on <a href="<?php echo htmlspecialchars(explode('?', $_SERVER['REQUEST_URI'], 2)[0] . $cache_filename); ?>">the following URL</a>. Do note that this might be deleted earlier if space runs out.</p> + <p>This result is saved at most 60 days on <a href="<?php echo(htmlspecialchars($current_folder) . $cache_filename); ?>">the following URL</a>. Do note that this might be deleted earlier if space runs out.</p> </div> </div> <?php @@ -1,3 +1,18 @@ +// Copyright (C) 2015 Remy van Elst + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + var request = createRequestObject(); var dataReturn=''; var ajaxTimeout=''; |