ezkl / sniffles

Detects popular CMS, Javascript libraries, and other items of interest.
http://documentup.com/ezkl/sniffles
MIT License
35 stars 8 forks source link

Stop checking CMS's once one is found #48

Open JakeAustwick opened 12 years ago

JakeAustwick commented 12 years ago

A page can only belong to one CMS, so I think it seems smart to stop checking if it's another CMS if one is detected. However with the way things are currently implemented, I'm not sure on the best way to add this.

That way the sniffer response object could be something along the lines of

:cms => {:platform=>:wordpress, :version=>false, :feed=>"http://feeds.feedburner.com/pearsonified", :theme=>"thesis_17", :pingback=>"http://www.pearsonified.com/xmlrpc.php"}

Rather than

:phpbb=>{:found=>false}, :vbulletin=>{:found=>false}, :wordpress=>{:found=>true, :version=>false, :feed=>"http://feeds.feedburner.com/pearsonified", :theme=>"thesis_17", :pingback=>"http://www.pearsonified.com/xmlrpc.php"}}

I'm not entirely sure on the best implementation either. But currently the only way to find out what CMS a site actually was would be to look through all the CMS keys, and find which were true? Unless I'm overlooking something.

ezkl commented 12 years ago

Good point. I'm not sure how to best implement it. The current group implementation was the result of a late night hack session and will definitely need to be redesigned.

Also, I need to revert a change I just made that moved your phpBB from cms to forum and move the vBulletin sniffer into CMS. We may want to add some sort of :type metadata to sniffers, but I think you make a great point that a single page isn't likely to return both phpBB and WordPress.