Quantcast
Channel: EN Blog
Viewing all articles
Browse latest Browse all 2151

Vulnerabilities: CVEs, Hashes, Application Installers Report January 15-22, 2018

$
0
0

The OPSWAT Metadefender Vulnerability Engine identifies known application vulnerabilities and reports them by severity level. The Vulnerability Engine allows system administrators to identify vulnerabilities in files and data being brought into a secure network and on endpoints within a network, significantly expediting remediation of the issue.

Common Vulnerabilities and Exposures (CVE) is a catalog of publicly known cyber security vulnerabilities that's sponsored by the United States Department of Homeland Security. The first table below lists the new CVEs and product versions for which support was added to the Metadefender database during the week of January 15-22, 2018. The second table lists the hashes and application installers for which support was added.

Newly Supported CVEs and Product Versions as of January 22, 2018

PRODUCTVENDORVERSIONCVECVE DETAILSCVSS SCORE
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0780https://nvd.nist.gov/vuln/detail/CVE-2018-07802.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0775https://nvd.nist.gov/vuln/detail/CVE-2018-07757.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0769https://nvd.nist.gov/vuln/detail/CVE-2018-07697.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0776https://nvd.nist.gov/vuln/detail/CVE-2018-07767.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0777https://nvd.nist.gov/vuln/detail/CVE-2018-07777.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0774https://nvd.nist.gov/vuln/detail/CVE-2018-07747.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2017-11914https://nvd.nist.gov/vuln/detail/CVE-2017-119147.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0773https://nvd.nist.gov/vuln/detail/CVE-2018-07737.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0770https://nvd.nist.gov/vuln/detail/CVE-2018-07707.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0768https://nvd.nist.gov/vuln/detail/CVE-2018-07687.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0772https://nvd.nist.gov/vuln/detail/CVE-2018-07727.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0762https://nvd.nist.gov/vuln/detail/CVE-2018-07627.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0766https://nvd.nist.gov/vuln/detail/CVE-2018-07664.3
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0758https://nvd.nist.gov/vuln/detail/CVE-2018-07587.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0767https://nvd.nist.gov/vuln/detail/CVE-2018-07672.6
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0800https://nvd.nist.gov/vuln/detail/CVE-2018-08004.3
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0803https://nvd.nist.gov/vuln/detail/CVE-2018-08035.8
Microsoft EdgeMicrosoft CorporationNONE and priorCVE-2018-0781https://nvd.nist.gov/vuln/detail/CVE-2018-07817.6
Google ChromeGoogle Inc.9.0.600.0 and priorCVE-2017-5116https://nvd.nist.gov/vuln/detail/CVE-2017-51166.8
Google ChromeGoogle Inc.40.0.2214.85 and priorCVE-2014-7923https://nvd.nist.gov/vuln/detail/CVE-2014-79237.5
Google ChromeGoogle Inc.40.0.2214.85 and priorCVE-2014-7926https://nvd.nist.gov/vuln/detail/CVE-2014-79267.5
Google ChromeGoogle Inc.40.0.2214.85 and priorCVE-2014-9654https://nvd.nist.gov/vuln/detail/CVE-2014-96547.5
Google ChromeGoogle Inc.NONE and priorCVE-2015-2808https://nvd.nist.gov/vuln/detail/CVE-2015-28084.3
Google ChromeGoogle Inc.NONE and priorCVE-2013-2566https://nvd.nist.gov/vuln/detail/CVE-2013-25664.3
Google ChromeGoogle Inc.9.0.600.0 and priorCVE-2017-5116https://nvd.nist.gov/vuln/detail/CVE-2017-51166.8
Google ChromeGoogle Inc.40.0.2214.85 and priorCVE-2014-7923https://nvd.nist.gov/vuln/detail/CVE-2014-79237.5
Google ChromeGoogle Inc.40.0.2214.85 and priorCVE-2014-7926https://nvd.nist.gov/vuln/detail/CVE-2014-79267.5
Google ChromeGoogle Inc.40.0.2214.85 and priorCVE-2014-9654https://nvd.nist.gov/vuln/detail/CVE-2014-96547.5
Google ChromeGoogle Inc.NONE and priorCVE-2015-2808https://nvd.nist.gov/vuln/detail/CVE-2015-28084.3
Google ChromeGoogle Inc.NONE and priorCVE-2013-2566https://nvd.nist.gov/vuln/detail/CVE-2013-25664.3
K7 Total SecurityK7 Computing Pvt Ltd14.2.0.252 and priorCVE-2017-18019https://nvd.nist.gov/vuln/detail/CVE-2017-180193.6
iTunesApple Inc.12.1.3 and priorCVE-2014-8146https://nvd.nist.gov/vuln/detail/CVE-2014-81467.5
iTunesApple Inc.12.6.2 and priorCVE-2017-7099https://nvd.nist.gov/vuln/detail/CVE-2017-70996.8
PythonPython Software Foundation3.6 and priorCVE-2016-2183https://nvd.nist.gov/vuln/detail/CVE-2016-21835.0
OperaOpera SoftwareNONE and priorCVE-2015-2808https://nvd.nist.gov/vuln/detail/CVE-2015-28084.3
OperaOpera SoftwareNONE and priorCVE-2013-2566https://nvd.nist.gov/vuln/detail/CVE-2013-25664.3
OperaOpera SoftwareNONE and priorCVE-2015-2808https://nvd.nist.gov/vuln/detail/CVE-2015-28084.3
OperaOpera SoftwareNONE and priorCVE-2013-2566https://nvd.nist.gov/vuln/detail/CVE-2013-25664.3
VirtualBoxOracle Corporation5.0.14 and priorCVE-2015-3195https://nvd.nist.gov/vuln/detail/CVE-2015-31955.0
Oracle VM VirtualBoxOracle Corporation5.0.14 and priorCVE-2015-3195https://nvd.nist.gov/vuln/detail/CVE-2015-31955.0
JavaOracle Corporation7.0.04 and priorCVE-2012-1722https://nvd.nist.gov/vuln/detail/CVE-2012-172210.0
JavaOracle Corporation7.0.04 and priorCVE-2012-1721https://nvd.nist.gov/vuln/detail/CVE-2012-172110.0
JavaOracle Corporation7.0.04 and priorCVE-2012-1723https://nvd.nist.gov/vuln/detail/CVE-2012-172310.0
JavaOracle Corporation7.0.04 and priorCVE-2012-1724https://nvd.nist.gov/vuln/detail/CVE-2012-17245.0
JavaOracle Corporation7.0.04 and priorCVE-2012-1725https://nvd.nist.gov/vuln/detail/CVE-2012-172510.0
JavaOracle Corporation7.0.04 and priorCVE-2012-1711https://nvd.nist.gov/vuln/detail/CVE-2012-17117.5
JavaOracle Corporation7.0.04 and priorCVE-2012-1713https://nvd.nist.gov/vuln/detail/CVE-2012-171310.0
JavaOracle Corporation7.0.04 and priorCVE-2012-1716https://nvd.nist.gov/vuln/detail/CVE-2012-171610.0
JavaOracle Corporation7.0.04 and priorCVE-2012-1717https://nvd.nist.gov/vuln/detail/CVE-2012-17172.1
JavaOracle Corporation7.0.04 and priorCVE-2012-1718https://nvd.nist.gov/vuln/detail/CVE-2012-17185.0

