From 6cf4ef1237eff920f8a38afa3a0ea07f42563c8f Mon Sep 17 00:00:00 2001 From: mxmehl Date: Fri, 5 Jan 2018 13:13:06 +0100 Subject: [PATCH 1/5] add html header and favicon --- favicon.png | Bin 0 -> 3633 bytes index.php | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 favicon.png diff --git a/favicon.png b/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..413d4b0932d87abcd1f3de118191e14657e34314 GIT binary patch literal 3633 zcmV-14$kq3P)ZYC-)2qrP{P(&W_ zQXYoYSg_qu1Fng3@7=W%8PrCIB&`PcuS*WPFEeZIZ- zIRZg1{>+{nF0gc(Icm)7Yv$RlP87RDluF&AWHPTkt(Ux0I&OCF?xm>Y7ClLA1_7`oz9%mq)D|Vm(FJcL;xO%5b~&>0(jRg&RFiw5~$N zvRjubCSyN7M*L;)u>KPR!ru4VbNA6)R;+ot6 zv(uX4wS8x3!DoDj-+F2sm+;~vgDoDC31<1Ezgm_K+*DfH$(MAoxTyWVI}V@+&i- z?cM~q1f!r6o}~q!@g07{I#?ImVB3co+j)EG0i?k+gJ(8K;P~%ciK&CnPHlm$Ct{)a z=Q)(f4kHV;!M4~3_GRik90(0ai_yOcOG5ljF?ch-YJ>2TpF_j1QwSkeT8V4@Z33LU zJROez=uOMX%P#btc4k=7zOYa1+Z4k%p3q_x@gto7ZsVPN(WtG?o0Na$eFs%nJ-QKY z1@haIcqwQk&(ou72*#I#=k6v_n(4p$&PHgwW5=&Pw&~sv_KjnB8!ZVJZ;f!8%Z3vM z4Ylm=zVl4Ev4$i#RQXCFrs(>kCu)ddanKYZ}$B8X@)Eat&#~v5jE@ z(q=x^QMUs%IVeYLjM(p|E8iuWpB)JXkDc|P?ha$U!k=E{>&;8e)7ht=w3M$`pqP!$ z&I4QOmXa?uR4upVEu(D00E%VCt`SY zz`4A0@Ec|+n7B+5sEPQV8qv=)p|P2DpRc;+(WR?I=c(B1sK4}J0WT?sT3!Rsgl4_{ ztM3Ghv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3s- zU1v>=eQ`=NHMXHJMF$fUPSwjb4%Fh{6z=Hfv5(V?~;&v54dAnEex)8k;yx zdxF${v(%{MXm0D<8p%;iS7}oRL~-0?{j(3~?DOqI`8-qeT3^-Tbt>q}tAn1b`UT(~ zdzLvZX1{5FsLt%L`M4J_J$~7!^mw~wdK~o&otHWTLYKuK(OnUtC&~Xkz0|z7|#vhPqS*n5B&@$up#7V=Z;x5ACPc7HEwI!Yl z(Y*+yjSAt^#Y zz`;DIyyEu2;U)x691(5z#(`IS1Mk{$1*5@jzmMmchxvo<{oq!&BqNR8;He#wLYj;^ zDK^euyu_4aaz4qeATAA~s7&WExw|$LOJE2K3qEtf3~f#j_7z;PQMu1EZgm>R0h13(VwM&YmFT&ddQcJ_8;b1-yk$Xn+KS_*0}`agv=ib(h7WKKFOr(d z1Z9x(0=%A9Ow(1Eu|dxdLsnc2fQt>_JN%Y$b`kaG=O*SWaR7tErSqt4SdkQIc<95@ z(<6$%>#=kF2`x0%k8%4~l1gdx76X{n&D|wuOt=^>IOm5xEUkWAeyX@Y+EYyE_2cqn zu03{KzDpg1115j6FRHI!n3%jSGisozC&UdJ#sLEb6aBU<>5Erpa848bf|m5_-%D3! zG%ig!_}aKeRhRXdOH&eA*$9V6aA`{8+T4@E{uBJgD@2Kp@7f%WJ;8t53Y^Phyf|qm zv?66BO{!Qg<}q}w(CPTNXOa>CoPW-^oXl#>cy+GO*n=*8LRJJo;J4-j1(<& zwO_w)hv)7_`9oixCVkki&)hLm^iNkabIU*3P4dA)0mk0P{A2YSc56~XT_Vb)Zj#z+ zOiE&A)|+0PS6!bc@9^8S?PXG|i)}0&XN|%>dh_>x^q4_BV+NDS00000NkvXXu0mjf Da^3zN literal 0 HcmV?d00001 diff --git a/index.php b/index.php index 5e986e9..0f25b87 100644 --- a/index.php +++ b/index.php @@ -24,6 +24,7 @@ if($method === "simple") { // simple exit; } elseif($method === "myself" ) { // detailed info about own IP $ip = $_SERVER['REMOTE_ADDR']; + header(); show_http_headers(); show_hostname($ip); show_reverse($hostname); @@ -31,12 +32,14 @@ if($method === "simple") { // simple show_whois($ip); } elseif($method === "ip" ) { // detailed info an IP $ip = $t; + header(); show_hostname($ip); show_reverse($hostname); show_ipinfo($ip); show_whois($ip); } elseif($method === "dns" ) { // detailed info a host name $hostname = $t; + header(); show_reverse($hostname); show_dnsrecords($hostname); show_whois($hostname); @@ -151,6 +154,16 @@ function show_dnsrecords($hostname) { echo "
\n"; } } +// PRINT Header +function header() { + print ' + + + +IP and DNS information + +' +} // PRINT FOOTER function footer() { global $config; From e5f6c3922452a604c163e75dae2cc0ccf3485ebb Mon Sep 17 00:00:00 2001 From: mxmehl Date: Fri, 5 Jan 2018 13:14:20 +0100 Subject: [PATCH 2/5] fix syntax --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 0f25b87..63386b3 100644 --- a/index.php +++ b/index.php @@ -162,7 +162,7 @@ function header() { IP and DNS information -' +'; } // PRINT FOOTER function footer() { From a720d581d550f1da21f17e0eb3a4618711df2381 Mon Sep 17 00:00:00 2001 From: mxmehl Date: Fri, 5 Jan 2018 13:17:35 +0100 Subject: [PATCH 3/5] rename function names --- index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 63386b3..3efb094 100644 --- a/index.php +++ b/index.php @@ -24,7 +24,7 @@ if($method === "simple") { // simple exit; } elseif($method === "myself" ) { // detailed info about own IP $ip = $_SERVER['REMOTE_ADDR']; - header(); + print_header(); show_http_headers(); show_hostname($ip); show_reverse($hostname); @@ -32,14 +32,14 @@ if($method === "simple") { // simple show_whois($ip); } elseif($method === "ip" ) { // detailed info an IP $ip = $t; - header(); + print_header(); show_hostname($ip); show_reverse($hostname); show_ipinfo($ip); show_whois($ip); } elseif($method === "dns" ) { // detailed info a host name $hostname = $t; - header(); + print_header(); show_reverse($hostname); show_dnsrecords($hostname); show_whois($hostname); @@ -48,7 +48,7 @@ if($method === "simple") { // simple header("Location:/".$config->detailed_uri.""); exit; } -footer(); +print_footer(); // HTTP HEADERS function show_http_headers() { @@ -155,7 +155,7 @@ function show_dnsrecords($hostname) { } } // PRINT Header -function header() { +function print_header() { print ' @@ -165,7 +165,7 @@ function header() { '; } // PRINT FOOTER -function footer() { +function print_footer() { global $config; echo "


\n"; echo 'Your plain IP address: IPv4 | IPv6'; From 504586a033d4863216a9892c6fe1c0725c666f28 Mon Sep 17 00:00:00 2001 From: mxmehl Date: Fri, 5 Jan 2018 13:19:53 +0100 Subject: [PATCH 4/5] use valid html --- index.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 3efb094..3c126d3 100644 --- a/index.php +++ b/index.php @@ -154,7 +154,7 @@ function show_dnsrecords($hostname) { echo "
\n"; } } -// PRINT Header +// PRINT HEADER function print_header() { print ' @@ -162,7 +162,9 @@ function print_header() { IP and DNS information -'; + + +'; } // PRINT FOOTER function print_footer() { @@ -171,6 +173,7 @@ function print_footer() { echo 'Your plain IP address: IPv4 | IPv6'; echo "
\n"; echo 'Your detailed IP info: IPv4 | IPv6'; + echo ''; } // HELPER FUNCTIONS From 69c1411c984d8b2320e990f9b16076efd01e6e08 Mon Sep 17 00:00:00 2001 From: mxmehl Date: Fri, 5 Jan 2018 13:21:11 +0100 Subject: [PATCH 5/5] use correct language tag --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 3c126d3..0a61bd6 100644 --- a/index.php +++ b/index.php @@ -157,7 +157,7 @@ function show_dnsrecords($hostname) { // PRINT HEADER function print_header() { print ' - + IP and DNS information