Finished commenting BeEF core. From this point on each developer should be commenting their own core changes

git-svn-id: https://beef.googlecode.com/svn/trunk@1362 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
passbe
2011-10-15 03:59:24 +00:00
parent e22332e1f8
commit 65b8652f26
23 changed files with 253 additions and 329 deletions

View File

@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
module BeEF
module Core
module Constants
@@ -38,6 +39,9 @@ module Constants
FRIENDLY_O_NAME = 'Opera'
FRIENDLY_UN_NAME = "UNKNOWN"
# Attempt to retrieve a browsers friendly name
# @param [String] browser_name Short browser name
# @return [String] Friendly browser name
def self.friendly_name(browser_name)
case browser_name
@@ -53,6 +57,10 @@ module Constants
end
# Attempt to match the browserstring to a browser constant
# @param [String] browserstring Browser UA string
# @return [Array] An array of matching browser constants
# @todo Confirm this function returns an array if multiple constants are matched
def self.match_browser(browserstring)
matches = []
browserstring.split(" ").each do |chunk|
@@ -80,4 +88,4 @@ module Constants
end
end
end
end