Download all

Newly Supported Hashes as of January 22, 2018

HASHCVES
B5FA7E16246F5FEC4F43B7903FD00BAFC3A290EFCVE-2017-5754, CVE-2017-5753
C941C472D60987E6057B96DEDCC81EA6F71BA84BCVE-2017-5754, CVE-2017-5753, CVE-2017-5715
4D85A406F84F24D0D87DF2B2744E06ABC9E73652CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
56E66F4050E85F04634FBAFD92936F325DD363B8CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
36B0F37020D18F31B2912AC470C499DC83E15C5BCVE-2017-5754, CVE-2017-5753, CVE-2017-5715
97A789E72D5255A3F286DD3E5C22FA917FF9D1C7CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
5F49FC4E0BA54BA88A354A97D42132E3943B9308CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
5991F660DA84B3FE2DE9ABB83118FD83F74A0EDACVE-2017-5754, CVE-2017-5753, CVE-2017-5715
51ECF2F24AEC50CD970BC75308226712DD92306DCVE-2017-5754, CVE-2017-5753, CVE-2017-5715
C90FB94DAED87300EAF7A26C4C63A891195B47ACCVE-2017-5754, CVE-2017-5753, CVE-2017-5715
F9E6A26D190477DA6F1DAD640E715883ABBD9990CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
295EB9FA321CA008428BACB28D6730560AE05827CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
49F5EBB26A95160FFAD41D3811C07D18D4A25205CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
B734D904F2D6121A06D7C50E88D413B5470DE7F2CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
78797F6F7898F9FF71BF31F7B4FF8E82AA7A8D33CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
0FD58D6B273ABA597F9EDB9A05368D6FE1740F7ACVE-2017-5754, CVE-2017-5753, CVE-2017-5715
00840F9B2B4219F2DD15302840A7589A83221851CVE-2017-5753, CVE-2017-5715
B79842004B75492527DC54678A1B59E628E564B7CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
1259FFA0EAA4F6F1A24D20C6A8A2C240601DBBD4CVE-2017-5754, CVE-2017-5753, CVE-2017-5715
851AC18973C0DFC0DF81681E52E66BD284E1ACC5CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
82E9B310F377CCFBB528D0F41EB10F79C57C9D89CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
A8354B442D6678F0A78BC4653D68D504BACACD2DCVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
37255451D28B9FA9C9FD4396B3DC9430731D9D2DCVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
AD0C44CD065145775692B034EF84A02F5F61DA30CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
1DA5AD5843F07345A1DCB322F6369A6FE59B4DC2CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
1CB9A4123D7911364FAC526A25D1E66EBDA93595CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
2E89B387B899A634BDB66119F34220C6E710AA2DCVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
56976D96741B105828454EDBE85BECDEDFD588AACVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
C2166B7B594BCC782B861E824D80C36F871CB700CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
89AF81C1AF2FAE20EDBAA35D91CDFEBDC75F100ECVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
D992FA8A6B12BD730EDAC42C21D128FCF9094771CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
8C83E856143B5275C98993CBA8A6C63A4BEDAA8ECVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
6C1582E0BFFEA98A8120E202237822C13401BE40CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
0228E88CC943F7A842D662BCC9D255E9AF4F92C6CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
97F3B2AAE2A2D551460BA2F9418DCB89B960A064CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
DB3D7536A2C256B4E8C1E9A203DD7FBD4F5F63D0CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
5ED38AC16FEBB519F13E1746F4D569C89187735FCVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
80A2AD7845C43B6D7DF96FCEC92560CBADD0D92CCVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
5B45D428DD0FAC965308E8D1EAA80BEDF14962E3CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
852C9142CFAC0719E8617977295D40E15F7F1B4BCVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
B4B06B13EB76D243E2C83938B560E9E663DB775CCVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
AC3A3915C468182878B0D0B2D9C2049DDF348A68CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
C9059F135B587B1907334E376274F4DE1DE7F353CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
2982913A87B51B538C5F300EC601F360D6ACED3DCVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
648B1A9F7E5E45E7AC6DB2596CBC8FE4A69F3727CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
07276594AD20E4DFB6CA16903E68717C255B1422CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
24EDBF7E33DF29125D11E793DCD77CC717338847CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
A4918BB07FA9ABF8D69ADED60950DDE9BE4F77CECVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...
C7C5AF5598E1AC0D5ACE05C39333A59D6113C209CVE-2013-0783, CVE-2013-0782, CVE-2013-0781, CVE-2013-0780, CVE-2013-0779, ...

