From 94864c42202b669d98a9ab115c19961139b42325 Mon Sep 17 00:00:00 2001 From: Russ Handorf Date: Tue, 5 Jun 2018 20:36:59 -0400 Subject: [PATCH] foist --- SaveDetails.php | 16 + a.html | 28 ++ include/Config.php | 26 ++ include/FingerPrinter.php | 59 +++ include/syslog.php | 374 ++++++++++++++++++ javascript/deployJava.js | 79 ++++ javascript/fetch_whorls.js | 203 ++++++++++ javascript/jquery-1.3.2.min.js | 19 + javascript/jquery.flash.js | 288 ++++++++++++++ javascript/plugin-detect-0.6.3.js | 636 ++++++++++++++++++++++++++++++ resources/fonts2.swf | Bin 0 -> 157 bytes 11 files changed, 1728 insertions(+) create mode 100644 SaveDetails.php create mode 100644 a.html create mode 100644 include/Config.php create mode 100644 include/FingerPrinter.php create mode 100644 include/syslog.php create mode 100755 javascript/deployJava.js create mode 100755 javascript/fetch_whorls.js create mode 100755 javascript/jquery-1.3.2.min.js create mode 100755 javascript/jquery.flash.js create mode 100755 javascript/plugin-detect-0.6.3.js create mode 100755 resources/fonts2.swf diff --git a/SaveDetails.php b/SaveDetails.php new file mode 100644 index 0000000..ea00db3 --- /dev/null +++ b/SaveDetails.php @@ -0,0 +1,16 @@ +ProcessRequest(); + + +?> diff --git a/a.html b/a.html new file mode 100644 index 0000000..1b9dd33 --- /dev/null +++ b/a.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + +
+
+ + + + diff --git a/include/Config.php b/include/Config.php new file mode 100644 index 0000000..a955277 --- /dev/null +++ b/include/Config.php @@ -0,0 +1,26 @@ + diff --git a/include/FingerPrinter.php b/include/FingerPrinter.php new file mode 100644 index 0000000..eba4cb6 --- /dev/null +++ b/include/FingerPrinter.php @@ -0,0 +1,59 @@ +_data = ""; + $this->_syslog = new Syslog(); + + $this->_syslog->SetFacility($this->facility); + $this->_syslog->SetSeverity($this->severity); + $this->_syslog->SetHostname($this->hostname); + $this->_syslog->SetFqdn($this->hostname); + $this->_syslog->SetServer($this->host); + $this->_syslog->SetPort($this->port); + $this->_syslog->SetIpFrom($this->ipaddress); + $this->_syslog->SetProcess($this->process); + } + + public function ProcessRequest() { + + $this->_data = "SourceAddress:" . $_SERVER["REMOTE_ADDR"]; + + foreach($this->params as $param) { + $this->_data = implode( + ",", + Array( + $this->_data, + $param . ':' . $this->_GenerateHash($_REQUEST[$param]) + ) + ); + } + $this->_SendData(); + } + + private function _GenerateHash($input) { + return sha1($input); + } + + public function getData() { + return $this->_data; + } + + private function _SendData() { + if ($this->debug) { + echo "Debug:".$this->_data; + } + $this->_syslog->SetContent($this->_data); + $this->_syslog->Send(); + + } +} + +?> diff --git a/include/syslog.php b/include/syslog.php new file mode 100644 index 0000000..0205d47 --- /dev/null +++ b/include/syslog.php @@ -0,0 +1,374 @@ +Send($server = "", $content = "", $timeout = 0); + * + * + * Examples + * + * Example 1 + * Send('192.168.0.12', 'My first PHP syslog message'); + * ?> + * + * Example 2 + * Send('192.168.0.12', 'My second PHP syslog message'); + * ?> + * + * Example 3 + * SetFacility(23); + * $syslog->SetSeverity(7); + * $syslog->SetHostname('MYSERVER'); + * $syslog->SetFqdn('myserver.mydomain.net'); + * $syslog->SetIpFrom('192.168.0.1'); + * $syslog->SetProcess('webautomation'); + * $syslog->SetContent('My third PHP syslog message'); + * $syslog->SetServer('192.168.0.12'); + * $syslog->Send(); + * ?> + * + * Example 4 + * SetFacility(23); + * $syslog->SetSeverity(7); + * $syslog->SetHostname('MYSERVER'); + * $syslog->SetMsg('My customized MSG PHP syslog message'); + * $syslog->SetServer('192.168.0.12'); + * $syslog->Send(); + * ?> + * + * + * External file needed + * + * none. + * + * + * External file created + * + * none. + * + * + * Special issues + * + * - Sockets support must be enabled. + * * In Linux and *nix environments, the extension is enabled at + * compile time using the --enable-sockets configure option + * * In Windows, PHP Sockets can be activated by un-commenting + * extension=php_sockets.dll in php.ini + * + * + * Licence + * + * Copyright (c) 2005, SysCo systèmes de communication sa + * SysCo (tm) is a trademark of SysCo systèmes de communication sa + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of SysCo systèmes de communication sa nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Change Log + * + * 2005-12-24 1.1 SysCo/al Generic release and documentation + * 2005-11-05 1.0 SysCo/al Initial release + * + *********************************************************************/ + + class Syslog + { + var $_facility; // 0-23 + var $_severity; // 0-7 + var $_hostname; // no embedded space, no domain name, only a-z A-Z 0-9 and other authorized characters + var $_fqdn; + var $_ip_from; + var $_process; + var $_content; + var $_msg; + var $_server; // Syslog destination server + var $_port; // Standard syslog port is 514 + var $_timeout; // Timeout of the UDP connection (in seconds) + + function Syslog($facility = 16, $severity = 5, $hostname = "", $fqdn= "", $ip_from = "", $process="", $content = "") + { + $this->_msg = ''; + $this->_server = '127.0.0.1'; + $this->_port = 514; + $this->_timeout = 10; + + $this->_facility = $facility; + + $this->_severity = $severity; + + $this->_hostname = $hostname; + if ($this->_hostname == "") + { + if (isset($_ENV["COMPUTERNAME"])) + { + $this->_hostname = $_ENV["COMPUTERNAME"]; + } + elseif (isset($_ENV["HOSTNAME"])) + { + $this->_hostname = $_ENV["HOSTNAME"]; + } + else + { + $this->_hostname = "WEBSERVER"; + } + } + $this->_hostname = substr($this->_hostname, 0, strpos($this->_hostname.".", ".")); + + $this->_fqdn = $fqdn; + if ($this->_fqdn == "") + { + if (isset($_SERVER["SERVER_NAME"])) + { + $this->_fqdn = $_SERVER["SERVER_NAME"]; + } + } + + $this->_ip_from = $ip_from; + if ($this->_ip_from == "") + { + if (isset($_SERVER["SERVER_ADDR"])) + { + $this->_ip_from = $_SERVER["SERVER_ADDR"]; + } + } + + $this->_process = $process; + if ($this->_process == "") + { + $this->_process = "PHP"; + } + + $this->_content = $content; + if ($this->_content == "") + { + $this->_content = "PHP generated message"; + } + + } + + function SetFacility($facility) + { + $this->_facility = $facility; + } + + + function SetSeverity($severity) + { + $this->_severity = $severity; + } + + + function SetHostname($hostname) + { + $this->_hostname = $hostname; + } + + + function SetFqdn($fqdn) + { + $this->_fqdn = $fqdn; + } + + + function SetIpFrom($ip_from) + { + $this->_ip_from = $ip_from; + } + + + function SetProcess($process) + { + $this->_process = $process; + } + + + function SetContent($content) + { + $this->_content = $content; + } + + + function SetMsg($msg) + { + $this->_msg = $msg; + } + + + function SetServer($server) + { + $this->_server = $server; + } + + + function SetPort($port) + { + if ((intval($port) > 0) && (intval($port) < 65536)) + { + $this->_port = intval($port); + } + } + + + function SetTimeout($timeout) + { + if (intval($timeout) > 0) + { + $this->_timeout = intval($timeout); + } + } + + + function Send($server = "", $content = "", $timeout = 0) + { + if ($server != "") + { + $this->_server = $server; + } + + if ($content != "") + { + $this->_content = $content; + } + + if (intval($timeout) > 0) + { + $this->_timeout = intval($timeout); + } + + if ($this->_facility < 0) { $this->_facility = 0; } + if ($this->_facility > 23) { $this->_facility = 23; } + if ($this->_severity < 0) { $this->_severity = 0; } + if ($this->_severity > 7) { $this->_severity = 7; } + + $this->_process = substr($this->_process, 0, 32); + + $actualtime = time(); + $month = date("M", $actualtime); + $day = substr(" ".date("j", $actualtime), -2); + $hhmmss = date("H:i:s", $actualtime); + $timestamp = $month." ".$day." ".$hhmmss; + + $pri = "<".($this->_facility*8 + $this->_severity).">"; + $header = $timestamp." ".$this->_hostname; + + if ($this->_msg != "") + { + $msg = $this->_msg; + } + else + { + $msg = $this->_process.": ".$this->_fqdn." ".$this->_ip_from." ".$this->_content; + } + + $message = substr($pri.$header." ".$msg, 0, 1024); + + $fp = fsockopen("udp://".$this->_server, $this->_port, $errno, $errstr); + if ($fp) + { + fwrite($fp, $message); + fclose($fp); + $result = $message; + } + else + { + $result = "ERROR: $errno - $errstr"; + } + return $result; + } + } + +?> diff --git a/javascript/deployJava.js b/javascript/deployJava.js new file mode 100755 index 0000000..8b3bd66 --- /dev/null +++ b/javascript/deployJava.js @@ -0,0 +1,79 @@ + +var deployJava={debug:null,firefoxJavaVersion:null,myInterval:null,preInstallJREList:null,returnPage:null,brand:null,locale:null,installType:null,EAInstallEnabled:false,EarlyAccessURL:null,getJavaURL:'http://java.sun.com/webapps/getjava/BrowserRedirect?host=java.com',appleRedirectPage:'http://www.apple.com/support/downloads/',oldMimeType:'application/npruntime-scriptable-plugin;DeploymentToolkit',mimeType:'application/java-deployment-toolkit',launchButtonPNG:'http://java.sun.com/products/jfc/tsc/articles/swing2d/webstart.png',browserName:null,browserName2:null,getJREs:function(){var list=new Array();if(deployJava.isPluginInstalled()){var plugin=deployJava.getPlugin();var VMs=plugin.jvms;for(var i=0;i';document.write(s);} +if(!codebaseParam){document.write('');}} +document.write('<'+'/'+'applet'+'>');},versionCheck:function(versionPattern) +{var index=0;var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?(\\*|\\+)?$";var matchData=versionPattern.match(regex);if(matchData!=null){var familyMatch=true;var patternArray=new Array();for(var i=1;i'+'<'+'PARAM name="launchjnlp" value="'+jnlp+'"'+'>'+'<'+'PARAM name="docbase" value="'+jnlpDocbase+'"'+'>'+'<'+'/'+'object'+'>');}else if(browser=='Netscape Family'){document.write('<'+'embed type="application/x-java-applet;jpi-version='+ +deployJava.firefoxJavaVersion+'" '+'width="0" height="0" '+'launchjnlp="'+jnlp+'"'+'docbase="'+jnlpDocbase+'"'+' />');} +document.location=jnlpDocbase;},createWebStartLaunchButtonEx:function(jnlp,minimumVersion){if(deployJava.returnPage==null){deployJava.returnPage=jnlp;} +var url='javascript:deployJava.launchWebStartApplication(\''+jnlp+'\');';document.write('<'+'a href="'+url+'" onMouseOver="window.status=\'\'; '+'return true;"><'+'img '+'src="'+deployJava.launchButtonPNG+'" '+'border="0" /><'+'/'+'a'+'>');},createWebStartLaunchButton:function(jnlp,minimumVersion){if(deployJava.returnPage==null){deployJava.returnPage=jnlp;} +var url='javascript:'+'if (!deployJava.isWebStartInstalled("'+ +minimumVersion+'")) {'+'if (deployJava.installLatestJRE()) {'+'if (deployJava.launch("'+jnlp+'")) {}'+'}'+'} else {'+'if (deployJava.launch("'+jnlp+'")) {}'+'}';document.write('<'+'a href="'+url+'" onMouseOver="window.status=\'\'; '+'return true;"><'+'img '+'src="'+deployJava.launchButtonPNG+'" '+'border="0" /><'+'/'+'a'+'>');},launch:function(jnlp){if(deployJava.isPluginInstalled()){return deployJava.getPlugin().launch(jnlp);}else{document.location=jnlp;return true;}},isPluginInstalled:function(){var plugin=deployJava.getPlugin();if(plugin&&plugin.jvms){return true;}else{return false;}},isAutoUpdateEnabled:function(){if(deployJava.isPluginInstalled()){return deployJava.getPlugin().isAutoUpdateEnabled();} +return false;},setAutoUpdateEnabled:function(){if(deployJava.isPluginInstalled()){return deployJava.getPlugin().setAutoUpdateEnabled();} +return false;},setInstallerType:function(type){deployJava.installType=type;if(deployJava.isPluginInstalled()){return deployJava.getPlugin().setInstallerType(type);} +return false;},setAdditionalPackages:function(packageList){if(deployJava.isPluginInstalled()){return deployJava.getPlugin().setAdditionalPackages(packageList);} +return false;},setEarlyAccess:function(enabled){deployJava.EAInstallEnabled=enabled;},isPlugin2:function(){if(deployJava.isPluginInstalled()){if(deployJava.versionCheck('1.6.0_10+')){try{return deployJava.getPlugin().isPlugin2();}catch(err){}}} +return false;},allowPlugin:function(){deployJava.getBrowser();var ret=('Chrome'!=deployJava.browserName2&&'Safari'!=deployJava.browserName2&&'Opera'!=deployJava.browserName2);return ret;},getPlugin:function(){deployJava.refresh();var ret=null;if(deployJava.allowPlugin()){ret=document.getElementById('deployJavaPlugin');} +return ret;},compareVersionToPattern:function(version,patternArray,familyMatch){var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";var matchData=version.match(regex);if(matchData!=null){var index=0;var result=new Array();for(var i=1;ipatternArray[i]){return true;}} +return true;}}else{return false;}},getBrowser:function(){if(deployJava.browserName==null){var browser=navigator.userAgent.toLowerCase();if(deployJava.debug){alert('userAgent -> '+browser);} +if(browser.indexOf('msie')!=-1){deployJava.browserName='MSIE';deployJava.browserName2='MSIE';}else if(browser.indexOf('firefox')!=-1){deployJava.browserName='Netscape Family';deployJava.browserName2='Firefox';}else if(browser.indexOf('chrome')!=-1){deployJava.browserName='Netscape Family';deployJava.browserName2='Chrome';}else if(browser.indexOf('safari')!=-1){deployJava.browserName='Netscape Family';deployJava.browserName2='Safari';}else if(browser.indexOf('mozilla')!=-1){deployJava.browserName='Netscape Family';deployJava.browserName2='Other';}else if(browser.indexOf('opera')!=-1){deployJava.browserName='Netscape Family';deployJava.browserName2='Opera';}else{deployJava.browserName='?';deployJava.browserName2='unknown';} +if(deployJava.debug){alert('Detected browser name:'+deployJava.browserName+', '+deployJava.browserName2);}} +return deployJava.browserName;},testUsingActiveX:function(version){var objectName='JavaWebStart.isInstalled.'+version+'.0';if(!ActiveXObject){if(deployJava.debug){alert('Browser claims to be IE, but no ActiveXObject object?');} +return false;} +try{return(new ActiveXObject(objectName)!=null);}catch(exception){return false;}},testForMSVM:function(){var clsid='{08B0E5C0-4FCB-11CF-AAA5-00401C608500}';if(typeof oClientCaps!='undefined'){var v=oClientCaps.getComponentVersion(clsid,"ComponentID");if((v=='')||(v=='5,0,5000,0')){return false;}else{return true;}}else{return false;}},testUsingMimeTypes:function(version){if(!navigator.mimeTypes){if(deployJava.debug){alert('Browser claims to be Netscape family, but no mimeTypes[] array?');} +return false;} +for(var i=0;ib[0])return true;if(a[0]b[1])return true;if(a[1]b[2])return true;if(a[2]'+'<'+'/'+'object'+'>');}else if(browser=='Netscape Family'&&deployJava.allowPlugin()){deployJava.writeEmbedTag();}},refresh:function(){navigator.plugins.refresh(false);var browser=deployJava.getBrowser();if(browser=='Netscape Family'&&deployJava.allowPlugin()){var plugin=document.getElementById('deployJavaPlugin');if(plugin==null){deployJava.writeEmbedTag();}}},writeEmbedTag:function(){var written=false;if(navigator.mimeTypes!=null){for(var i=0;i