Download all

JS: 
var stIsIE = /*@cc_on!@*/false; sorttable = { init: function() { // quit if this function has already been called if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); if (!document.createElement || !document.getElementsByTagName) return; sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; forEach(document.getElementsByTagName('table'), function(table) { if (table.className.search(/\bsortable\b/) != -1) { sorttable.makeSortable(table); } }); }, makeSortable: function(table) { if (table.getElementsByTagName('thead').length == 0) { // table doesn't have a tHead. Since it should have, create one and // put the first table row in it. the = document.createElement('thead'); the.appendChild(table.rows[0]); table.insertBefore(the,table.firstChild); } // Safari doesn't support table.tHead, sigh if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; if (table.tHead.rows.length != 1) return; // can't cope with two header rows // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as // "total" rows, for example). This is B&R, since what you're supposed // to do is put them in a tfoot. So, if there are sortbottom rows, // for backwards compatibility, move them to tfoot (creating it if needed). sortbottomrows = []; for (var i=0; i<table.rows.length; i++) { if (table.rows[i].className.search(/\bsortbottom\b/) != -1) { sortbottomrows[sortbottomrows.length] = table.rows[i]; } } if (sortbottomrows) { if (table.tFoot == null) { // table doesn't have a tfoot. Create one. tfo = document.createElement('tfoot'); table.appendChild(tfo); } for (var i=0; i<sortbottomrows.length; i++) { tfo.appendChild(sortbottomrows[i]); } delete sortbottomrows; } // work through each column and calculate its type headrow = table.tHead.rows[0].cells; for (var i=0; i<headrow.length; i++) { // manually override the type with a sorttable_type attribute if (!headrow[i].className.match(/\bsorttable_nosort\b/)) { // skip this col mtch = headrow[i].className.match(/\bsorttable_([a-z0-9]+)\b/); if (mtch) { override = mtch[1]; } if (mtch && typeof sorttable["sort_"+override] == 'function') { headrow[i].sorttable_sortfunction = sorttable["sort_"+override]; } else { headrow[i].sorttable_sortfunction = sorttable.guessType(table,i); } // make it clickable to sort headrow[i].sorttable_columnindex = i; headrow[i].sorttable_tbody = table.tBodies[0]; dean_addEvent(headrow[i],"click", sorttable.innerSortFunction = function(e) { if (this.className.search(/\bsorttable_sorted\b/) != -1) { // if we're already sorted by this column, just // reverse the table, which is quicker sorttable.reverse(this.sorttable_tbody); this.className = this.className.replace('sorttable_sorted','sorttable_sorted_reverse'); this.removeChild(document.getElementById('sorttable_sortfwdind')); sortrevind = document.createElement('span'); sortrevind.id = "sorttable_sortrevind"; sortrevind.innerHTML = stIsIE ? '&nbsp<font face="webdings">5</font>' : '&nbsp;&#x25B4;'; this.appendChild(sortrevind); return; } if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { // if we're already sorted by this column in reverse, just // re-reverse the table, which is quicker sorttable.reverse(this.sorttable_tbody); this.className = this.className.replace('sorttable_sorted_reverse','sorttable_sorted'); this.removeChild(document.getElementById('sorttable_sortrevind')); sortfwdind = document.createElement('span'); sortfwdind.id = "sorttable_sortfwdind"; sortfwdind.innerHTML = stIsIE ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;'; this.appendChild(sortfwdind); return; } // remove sorttable_sorted classes theadrow = this.parentNode; forEach(theadrow.childNodes, function(cell) { if (cell.nodeType == 1) { // an element cell.className = cell.className.replace('sorttable_sorted_reverse',''); cell.className = cell.className.replace('sorttable_sorted',''); } }); sortfwdind = document.getElementById('sorttable_sortfwdind'); if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } sortrevind = document.getElementById('sorttable_sortrevind'); if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } this.className += ' sorttable_sorted'; sortfwdind = document.createElement('span'); sortfwdind.id = "sorttable_sortfwdind"; sortfwdind.innerHTML = stIsIE ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;'; this.appendChild(sortfwdind); // build an array to sort. This is a Schwartzian transform thing, // i.e., we "decorate" each row with the actual sort key, // sort based on the sort keys, and then put the rows back in order // which is a lot faster because you only do getInnerText once per row row_array = []; col = this.sorttable_columnindex; rows = this.sorttable_tbody.rows; for (var j=0; j<rows.length; j++) { row_array[row_array.length] = [sorttable.getInnerText(rows[j].cells[col]), rows[j]]; } /* If you want a stable sort, uncomment the following line */ //sorttable.shaker_sort(row_array, this.sorttable_sortfunction); /* and comment out this one */ row_array.sort(this.sorttable_sortfunction); tb = this.sorttable_tbody; for (var j=0; j<row_array.length; j++) { tb.appendChild(row_array[j][1]); } delete row_array; }); } } }, guessType: function(table, column) { // guess the type of a column based on its first non-blank row sortfn = sorttable.sort_alpha; for (var i=0; i<table.tBodies[0].rows.length; i++) { text = sorttable.getInnerText(table.tBodies[0].rows[i].cells[column]); if (text != '') { if (text.match(/^-?[£$¤]?[\d,.]+%?$/)) { return sorttable.sort_numeric; } // check for a date: dd/mm/yyyy or dd/mm/yy // can have / or . or - as separator // can be mm/dd as well possdate = text.match(sorttable.DATE_RE) if (possdate) { // looks like a date first = parseInt(possdate[1]); second = parseInt(possdate[2]); if (first > 12) { // definitely dd/mm return sorttable.sort_ddmm; } else if (second > 12) { return sorttable.sort_mmdd; } else { // looks like a date, but we can't tell which, so assume // that it's dd/mm (English imperialism!) and keep looking sortfn = sorttable.sort_ddmm; } } } } return sortfn; }, getInnerText: function(node) { // gets the text we want to use for sorting for a cell. // strips leading and trailing whitespace. // this is *not* a generic getInnerText function; it's special to sorttable. // for example, you can override the cell text with a customkey attribute. // it also gets .value for <input> fields. if (!node) return ""; hasInputs = (typeof node.getElementsByTagName == 'function') && node.getElementsByTagName('input').length; if (node.getAttribute("sorttable_customkey") != null) { return node.getAttribute("sorttable_customkey"); } else if (typeof node.textContent != 'undefined' && !hasInputs) { return node.textContent.replace(/^\s+|\s+$/g, ''); } else if (typeof node.innerText != 'undefined' && !hasInputs) { return node.innerText.replace(/^\s+|\s+$/g, ''); } else if (typeof node.text != 'undefined' && !hasInputs) { return node.text.replace(/^\s+|\s+$/g, ''); } else { switch (node.nodeType) { case 3: if (node.nodeName.toLowerCase() == 'input') { return node.value.replace(/^\s+|\s+$/g, ''); } case 4: return node.nodeValue.replace(/^\s+|\s+$/g, ''); break; case 1: case 11: var innerText = ''; for (var i = 0; i < node.childNodes.length; i++) { innerText += sorttable.getInnerText(node.childNodes[i]); } return innerText.replace(/^\s+|\s+$/g, ''); break; default: return ''; } } }, reverse: function(tbody) { // reverse the rows in a tbody newrows = []; for (var i=0; i<tbody.rows.length; i++) { newrows[newrows.length] = tbody.rows[i]; } for (var i=newrows.length-1; i>=0; i--) { tbody.appendChild(newrows[i]); } delete newrows; }, /* sort functions each sort function takes two parameters, a and b you are comparing a[0] and b[0] */ sort_numeric: function(a,b) { aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); if (isNaN(aa)) aa = 0; bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); if (isNaN(bb)) bb = 0; return aa-bb; }, sort_alpha: function(a,b) { if (a[0]==b[0]) return 0; if (a[0]<b[0]) return -1; return 1; }, sort_ddmm: function(a,b) { mtch = a[0].match(sorttable.DATE_RE); y = mtch[3]; m = mtch[2]; d = mtch[1]; if (m.length == 1) m = '0'+m; if (d.length == 1) d = '0'+d; dt1 = y+m+d; mtch = b[0].match(sorttable.DATE_RE); y = mtch[3]; m = mtch[2]; d = mtch[1]; if (m.length == 1) m = '0'+m; if (d.length == 1) d = '0'+d; dt2 = y+m+d; if (dt1==dt2) return 0; if (dt1<dt2) return -1; return 1; }, sort_mmdd: function(a,b) { mtch = a[0].match(sorttable.DATE_RE); y = mtch[3]; d = mtch[2]; m = mtch[1]; if (m.length == 1) m = '0'+m; if (d.length == 1) d = '0'+d; dt1 = y+m+d; mtch = b[0].match(sorttable.DATE_RE); y = mtch[3]; d = mtch[2]; m = mtch[1]; if (m.length == 1) m = '0'+m; if (d.length == 1) d = '0'+d; dt2 = y+m+d; if (dt1==dt2) return 0; if (dt1<dt2) return -1; return 1; }, shaker_sort: function(list, comp_func) { // A stable sort function to allow multi-level sorting of data // see: http://en.wikipedia.org/wiki/Cocktail_sort // thanks to Joseph Nahmias var b = 0; var t = list.length - 1; var swap = true; while(swap) { swap = false; for(var i = b; i < t; ++i) { if ( comp_func(list[i], list[i+1]) > 0 ) { var q = list[i]; list[i] = list[i+1]; list[i+1] = q; swap = true; } } // for t--; if (!swap) break; for(var i = t; i > b; --i) { if ( comp_func(list[i], list[i-1]) < 0 ) { var q = list[i]; list[i] = list[i-1]; list[i-1] = q; swap = true; } } // for b++; } // while(swap) } } /* ****************************************************************** Supporting functions: bundled here to avoid depending on a library ****************************************************************** */ // Dean Edwards/Matthias Miller/John Resig /* for Mozilla/Opera9 */ if (document.addEventListener) { document.addEventListener("DOMContentLoaded", sorttable.init, false); } /* for Internet Explorer */ /*@cc_on @*/ /*@if (@_win32) document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>"); var script = document.getElementById("__ie_onload"); script.onreadystatechange = function() { if (this.readyState == "complete") { sorttable.init(); // call the onload handler } }; /*@end @*/ /* for Safari */ if (/WebKit/i.test(navigator.userAgent)) { // sniff var _timer = setInterval(function() { if (/loaded|complete/.test(document.readyState)) { sorttable.init(); // call the onload handler } }, 10); } /* for other browsers */ window.onload = sorttable.init; // written by Dean Edwards, 2005 // with input from Tino Zijdel, Matthias Miller, Diego Perini // http://dean.edwards.name/weblog/2005/10/add-event/ function dean_addEvent(element, type, handler) { if (element.addEventListener) { element.addEventListener(type, handler, false); } else { // assign each event handler a unique ID if (!handler.$$guid) handler.$$guid = dean_addEvent.guid++; // create a hash table of event types for the element if (!element.events) element.events = {}; // create a hash table of event handlers for each element/event pair var handlers = element.events[type]; if (!handlers) { handlers = element.events[type] = {}; // store the existing event handler (if there is one) if (element["on" + type]) { handlers[0] = element["on" + type]; } } // store the event handler in the hash table handlers[handler.$$guid] = handler; // assign a global event handler to do all the work element["on" + type] = handleEvent; } }; // a counter used to create unique IDs dean_addEvent.guid = 1; function removeEvent(element, type, handler) { if (element.removeEventListener) { element.removeEventListener(type, handler, false); } else { // delete the event handler from the hash table if (element.events && element.events[type]) { delete element.events[type][handler.$$guid]; } } }; function handleEvent(event) { var returnValue = true; // grab the event object (IE uses a global event object) event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event); // get a reference to the hash table of event handlers var handlers = this.events[event.type]; // execute each event handler for (var i in handlers) { this.$$handleEvent = handlers[i]; if (this.$$handleEvent(event) === false) { returnValue = false; } } return returnValue; }; function fixEvent(event) { // add W3C standard event methods event.preventDefault = fixEvent.preventDefault; event.stopPropagation = fixEvent.stopPropagation; return event; }; fixEvent.preventDefault = function() { this.returnValue = false; }; fixEvent.stopPropagation = function() { this.cancelBubble = true; } // Dean's forEach: http://dean.edwards.name/base/forEach.js /* forEach, version 1.0 Copyright 2006, Dean Edwards License: http://www.opensource.org/licenses/mit-license.php */ // array-like enumeration if (!Array.forEach) { // mozilla already supports this Array.forEach = function(array, block, context) { for (var i = 0; i < array.length; i++) { block.call(context, array[i], i, array); } }; } // generic enumeration Function.prototype.forEach = function(object, block, context) { for (var key in object) { if (typeof this.prototype[key] == "undefined") { block.call(context, object[key], key, object); } } }; // character enumeration String.forEach = function(string, block, context) { Array.forEach(string.split(""), function(chr, index) { block.call(context, chr, index, string); }); }; // globally resolve forEach enumeration var forEach = function(object, block, context) { if (object) { var resolve = Object; // default if (object instanceof Function) { // functions have a "length" property resolve = Function; } else if (object.forEach instanceof Function) { // the object implements a custom forEach method so use that object.forEach(block, context); return; } else if (typeof object == "string") { // the object is a string resolve = String; } else if (typeof object.length == "number") { // the object is array-like resolve = Array; } resolve.forEach(object, block, context); } };

Viewing all articles
Browse latest Browse all 2151

Trending Articles