Created
December 27, 2011 15:31
-
-
Save todb-r7/1524019 to your computer and use it in GitHub Desktop.
All usages of :empty? in Metasploit: grep -r -A3 "\.empty?" .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
./msfencode: if(ext and not ext.empty?) | |
./msfencode- fmt = ext | |
./msfencode- end | |
./msfencode-end | |
-- | |
./plugins/nexpose.rb: if(args.length == 0 or args[0].empty? or args[0] == "-h") | |
./plugins/nexpose.rb- print_status("Usage: ") | |
./plugins/nexpose.rb- print_status(" nexpose_connect username:password@host[:port] <ssl-confirm>") | |
./plugins/nexpose.rb- print_status(" -OR- ") | |
-- | |
./plugins/nexpose.rb: if(opt_ranges.strip.empty?) | |
./plugins/nexpose.rb- print_line("Usage: nexpose_scan [options] <Target IP Ranges>") | |
./plugins/nexpose.rb- print_line(opts.usage) | |
./plugins/nexpose.rb- return | |
-- | |
./plugins/nexpose.rb: break if queue.empty? | |
./plugins/nexpose.rb- print_status("Scanning #{queue[0]}-#{queue[-1]}...") if opt_verbose | |
./plugins/nexpose.rb- | |
./plugins/nexpose.rb- msfid = Time.now.to_i | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- @controller.to_file(args[0]) | |
./plugins/lab.rb- end | |
./plugins/lab.rb- | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- | |
./plugins/lab.rb- if args[0] =~ /^remote_/ | |
./plugins/lab.rb- return lab_usage unless args.count == 3 | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- | |
./plugins/lab.rb- if args[0] =~ /^remote_/ | |
./plugins/lab.rb- return lab_usage unless args.count == 3 | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- @controller.to_file(args[0]) | |
./plugins/lab.rb- end | |
./plugins/lab.rb- | |
-- | |
./plugins/lab.rb: if args.empty? | |
./plugins/lab.rb- hlp_print_lab | |
./plugins/lab.rb- else | |
./plugins/lab.rb- args.each do |name| | |
-- | |
./plugins/lab.rb: if args.empty? | |
./plugins/lab.rb- hlp_print_lab | |
./plugins/lab.rb- else | |
./plugins/lab.rb- args.each do |arg| | |
-- | |
./plugins/lab.rb: if args.empty? | |
./plugins/lab.rb- hlp_print_lab | |
./plugins/lab.rb- else | |
./plugins/lab.rb- args.each do |arg| | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- | |
./plugins/lab.rb- if args[0] == "all" | |
./plugins/lab.rb- @controller.each do |vm| | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- | |
./plugins/lab.rb- if args[0] == "all" | |
./plugins/lab.rb- @controller.each do |vm| | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- | |
./plugins/lab.rb- if args[0] == "all" | |
./plugins/lab.rb- @controller.each{ |vm| vm.suspend } | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- | |
./plugins/lab.rb- if args[0] == "all" | |
./plugins/lab.rb- print_line "Resetting all lab vms." | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- command = args[args.count-1] | |
./plugins/lab.rb- if args[0] == "all" | |
./plugins/lab.rb- print_line "Running command #{command} on all vms." | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- return lab_usage if args.count < 3 | |
./plugins/lab.rb- | |
./plugins/lab.rb- local_path = args[args.count-2] | |
-- | |
./plugins/lab.rb: return lab_usage if args.empty? | |
./plugins/lab.rb- uri = args[args.count-1] | |
./plugins/lab.rb- if args[0] == "all" | |
./plugins/lab.rb- print_line "Opening: #{uri} on all vms." | |
-- | |
./plugins/lab.rb: if args.empty? | |
./plugins/lab.rb- commands.each_pair {|k,v| print_line "%-#{longest_cmd_size}s - %s" % [k,v] } | |
./plugins/lab.rb- else | |
./plugins/lab.rb- args.each do |c| | |
-- | |
./plugins/wmap.rb: if l == nil or l.empty? | |
./plugins/wmap.rb- l = 200 | |
./plugins/wmap.rb- s = true | |
./plugins/wmap.rb- else | |
-- | |
./plugins/wmap.rb: if not modname.empty? | |
./plugins/wmap.rb- eprofile << modname | |
./plugins/wmap.rb- end | |
./plugins/wmap.rb- end | |
-- | |
./plugins/wmap.rb: datastr = temparr.join("&") if (temparr and not temparr.empty?) | |
./plugins/wmap.rb- | |
./plugins/wmap.rb- if (utest_query.has_key?(mod.signature(form.path,datastr)) == false) | |
./plugins/wmap.rb- | |
-- | |
./plugins/wmap.rb: datastr = temparr.join("&") if (temparr and not temparr.empty?) | |
./plugins/wmap.rb- | |
./plugins/wmap.rb- mod.datastore['METHOD'] = req.method.upcase | |
./plugins/wmap.rb- mod.datastore['PATH'] = req.path | |
-- | |
./plugins/wmap.rb: if url.to_s.empty? | |
./plugins/wmap.rb- url = vhost | |
./plugins/wmap.rb- vhost = nil | |
./plugins/wmap.rb- end | |
-- | |
./plugins/wmap.rb: next if url.to_s.strip.empty? | |
./plugins/wmap.rb- vhost = nil | |
./plugins/wmap.rb- | |
./plugins/wmap.rb- # Allow the URL to be supplied as VHOST,URL if a custom VHOST | |
-- | |
./plugins/wmap.rb: if url.to_s.empty? | |
./plugins/wmap.rb- url = vhost | |
./plugins/wmap.rb- vhost = nil | |
./plugins/wmap.rb- end | |
-- | |
./plugins/wmap.rb: next if url.to_s.strip.empty? | |
./plugins/wmap.rb- vhost = nil | |
./plugins/wmap.rb- | |
./plugins/wmap.rb- # Allow the URL to be supplied as VHOST,URL if a custom VHOST | |
-- | |
./plugins/wmap.rb: if url.to_s.empty? | |
./plugins/wmap.rb- url = vhost | |
./plugins/wmap.rb- vhost = nil | |
./plugins/wmap.rb- end | |
-- | |
./plugins/token_hunter.rb: next if line.empty? | |
./plugins/token_hunter.rb- next if line =~ /^#/ | |
./plugins/token_hunter.rb- opt_users << line | |
./plugins/token_hunter.rb- end | |
-- | |
./plugins/nessus.rb: if(args.length == 0 or args[0].empty?) | |
./plugins/nessus.rb- ncusage | |
./plugins/nessus.rb- return | |
./plugins/nessus.rb- end | |
-- | |
./plugins/nessus.rb: if(args.length == 0 or args[0].empty? or args[0] == "-h") | |
./plugins/nessus.rb- print_status("Usage: ") | |
./plugins/nessus.rb- print_status(" nessus_report_get <report id> ") | |
./plugins/nessus.rb- print_status(" use nessus_report_list to list all available reports for importing") | |
-- | |
./plugins/nessus.rb: if list.empty? | |
./plugins/nessus.rb- print_status("No Scans Running.") | |
./plugins/nessus.rb- print_status("You can:") | |
./plugins/nessus.rb- print_status(" List of completed scans: nessus_report_list") | |
-- | |
./plugins/nessus.rb: if list.empty? | |
./plugins/nessus.rb- print_status("No Templates Created.") | |
./plugins/nessus.rb- print_status("You can:") | |
./plugins/nessus.rb- print_status(" List of completed scans: nessus_report_list") | |
-- | |
./modules/nops/x64/simple.rb: if good_instructions.empty? | |
./modules/nops/x64/simple.rb- # If we are left with no valid instructions to use we simple cant generate a sled. | |
./modules/nops/x64/simple.rb- sled = nil | |
./modules/nops/x64/simple.rb- elsif not random | |
-- | |
./modules/post/linux/gather/enum_linux.rb: save("SSH keys", ssh_keys) unless ssh_keys.empty? | |
./modules/post/linux/gather/enum_linux.rb- save("Linux Installed Packages", installed_pkg) | |
./modules/post/linux/gather/enum_linux.rb- save("Linux Configured Services", installed_svc) | |
./modules/post/linux/gather/enum_linux.rb- | |
-- | |
./modules/post/windows/recon/computer_browser_discovery.rb: report_host(:host => x[:ip]) if datastore['SAVEHOSTS'] and !(x[:ip].empty?) | |
./modules/post/windows/recon/computer_browser_discovery.rb- end | |
./modules/post/windows/recon/computer_browser_discovery.rb- print_status(results.to_s) | |
./modules/post/windows/recon/computer_browser_discovery.rb- store_loot("discovered.hosts", "text/plain", session, results.to_s, "discovered_hosts.txt", "Computer Browser Discovered Hosts") | |
-- | |
./modules/post/windows/manage/autoroute.rb: if datastore['ACTION'].to_s.empty? | |
./modules/post/windows/manage/autoroute.rb- datastore['CMD'].to_s.downcase.to_sym | |
./modules/post/windows/manage/autoroute.rb- else | |
./modules/post/windows/manage/autoroute.rb- wlog("Warning, deprecated use of 'ACTION' datastore option for #{self.fullname}'. Use 'CMD' instead.") | |
-- | |
./modules/post/windows/manage/autoroute.rb: return false if(ip.nil? || ip.strip.empty?) | |
./modules/post/windows/manage/autoroute.rb- begin | |
./modules/post/windows/manage/autoroute.rb- rw = Rex::Socket::RangeWalker.new(ip.strip) | |
./modules/post/windows/manage/autoroute.rb- (rw.valid? && rw.length == 1) ? true : false | |
-- | |
./modules/post/windows/manage/add_user_domain.rb: if ! members.empty? | |
./modules/post/windows/manage/add_user_domain.rb- members.each do |user| | |
./modules/post/windows/manage/add_user_domain.rb- if (user == "#{datastore['USERNAME']}") | |
./modules/post/windows/manage/add_user_domain.rb- print_status("#{datastore['USERNAME']} is already a member of the '#{datastore['GROUP']}' group") | |
-- | |
./modules/post/windows/manage/add_user_domain.rb: if ! members.empty? | |
./modules/post/windows/manage/add_user_domain.rb- members.each do |user| | |
./modules/post/windows/manage/add_user_domain.rb- if (user == "#{datastore['USERNAME']}") | |
./modules/post/windows/manage/add_user_domain.rb- print_good("#{datastore['USERNAME']} is now a member of the '#{datastore['GROUP']}' group!") | |
-- | |
./modules/post/windows/manage/persistence.rb: if datastore['REXE'].nil? or datastore['REXE'].empty? | |
./modules/post/windows/manage/persistence.rb- print_error("Please define REXE") | |
./modules/post/windows/manage/persistence.rb- return | |
./modules/post/windows/manage/persistence.rb- end | |
-- | |
./modules/post/windows/manage/persistence.rb: if datastore['REXENAME'].nil? or datastore['REXENAME'].empty? | |
./modules/post/windows/manage/persistence.rb- print_error("Please define REXENAME") | |
./modules/post/windows/manage/persistence.rb- return | |
./modules/post/windows/manage/persistence.rb- end | |
-- | |
./modules/post/windows/manage/persistence.rb: if not opts.empty? | |
./modules/post/windows/manage/persistence.rb- opts.split(",").each do |o| | |
./modules/post/windows/manage/persistence.rb- opt,val = o.split("=", 2) | |
./modules/post/windows/manage/persistence.rb- pay.datastore[opt] = val | |
-- | |
./modules/post/windows/manage/payload_inject.rb: if not opts.empty? | |
./modules/post/windows/manage/payload_inject.rb- opts.split(",").each do |o| | |
./modules/post/windows/manage/payload_inject.rb- opt,val = o.split("=",2) | |
./modules/post/windows/manage/payload_inject.rb- pay.datastore[opt] = val | |
-- | |
./modules/post/windows/escalate/net_runtime_modify.rb: if vuln.nil? or vuln.empty? | |
./modules/post/windows/escalate/net_runtime_modify.rb- print_error("Could not find any vulnerable .NET Framework Optimization services") | |
./modules/post/windows/escalate/net_runtime_modify.rb- return | |
./modules/post/windows/escalate/net_runtime_modify.rb- else | |
-- | |
./modules/post/windows/capture/keylog_recorder.rb: if not outp.empty? | |
./modules/post/windows/capture/keylog_recorder.rb- print_good("Keystrokes captured #{outp}") if datastore['ShowKeystrokes'] | |
./modules/post/windows/capture/keylog_recorder.rb- file_local_write(logfile,"#{outp}\n") | |
./modules/post/windows/capture/keylog_recorder.rb- end | |
-- | |
./modules/post/windows/gather/enum_ie.rb: if not @hist_table.rows.empty? | |
./modules/post/windows/gather/enum_ie.rb- print_status("Writing history to loot...") | |
./modules/post/windows/gather/enum_ie.rb- path = store_loot( | |
./modules/post/windows/gather/enum_ie.rb- 'ie.history', | |
-- | |
./modules/post/windows/gather/enum_ie.rb: if not @cook_table.rows.empty? | |
./modules/post/windows/gather/enum_ie.rb- print_status("Writing cookies to loot...") | |
./modules/post/windows/gather/enum_ie.rb- path = store_loot( | |
./modules/post/windows/gather/enum_ie.rb- 'ie.cookies', | |
-- | |
./modules/post/windows/gather/enum_ie.rb: if not cred_table.rows.empty? | |
./modules/post/windows/gather/enum_ie.rb- print_status("Writing gathered credentials to loot...") | |
./modules/post/windows/gather/enum_ie.rb- path = store_loot( | |
./modules/post/windows/gather/enum_ie.rb- 'ie.user.creds', | |
-- | |
./modules/post/windows/gather/hashdump.rb: if(enchash.empty?) | |
./modules/post/windows/gather/hashdump.rb- case pass | |
./modules/post/windows/gather/hashdump.rb- when @sam_lmpass | |
./modules/post/windows/gather/hashdump.rb- return @sam_empty_lm | |
-- | |
./modules/post/windows/gather/smart_hashdump.rb: if(enchash.empty?) | |
./modules/post/windows/gather/smart_hashdump.rb- case pass | |
./modules/post/windows/gather/smart_hashdump.rb- when @sam_lmpass | |
./modules/post/windows/gather/smart_hashdump.rb- return @sam_empty_lm | |
-- | |
./modules/post/windows/gather/enum_snmp.rb: if not comm_str.nil? and not comm_str.empty? | |
./modules/post/windows/gather/enum_snmp.rb- comm_str.each do |c| | |
./modules/post/windows/gather/enum_snmp.rb- | |
./modules/post/windows/gather/enum_snmp.rb- case registry_getvaldata(key,c) | |
-- | |
./modules/post/windows/gather/enum_snmp.rb: if not trap_hosts.nil? and not trap_hosts.empty? | |
./modules/post/windows/gather/enum_snmp.rb- trap_hosts.each do |c| | |
./modules/post/windows/gather/enum_snmp.rb- print_status("Community Name: #{c}") | |
./modules/post/windows/gather/enum_snmp.rb- session.framework.db.report_auth_info( | |
-- | |
./modules/post/windows/gather/enum_snmp.rb: if not managers.nil? and not managers.empty? | |
./modules/post/windows/gather/enum_snmp.rb- print_status("Community Strings can be accessed from:") | |
./modules/post/windows/gather/enum_snmp.rb- managers.each do |m| | |
./modules/post/windows/gather/enum_snmp.rb- print_status("\t#{registry_getvaldata(key,m)}") | |
-- | |
./modules/post/windows/gather/enum_tokens.rb: if not tbl_pids.rows.empty? and session.framework.db.active | |
./modules/post/windows/gather/enum_tokens.rb- report_note( | |
./modules/post/windows/gather/enum_tokens.rb- :host => session.tunnel_peer, | |
./modules/post/windows/gather/enum_tokens.rb- :type => "pid", | |
-- | |
./modules/post/windows/gather/arp_scanner.rb: sleep(0.05) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/windows/gather/arp_scanner.rb- i = 0 | |
./modules/post/windows/gather/arp_scanner.rb- end | |
./modules/post/windows/gather/arp_scanner.rb- end | |
./modules/post/windows/gather/arp_scanner.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/windows/gather/arp_scanner.rb- return found | |
./modules/post/windows/gather/arp_scanner.rb- end | |
./modules/post/windows/gather/arp_scanner.rb- | |
-- | |
./modules/post/windows/gather/apple_ios_backup.rb: if paths.empty? | |
./modules/post/windows/gather/apple_ios_backup.rb- print_status("No users found with an iTunes backup directory") | |
./modules/post/windows/gather/apple_ios_backup.rb- return | |
./modules/post/windows/gather/apple_ios_backup.rb- end | |
-- | |
./modules/post/windows/gather/enum_hostfile.rb: if not entries.empty? | |
./modules/post/windows/gather/enum_hostfile.rb- print_line("Found entries:") | |
./modules/post/windows/gather/enum_hostfile.rb- entries.each do |e| | |
./modules/post/windows/gather/enum_hostfile.rb- print_good(e.to_s) | |
-- | |
./modules/post/windows/gather/enum_domain_group_users.rb: if ! members.empty? | |
./modules/post/windows/gather/enum_domain_group_users.rb- | |
./modules/post/windows/gather/enum_domain_group_users.rb- print_status("Found users in #{datastore['GROUP']}") | |
./modules/post/windows/gather/enum_domain_group_users.rb- | |
-- | |
./modules/post/windows/gather/enum_domain_tokens.rb: if not domain.empty? | |
./modules/post/windows/gather/enum_domain_tokens.rb- uid = client.sys.config.getuid | |
./modules/post/windows/gather/enum_domain_tokens.rb- dom_admins = list_domain_group_mem("Domain Admins") | |
./modules/post/windows/gather/enum_domain_tokens.rb- | |
-- | |
./modules/post/windows/gather/enum_dirperms.rb: if not datastore['PATH'].empty? | |
./modules/post/windows/gather/enum_dirperms.rb- path = datastore['PATH'] | |
./modules/post/windows/gather/enum_dirperms.rb- end | |
./modules/post/windows/gather/enum_dirperms.rb- | |
-- | |
./modules/post/windows/gather/enum_ms_product_keys.rb: if not tbl.rows.empty? | |
./modules/post/windows/gather/enum_ms_product_keys.rb- results = tbl.to_csv | |
./modules/post/windows/gather/enum_ms_product_keys.rb- print_line("\n" + tbl.to_s + "\n") | |
./modules/post/windows/gather/enum_ms_product_keys.rb- path = store_loot("host.ms_keys", "text/plain", session, results, "ms_keys.txt", "Microsoft Product Key and Info") | |
-- | |
./modules/post/windows/gather/credentials/imvu.rb: if subkeys.nil? or subkeys.empty? | |
./modules/post/windows/gather/credentials/imvu.rb- print_status ("IMVU not installed for this user.") | |
./modules/post/windows/gather/credentials/imvu.rb- next | |
./modules/post/windows/gather/credentials/imvu.rb- end | |
-- | |
./modules/post/windows/gather/credentials/filezilla_server.rb: if !paths.empty? | |
./modules/post/windows/gather/credentials/filezilla_server.rb- print_status("Found FileZilla Server") | |
./modules/post/windows/gather/credentials/filezilla_server.rb- print_line("") | |
./modules/post/windows/gather/credentials/filezilla_server.rb- paths << path + 'FileZilla Server.xml' | |
-- | |
./modules/post/windows/gather/credentials/razorsql.rb: if content and not content.empty? | |
./modules/post/windows/gather/credentials/razorsql.rb- creds = parse_content(creds_tbl, content, user['UserName']) | |
./modules/post/windows/gather/credentials/razorsql.rb- creds.each do |c| | |
./modules/post/windows/gather/credentials/razorsql.rb- creds_tbl << c | |
-- | |
./modules/post/windows/gather/credentials/razorsql.rb: if not creds_tbl.rows.empty? | |
./modules/post/windows/gather/credentials/razorsql.rb- path = store_loot( | |
./modules/post/windows/gather/credentials/razorsql.rb- 'razor.user.creds', | |
./modules/post/windows/gather/credentials/razorsql.rb- 'text/csv', | |
-- | |
./modules/post/windows/gather/credentials/razorsql.rb: pass = decrypt(pass) if not pass.empty? | |
./modules/post/windows/gather/credentials/razorsql.rb- | |
./modules/post/windows/gather/credentials/razorsql.rb- # Store data | |
./modules/post/windows/gather/credentials/razorsql.rb- creds << [user, pass, type, host, port, dbname, database] | |
-- | |
./modules/post/windows/gather/credentials/smartftp.rb: next if epassword.empty? | |
./modules/post/windows/gather/credentials/smartftp.rb- | |
./modules/post/windows/gather/credentials/smartftp.rb- pass = decrypt(epassword) | |
./modules/post/windows/gather/credentials/smartftp.rb- | |
-- | |
./modules/post/windows/gather/credentials/idm.rb: if subkeys.nil? or subkeys.empty? | |
./modules/post/windows/gather/credentials/idm.rb- print_status ("IDM not installed for this user.") | |
./modules/post/windows/gather/credentials/idm.rb- return | |
./modules/post/windows/gather/credentials/idm.rb- end | |
-- | |
./modules/post/windows/gather/credentials/imail.rb: if imail_domain.empty? | |
./modules/post/windows/gather/credentials/imail.rb- domains_key = registry_enumkeys("#{base}\\domains") | |
./modules/post/windows/gather/credentials/imail.rb- if not domains_key.nil? | |
./modules/post/windows/gather/credentials/imail.rb- domains_key.each do |domain_key| | |
-- | |
./modules/post/windows/gather/credentials/imail.rb: if imail_user.empty? | |
./modules/post/windows/gather/credentials/imail.rb- users = registry_enumkeys(user_key) | |
./modules/post/windows/gather/credentials/imail.rb- if not users.nil? | |
./modules/post/windows/gather/credentials/imail.rb- users.each do |user| | |
-- | |
./modules/post/windows/gather/credentials/imail.rb: return "" if username.empty? or enc_password.empty? | |
./modules/post/windows/gather/credentials/imail.rb- | |
./modules/post/windows/gather/credentials/imail.rb- counter = 0 | |
./modules/post/windows/gather/credentials/imail.rb- password = '' | |
-- | |
./modules/post/windows/gather/credentials/enum_cred_store.rb: if not creds.empty? | |
./modules/post/windows/gather/credentials/enum_cred_store.rb- creds.each do |cred| | |
./modules/post/windows/gather/credentials/enum_cred_store.rb- credstr = "\t Type: " | |
./modules/post/windows/gather/credentials/enum_cred_store.rb- credstr << cred["type"].to_s | |
-- | |
./modules/post/windows/gather/credentials/mremote.rb: user= "#{domain}\\#{user}" unless domain.nil? or domain.empty? | |
./modules/post/windows/gather/credentials/mremote.rb- report_auth_info( | |
./modules/post/windows/gather/credentials/mremote.rb- :host => host, | |
./modules/post/windows/gather/credentials/mremote.rb- :port => port, | |
-- | |
./modules/post/windows/gather/credentials/trillian.rb: next if accounts.empty? | |
./modules/post/windows/gather/credentials/trillian.rb- stat = session.fs.file.stat(accounts) rescue nil | |
./modules/post/windows/gather/credentials/trillian.rb- next if stat.nil? | |
./modules/post/windows/gather/credentials/trillian.rb- get_ini(accounts) | |
-- | |
./modules/post/windows/gather/credentials/coreftp.rb: if subkeys.nil? or subkeys.empty? | |
./modules/post/windows/gather/credentials/coreftp.rb- print_status ("CoreFTP not installed for this user.") | |
./modules/post/windows/gather/credentials/coreftp.rb- next | |
./modules/post/windows/gather/credentials/coreftp.rb- end | |
-- | |
./modules/post/windows/gather/credentials/meebo.rb: next if accounts.empty? | |
./modules/post/windows/gather/credentials/meebo.rb- stat = session.fs.file.stat(accounts) rescue nil | |
./modules/post/windows/gather/credentials/meebo.rb- next if stat.nil? | |
./modules/post/windows/gather/credentials/meebo.rb- parse_txt(accounts) | |
-- | |
./modules/post/windows/gather/credentials/dyndns.rb: if not creds.rows.empty? | |
./modules/post/windows/gather/credentials/dyndns.rb- p = store_loot( | |
./modules/post/windows/gather/credentials/dyndns.rb- 'dyndns.creds', | |
./modules/post/windows/gather/credentials/dyndns.rb- 'text/csv', | |
-- | |
./modules/post/windows/gather/credentials/dyndns.rb: if not tbl.rows.empty? | |
./modules/post/windows/gather/credentials/dyndns.rb- p = store_loot( | |
./modules/post/windows/gather/credentials/dyndns.rb- 'dyndns.data', | |
./modules/post/windows/gather/credentials/dyndns.rb- 'text/plain', | |
-- | |
./modules/post/windows/gather/credentials/dyndns.rb: if content.empty? | |
./modules/post/windows/gather/credentials/dyndns.rb- print_error("Config file seems empty, will not continue") | |
./modules/post/windows/gather/credentials/dyndns.rb- return | |
./modules/post/windows/gather/credentials/dyndns.rb- end | |
-- | |
./modules/post/windows/gather/credentials/epo_sql.rb: if subkeys.nil? or subkeys.empty? | |
./modules/post/windows/gather/credentials/epo_sql.rb- print_error ("ePO 4.6 Not Installed or No Permissions to RegKey") | |
./modules/post/windows/gather/credentials/epo_sql.rb- return | |
./modules/post/windows/gather/credentials/epo_sql.rb- end | |
-- | |
./modules/post/windows/gather/enum_devices.rb: while(not devices.nil? and not devices.empty?) | |
./modules/post/windows/gather/enum_devices.rb- 1.upto(3) do | |
./modules/post/windows/gather/enum_devices.rb- t << framework.threads.spawn("Module(#{self.refname})", false, devices.shift) do |device| | |
./modules/post/windows/gather/enum_devices.rb- next if device.nil? | |
-- | |
./modules/post/windows/gather/enum_devices.rb: next if desc.empty? and mfg.empty? | |
./modules/post/windows/gather/enum_devices.rb- | |
./modules/post/windows/gather/enum_devices.rb- driver_version = "" | |
./modules/post/windows/gather/enum_devices.rb- | |
./modules/post/windows/gather/enum_devices.rb: if not driver_guid.nil? or not driver_guid.empty? | |
./modules/post/windows/gather/enum_devices.rb- if driver_guid =~ /\\/ | |
./modules/post/windows/gather/enum_devices.rb- k = "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Class\\" + driver_guid | |
./modules/post/windows/gather/enum_devices.rb- d = registry_getvaldata(k, "DriverVersion") | |
-- | |
./modules/post/windows/gather/enum_computers.rb: if not domain.empty? | |
./modules/post/windows/gather/enum_computers.rb- hostname_list = get_domain_computers() | |
./modules/post/windows/gather/enum_computers.rb- list_computers(domain, hostname_list) | |
./modules/post/windows/gather/enum_computers.rb- end | |
-- | |
./modules/post/windows/gather/enum_applications.rb: while(not apps.empty?) | |
./modules/post/windows/gather/enum_applications.rb- | |
./modules/post/windows/gather/enum_applications.rb- 1.upto(16) do | |
./modules/post/windows/gather/enum_applications.rb- t << framework.threads.spawn("Module(#{self.refname})", false, apps.shift) do |k| | |
-- | |
./modules/post/multi/manage/sudo.rb: if sudo_bin.empty? | |
./modules/post/multi/manage/sudo.rb- print_error "No sudo binary available. Aborting." | |
./modules/post/multi/manage/sudo.rb- return | |
./modules/post/multi/manage/sudo.rb- end | |
-- | |
./modules/post/multi/manage/sudo.rb: if password.to_s.empty? | |
./modules/post/multi/manage/sudo.rb- print_status "No password available, trying a passwordless sudo." | |
./modules/post/multi/manage/sudo.rb- else | |
./modules/post/multi/manage/sudo.rb- print_status "Sudoing with password `#{password}'." | |
-- | |
./modules/post/multi/manage/sudo.rb: if password.to_s.empty? | |
./modules/post/multi/manage/sudo.rb- begin | |
./modules/post/multi/manage/sudo.rb- ::Timeout.timeout(30) do | |
./modules/post/multi/manage/sudo.rb- cmd_exec("sudo -s") | |
-- | |
./modules/post/multi/manage/system_session.rb: if not cmd.empty? | |
./modules/post/multi/manage/system_session.rb- print_status("Executing reverse tcp shel to #{lhost} on port #{lport}") | |
./modules/post/multi/manage/system_session.rb- session.shell_command_token("(#{cmd} &)") | |
./modules/post/multi/manage/system_session.rb- end | |
-- | |
./modules/post/multi/gather/dns_reverse_lookup.rb: sleep(0.05) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/multi/gather/dns_reverse_lookup.rb- i = 0 | |
./modules/post/multi/gather/dns_reverse_lookup.rb- end | |
./modules/post/multi/gather/dns_reverse_lookup.rb- end | |
./modules/post/multi/gather/dns_reverse_lookup.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/multi/gather/dns_reverse_lookup.rb- | |
./modules/post/multi/gather/dns_reverse_lookup.rb- end | |
./modules/post/multi/gather/dns_reverse_lookup.rb-end | |
-- | |
./modules/post/multi/gather/ping_sweep.rb: sleep(0.5) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/multi/gather/ping_sweep.rb- i = 0 | |
./modules/post/multi/gather/ping_sweep.rb- end | |
./modules/post/multi/gather/ping_sweep.rb- end | |
./modules/post/multi/gather/ping_sweep.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/multi/gather/ping_sweep.rb- | |
./modules/post/multi/gather/ping_sweep.rb- rescue ::Exception => e | |
./modules/post/multi/gather/ping_sweep.rb- print_status("The following Error was encountered: #{e.class} #{e}") | |
-- | |
./modules/post/multi/gather/filezilla_client_cred.rb: if paths.nil? or paths.empty? | |
./modules/post/multi/gather/filezilla_client_cred.rb- print_status("No users found with a FileZilla directory") | |
./modules/post/multi/gather/filezilla_client_cred.rb- return | |
./modules/post/multi/gather/filezilla_client_cred.rb- end | |
-- | |
./modules/post/multi/gather/ssh_creds.rb: if paths.nil? or paths.empty? | |
./modules/post/multi/gather/ssh_creds.rb- print_error("No users found with a .ssh directory") | |
./modules/post/multi/gather/ssh_creds.rb- return | |
./modules/post/multi/gather/ssh_creds.rb- end | |
-- | |
./modules/post/multi/gather/ssh_creds.rb: if id.nil? or id.empty? | |
./modules/post/multi/gather/ssh_creds.rb- print_error("This session is not responding, perhaps the session is dead") | |
./modules/post/multi/gather/ssh_creds.rb- end | |
./modules/post/multi/gather/ssh_creds.rb- | |
-- | |
./modules/post/multi/gather/ssh_creds.rb: if id.nil? or id.empty? | |
./modules/post/multi/gather/ssh_creds.rb- print_error("This session is not responding, perhaps the session is dead") | |
./modules/post/multi/gather/ssh_creds.rb- end | |
./modules/post/multi/gather/ssh_creds.rb- | |
-- | |
./modules/post/multi/gather/dns_bruteforce.rb: sleep(2.0) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/multi/gather/dns_bruteforce.rb- i = 0 | |
./modules/post/multi/gather/dns_bruteforce.rb- end | |
./modules/post/multi/gather/dns_bruteforce.rb- end | |
./modules/post/multi/gather/dns_bruteforce.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/multi/gather/dns_bruteforce.rb- else | |
./modules/post/multi/gather/dns_bruteforce.rb- print_error("Name list file specified does not exist.") | |
./modules/post/multi/gather/dns_bruteforce.rb- end | |
-- | |
./modules/post/multi/gather/dns_bruteforce.rb: if not data.empty? | |
./modules/post/multi/gather/dns_bruteforce.rb- data.each do |e| | |
./modules/post/multi/gather/dns_bruteforce.rb- print_good("#{ns_opt} #{e[1]}") | |
./modules/post/multi/gather/dns_bruteforce.rb- report_host(:host=>e[1], :name=>ns_opt.strip) | |
-- | |
./modules/post/multi/gather/pidgin_cred.rb: if path.nil? or paths.empty? | |
./modules/post/multi/gather/pidgin_cred.rb- print_status("No users found with a .purple directory") | |
./modules/post/multi/gather/pidgin_cred.rb- return | |
./modules/post/multi/gather/pidgin_cred.rb- end | |
-- | |
./modules/post/multi/gather/thunderbird_creds.rb: if data_tbl.nil? or data_tbl.rows.empty? | |
./modules/post/multi/gather/thunderbird_creds.rb- print_status("No data parsed") | |
./modules/post/multi/gather/thunderbird_creds.rb- else | |
./modules/post/multi/gather/thunderbird_creds.rb- path = store_loot( | |
-- | |
./modules/post/multi/gather/firefox_creds.rb: if id.nil? or id.empty? | |
./modules/post/multi/gather/firefox_creds.rb- print_error("This session is not responding, perhaps the session is dead") | |
./modules/post/multi/gather/firefox_creds.rb- end | |
./modules/post/multi/gather/firefox_creds.rb- | |
-- | |
./modules/post/multi/gather/firefox_creds.rb: if paths.empty? | |
./modules/post/multi/gather/firefox_creds.rb- print_error("Firefox not found") | |
./modules/post/multi/gather/firefox_creds.rb- return | |
./modules/post/multi/gather/firefox_creds.rb- end | |
-- | |
./modules/post/multi/gather/firefox_creds.rb: if paths.empty? | |
./modules/post/multi/gather/firefox_creds.rb- return nil | |
./modules/post/multi/gather/firefox_creds.rb- else | |
./modules/post/multi/gather/firefox_creds.rb- return paths | |
-- | |
./modules/post/multi/gather/dns_srv_lookup.rb: sleep(0.05) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/multi/gather/dns_srv_lookup.rb- i = 0 | |
./modules/post/multi/gather/dns_srv_lookup.rb- end | |
./modules/post/multi/gather/dns_srv_lookup.rb- end | |
./modules/post/multi/gather/dns_srv_lookup.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/post/multi/gather/dns_srv_lookup.rb- | |
./modules/post/multi/gather/dns_srv_lookup.rb- end | |
./modules/post/multi/gather/dns_srv_lookup.rb- | |
-- | |
./modules/auxiliary/sniffer/psnuffle.rb: next if p.payload.empty? | |
./modules/auxiliary/sniffer/psnuffle.rb- @protos.each_key do |k| | |
./modules/auxiliary/sniffer/psnuffle.rb- @protos[k].parse(p) | |
./modules/auxiliary/sniffer/psnuffle.rb- end | |
-- | |
./modules/auxiliary/fuzzers/dns/dns_fuzzer.rb: if res && res.empty? | |
./modules/auxiliary/fuzzers/dns/dns_fuzzer.rb- print_error("#{msg} The remote server is not responding to DNS requests.") | |
./modules/auxiliary/fuzzers/dns/dns_fuzzer.rb- return false | |
./modules/auxiliary/fuzzers/dns/dns_fuzzer.rb- else | |
-- | |
./modules/auxiliary/server/browser_autopwn.rb: test << (apo[:vuln_test].empty? ? "is_vuln = true;" : apo[:vuln_test]) | |
./modules/auxiliary/server/browser_autopwn.rb- test << "} else { is_vuln = false; }\n" | |
./modules/auxiliary/server/browser_autopwn.rb- apo[:vuln_test] = test | |
./modules/auxiliary/server/browser_autopwn.rb- end | |
-- | |
./modules/auxiliary/server/browser_autopwn.rb: if s[:vuln_test].nil? or s[:vuln_test].empty? | |
./modules/auxiliary/server/browser_autopwn.rb- test = "is_vuln = true" | |
./modules/auxiliary/server/browser_autopwn.rb- else | |
./modules/auxiliary/server/browser_autopwn.rb- # get rid of newlines and escape quotes | |
-- | |
./modules/auxiliary/scanner/upnp/ssdp_msearch.rb: if info.first.nil? || info.first.empty? | |
./modules/auxiliary/scanner/upnp/ssdp_msearch.rb- print_status "#{addr}:#{port}: Got an incomplete response." | |
./modules/auxiliary/scanner/upnp/ssdp_msearch.rb- else | |
./modules/auxiliary/scanner/upnp/ssdp_msearch.rb- print_good "#{addr}:#{port}: Got an SSDP response from #{info.first}" | |
-- | |
./modules/auxiliary/scanner/smb/smb_login.rb: report_creds(user,pass) if @accepts_guest_logins.select{ |g_host, g_creds| g_host == ip and g_creds == [user,pass] }.empty? | |
./modules/auxiliary/scanner/smb/smb_login.rb- end | |
./modules/auxiliary/scanner/smb/smb_login.rb- end | |
./modules/auxiliary/scanner/smb/smb_login.rb- rescue ::Rex::ConnectionError | |
-- | |
./modules/auxiliary/scanner/smb/smb_enumshares.rb: if not shares.empty? | |
./modules/auxiliary/scanner/smb/smb_enumshares.rb- print_status("#{ip}:#{rport} #{shares.map{|x| "#{x[0]} - #{x[2]} (#{x[1]})" }.join(", ")}") | |
./modules/auxiliary/scanner/smb/smb_enumshares.rb- report_note( | |
./modules/auxiliary/scanner/smb/smb_enumshares.rb- :host => ip, | |
-- | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb: if datastore['MATCH'].empty? | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb- print_good("#{rhost}:#{rport} [SAP] Process Parameters: Entries extracted to loot") | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb- store_loot( | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb- "sap.getprocessparameters", | |
-- | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb: if not datastore['MATCH'].empty? and ele.elements["name"].text.match(/#{name_match}/) | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb- name = ele.elements["name"].text if not ele.elements["name"].nil? | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb- desc = ele.elements["description"].text if not ele.elements["description"].nil? | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb- desc = '' if desc.nil? | |
-- | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb: print_status("[SAP] Process Parameter Results for #{name_match}\n #{saptbl.to_s}") if not saptbl.to_s.empty? | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb- end | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb- | |
./modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb- return | |
-- | |
./modules/auxiliary/scanner/sap/sap_icm_urlscan.rb: if datastore['URLFILE'].empty? | |
./modules/auxiliary/scanner/sap/sap_icm_urlscan.rb- print_error("Please specify a URLFILE") | |
./modules/auxiliary/scanner/sap/sap_icm_urlscan.rb- return | |
./modules/auxiliary/scanner/sap/sap_icm_urlscan.rb- end | |
-- | |
./modules/auxiliary/scanner/sap/sap_service_discovery.rb: if ports.empty? | |
./modules/auxiliary/scanner/sap/sap_service_discovery.rb- print_error("Error: No valid ports specified") | |
./modules/auxiliary/scanner/sap/sap_service_discovery.rb- return | |
./modules/auxiliary/scanner/sap/sap_service_discovery.rb- end | |
-- | |
./modules/auxiliary/scanner/mssql/mssql_hashdump.rb: next if row[0].empty? or row[1].empty? | |
./modules/auxiliary/scanner/mssql/mssql_hashdump.rb- tbl << [row[0], row[1]] | |
./modules/auxiliary/scanner/mssql/mssql_hashdump.rb- print_good("#{rhost}:#{rport} - Saving #{hashtype} = #{row[0]}:#{row[1]}") | |
./modules/auxiliary/scanner/mssql/mssql_hashdump.rb- end | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if (str.empty? or str =~ /Null/) | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["System date"] = '-' | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- else | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not users.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["User accounts"] = users | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not network_information.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Network information"] = network_information | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not network_interfaces.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Network interfaces"] = network_interfaces | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not network_ip.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Network IP"] = [["Id","IP Address","Netmask","Broadcast"]] + network_ip | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if (metric.value.to_s.empty?) | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- metric.value = '-' | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- routing.push([dest.value, hop.value, mask.value, metric.value]) | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not routing.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Routing information"] = [["Destination","Next hop","Mask","Metric"]] + routing | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if (ladd.value.to_s.empty? or ladd.value.to_s =~ /noSuchInstance/) | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- ladd = "-" | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- else | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- ladd = ladd.value | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if (lport.value.to_s.empty? or lport.value.to_s =~ /noSuchInstance/) | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- lport = "-" | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- else | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- lport = lport.value | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if (radd.value.to_s.empty? or radd.value.to_s =~ /noSuchInstance/) | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- radd = "-" | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- else | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- radd = radd.value | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if (rport.value.to_s.empty? or rport.value.to_s =~ /noSuchInstance/) | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- rport = "-" | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- else | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- rport = rport.value | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not tcp.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["TCP connections and listening ports"] = [["Local address","Local port","Remote address","Remote port","State"]] + tcp | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not udp.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Listening UDP ports"] = [["Local address","Local port"]] + udp | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not network_services.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Network services"] = [["Index","Name"]] + network_services | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not share.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Share"] = share | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not iis.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["IIS server information"] = iis | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not storage_information.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- storage = [] | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- storage_information.each {|a,b,c,d,e,f| | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- s = {} | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if hrFSRemoteMountPoint.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- hrFSRemoteMountPoint = '-' | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- file_system["Remote mount point"] = hrFSRemoteMountPoint | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not file_system.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["File system information"] = file_system | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not device_information.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Device information"] = [["Id","Type","Status","Descr"]] + device_information | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not software_list.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Software components"] = [["Index","Name"]] + software_list | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if not process_interfaces.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- output_data["Software components"] = [["Id","Status","Name","Path","Parameters"]] + software_list | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb: if (v.nil? or v.empty? or v =~ /Null/) | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- v = '-' | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- end | |
./modules/auxiliary/scanner/snmp/snmp_enum.rb- | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_enumshares.rb: if not @shares.empty? | |
./modules/auxiliary/scanner/snmp/snmp_enumshares.rb- print_good("#{ip} #{@shares.map{|x| "\n\t#{x[0]} - #{x[2]} (#{x[1]})" }.join}") #" | |
./modules/auxiliary/scanner/snmp/snmp_enumshares.rb- report_note( | |
./modules/auxiliary/scanner/snmp/snmp_enumshares.rb- :host => ip, | |
-- | |
./modules/auxiliary/scanner/snmp/snmp_login.rb: print_status "#{ip}:#{datastore['RPORT']} - SNMP - Trying #{(pass.nil? || pass.empty?) ? "<BLANK>" : pass}..." if datastore['VERBOSE'] | |
./modules/auxiliary/scanner/snmp/snmp_login.rb- | |
./modules/auxiliary/scanner/snmp/snmp_login.rb- begin | |
./modules/auxiliary/scanner/snmp/snmp_login.rb- udp_sock.sendto(data1, ip, datastore['RPORT'].to_i, 0) | |
-- | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb: report_hashes(tbl.to_csv, this_service) unless tbl.rows.empty? | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb- | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb- #Recursively grab the schema for the entire DB server | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb- mysql_schema={} | |
-- | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb: next if row[0].empty? | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb- next if row[0]== "information_schema" | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb- next if row[0]== "mysql" | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb- next if row[0]== "performance_schema" | |
-- | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb: next if row[0].empty? | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb- tables<<row[0] | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb- end | |
./modules/auxiliary/scanner/mysql/mysql_hashdump.rb- end | |
-- | |
./modules/auxiliary/scanner/lotus/lotus_domino_version.rb: if currentversion.empty? then | |
./modules/auxiliary/scanner/lotus/lotus_domino_version.rb- currentversion << server1.strip | |
./modules/auxiliary/scanner/lotus/lotus_domino_version.rb- elsif server1.strip == currentversion.last then | |
./modules/auxiliary/scanner/lotus/lotus_domino_version.rb- '' | |
-- | |
./modules/auxiliary/scanner/lotus/lotus_domino_version.rb: if baseversion.empty? then | |
./modules/auxiliary/scanner/lotus/lotus_domino_version.rb- baseversion << server3.strip | |
./modules/auxiliary/scanner/lotus/lotus_domino_version.rb- elsif server3.strip == baseversion.last then | |
./modules/auxiliary/scanner/lotus/lotus_domino_version.rb- '' | |
-- | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb: if short_name.to_s.strip.empty? | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb- short_name = 'NULL' | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb- end | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb- | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb: if user_mail.to_s.strip.empty? | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb- user_mail = 'NULL' | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb- end | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb- | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb: if pass_hash.to_s.strip.empty? | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb- pass_hash = 'NULL' | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb- end | |
./modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb- | |
-- | |
./modules/auxiliary/scanner/sip/options.rb: if(not agent.empty?) | |
./modules/auxiliary/scanner/sip/options.rb- report_note( | |
./modules/auxiliary/scanner/sip/options.rb- :host => pkt[1], | |
./modules/auxiliary/scanner/sip/options.rb- :type => 'sip_useragent', | |
-- | |
./modules/auxiliary/scanner/sip/options_tcp.rb: if(not agent.empty?) | |
./modules/auxiliary/scanner/sip/options_tcp.rb- report_note( | |
./modules/auxiliary/scanner/sip/options_tcp.rb- :host => rhost, | |
./modules/auxiliary/scanner/sip/options_tcp.rb- :type => 'sip_useragent', | |
-- | |
./modules/auxiliary/scanner/tftp/ipswitch_whatsupgold_tftp.rb: if file_data.empty? | |
./modules/auxiliary/scanner/tftp/ipswitch_whatsupgold_tftp.rb- print_error("Error retrieving file #{file_name} from #{ip}") | |
./modules/auxiliary/scanner/tftp/ipswitch_whatsupgold_tftp.rb- return | |
./modules/auxiliary/scanner/tftp/ipswitch_whatsupgold_tftp.rb- end | |
-- | |
./modules/auxiliary/scanner/netbios/nbname.rb: if not aliases.empty? | |
./modules/auxiliary/scanner/netbios/nbname.rb- report_note( | |
./modules/auxiliary/scanner/netbios/nbname.rb- :host => ip, | |
./modules/auxiliary/scanner/netbios/nbname.rb- :proto => 'udp', | |
-- | |
./modules/auxiliary/scanner/netbios/nbname_probe.rb: if not aliases.empty? | |
./modules/auxiliary/scanner/netbios/nbname_probe.rb- report_note( | |
./modules/auxiliary/scanner/netbios/nbname_probe.rb- :host => ip, | |
./modules/auxiliary/scanner/netbios/nbname_probe.rb- :proto => 'udp', | |
-- | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb: if(@users_found.empty?) | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- print_status("#{target} No users or e-mail addresses found.") | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- else | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- vprint_status("#{target} - SMTP - Trying to get valid e-mail addresses") | |
-- | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb: if @users_found && !@users_found.empty? | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- print_good("#{target} Users found: #{@users_found.keys.sort.join(", ")}") | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- report_note( | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- :host => rhost, | |
-- | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb: if(@mails_found.nil? or @mails_found.empty?) | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- print_status("#{target} No e-mail addresses found.") | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- else | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- print_good("#{target} E-mail addresses found: #{@mails_found.keys.sort.join(", ")}") | |
-- | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb: unless (mail.nil? || mail.empty?) | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- @mails_found[mail.to_s] = :reported | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- end | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- end | |
-- | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb: unless (mail.nil? || mail.empty?) | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- @mails_found[mail.to_s] = :reported | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- end | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- end | |
-- | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb: unless (@result.nil? || @result.empty?) | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- mail = @result.scan(%r{\<(.*)(@)(.*)\>}) | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb: unless (mail.nil? || mail.empty?) | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- print_good "#{target} - Mail Found: #{mail}" | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- @mails_found[mail.to_s] = :reported | |
./modules/auxiliary/scanner/smtp/smtp_enum.rb- end | |
-- | |
./modules/auxiliary/scanner/rservices/rsh_login.rb: userpass_sleep_interval unless @@credentials_tried.empty? | |
./modules/auxiliary/scanner/rservices/rsh_login.rb- | |
./modules/auxiliary/scanner/rservices/rsh_login.rb- next if @@credentials_skipped[fq_user] | |
./modules/auxiliary/scanner/rservices/rsh_login.rb- next if @@credentials_tried[fq_user] == fu | |
-- | |
./modules/auxiliary/scanner/rservices/rlogin_login.rb: userpass_sleep_interval unless @@credentials_tried.empty? | |
./modules/auxiliary/scanner/rservices/rlogin_login.rb- | |
./modules/auxiliary/scanner/rservices/rlogin_login.rb- next if @@credentials_skipped[fq_user] | |
./modules/auxiliary/scanner/rservices/rlogin_login.rb- next if @@credentials_tried[fq_user] == fupw | |
-- | |
./modules/auxiliary/scanner/discovery/ipv6_neighbor_router_advertisement.rb: next if p.payload.empty? | |
./modules/auxiliary/scanner/discovery/ipv6_neighbor_router_advertisement.rb- next unless p.payload[0,1] == "\x87" # Neighbor solicitation | |
./modules/auxiliary/scanner/discovery/ipv6_neighbor_router_advertisement.rb- host_addr = PacketFu::AddrIpv6.new.read(p.payload[8,16]).to_x # Fixed position yay | |
./modules/auxiliary/scanner/discovery/ipv6_neighbor_router_advertisement.rb- # Make sure host portion is the same as what we requested | |
-- | |
./modules/auxiliary/scanner/discovery/ipv6_multicast_ping.rb: datastore['SMAC'].to_s.empty? ? ipv6_mac : datastore['SMAC'] | |
./modules/auxiliary/scanner/discovery/ipv6_multicast_ping.rb- end | |
./modules/auxiliary/scanner/discovery/ipv6_multicast_ping.rb- | |
./modules/auxiliary/scanner/discovery/ipv6_multicast_ping.rb- def run | |
-- | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb: if keys.empty? | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- print_error "#{ip}:#{rport} SSH - No keys found." | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- end | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- return validate_keys(keys) | |
-- | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb: next unless key.scan(/[\x00-\x08\x0b\x0c\x0e-\x1f\x80-\xff]/).empty? | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- # Add more tests to taste. | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- keepers << key | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- end | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb: if keepers.empty? | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- print_error "#{ip}:#{rport} SSH - No valid keys found" | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- end | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- return keepers | |
-- | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb: if cleartext_keys.empty? | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- print_error "#{ip}:#{rport} SSH - No valid cleartext keys found" | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- end | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- return cleartext_keys | |
-- | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb: elsif datastore['SSH_KEYFILE_B64'] && !datastore['SSH_KEYFILE_B64'].empty? | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- keys = read_keyfile(:keyfile_b64) | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- cleartext_keys = pull_cleartext_keys(keys) | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- msg = "#{ip}:#{rport} SSH - Trying #{cleartext_keys.size} cleartext key#{(cleartext_keys.size > 1) ? "s" : ""} per user (read from datastore)." | |
-- | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb: if datastore['KEY_FILE'] and !datastore['KEY_FILE'].empty? | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- keyfile = File.open(datastore['KEY_FILE'], "rb") {|f| f.read(f.stat.size)} | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- merge_me.merge!( | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- 'SSH_KEYFILE_B64' => [keyfile].pack("m*").gsub("\n",""), | |
-- | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb: return if datastore["SSH_KEYFILE_B64"].to_s.empty? | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- keyfile = datastore["SSH_KEYFILE_B64"].unpack("m*").first | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- keyfile = keyfile.strip + "\n" | |
./modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb- ktype_match = keyfile.match(/--BEGIN ([DR]SA) PRIVATE/) | |
-- | |
./modules/auxiliary/scanner/ip/ipidseq.rb: return if ipids.empty? | |
./modules/auxiliary/scanner/ip/ipidseq.rb- | |
./modules/auxiliary/scanner/ip/ipidseq.rb- print_status("#{ip}'s IPID sequence class: #{analyze(ipids)}") | |
./modules/auxiliary/scanner/ip/ipidseq.rb- | |
-- | |
./modules/auxiliary/scanner/finger/finger_users.rb: if(@users.empty?) | |
./modules/auxiliary/scanner/finger/finger_users.rb- print_status("#{ip}:#{rport} No users found.") | |
./modules/auxiliary/scanner/finger/finger_users.rb- else | |
./modules/auxiliary/scanner/finger/finger_users.rb- print_good("#{ip}:#{rport} Users found: #{@users.keys.sort.join(", ")}") | |
-- | |
./modules/auxiliary/scanner/finger/finger_users.rb: while !finger_user_common.empty? | |
./modules/auxiliary/scanner/finger/finger_users.rb- user_batch = [] | |
./modules/auxiliary/scanner/finger/finger_users.rb: while user_batch.size < 8 and !finger_user_common.empty? | |
./modules/auxiliary/scanner/finger/finger_users.rb- new_user = finger_user_common.shift | |
./modules/auxiliary/scanner/finger/finger_users.rb- next if @users.keys.include? new_user | |
./modules/auxiliary/scanner/finger/finger_users.rb- user_batch << new_user | |
-- | |
./modules/auxiliary/scanner/finger/finger_users.rb: next if line.strip.empty? | |
./modules/auxiliary/scanner/finger/finger_users.rb- | |
./modules/auxiliary/scanner/finger/finger_users.rb- # Ignore Cisco systems | |
./modules/auxiliary/scanner/finger/finger_users.rb- return if line =~ /Line.*User.*Host.*Location/ | |
-- | |
./modules/auxiliary/scanner/portscan/xmas.rb: if ports.empty? | |
./modules/auxiliary/scanner/portscan/xmas.rb- print_error("Error: No valid ports specified") | |
./modules/auxiliary/scanner/portscan/xmas.rb- return | |
./modules/auxiliary/scanner/portscan/xmas.rb- end | |
-- | |
./modules/auxiliary/scanner/portscan/tcp.rb: if ports.empty? | |
./modules/auxiliary/scanner/portscan/tcp.rb- print_error("Error: No valid ports specified") | |
./modules/auxiliary/scanner/portscan/tcp.rb- return | |
./modules/auxiliary/scanner/portscan/tcp.rb- end | |
-- | |
./modules/auxiliary/scanner/portscan/ack.rb: if ports.empty? | |
./modules/auxiliary/scanner/portscan/ack.rb- print_error("Error: No valid ports specified") | |
./modules/auxiliary/scanner/portscan/ack.rb- return | |
./modules/auxiliary/scanner/portscan/ack.rb- end | |
-- | |
./modules/auxiliary/scanner/portscan/ftpbounce.rb: if ports.empty? | |
./modules/auxiliary/scanner/portscan/ftpbounce.rb- print_error("Error: No valid ports specified") | |
./modules/auxiliary/scanner/portscan/ftpbounce.rb- return | |
./modules/auxiliary/scanner/portscan/ftpbounce.rb- end | |
-- | |
./modules/auxiliary/scanner/portscan/ftpbounce.rb: break if not r or r.empty? | |
./modules/auxiliary/scanner/portscan/ftpbounce.rb- end | |
./modules/auxiliary/scanner/portscan/ftpbounce.rb- | |
./modules/auxiliary/scanner/portscan/ftpbounce.rb- begin | |
-- | |
./modules/auxiliary/scanner/portscan/syn.rb: if ports.empty? | |
./modules/auxiliary/scanner/portscan/syn.rb- print_error("Error: No valid ports specified") | |
./modules/auxiliary/scanner/portscan/syn.rb- return | |
./modules/auxiliary/scanner/portscan/syn.rb- end | |
-- | |
./modules/auxiliary/scanner/oracle/oracle_login.rb: next if(h["scripts"].nil? || h["scripts"].empty?) | |
./modules/auxiliary/scanner/oracle/oracle_login.rb- h["scripts"].each do |id,output| | |
./modules/auxiliary/scanner/oracle/oracle_login.rb- next unless id == "oracle-brute" | |
./modules/auxiliary/scanner/oracle/oracle_login.rb- parse_script_output(h["addr"],p["portid"],output) | |
-- | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb: unless ver.empty? | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- if ver[0].include?('11g') | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- is_11g=true | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- print_status("Server is running 11g, using newer methods...") | |
-- | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb: unless results.empty? | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- results.each do |result| | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- row= result.split(/,/) | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- tbl << row | |
-- | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb: unless results.empty? | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- results.each do |result| | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- row= result.split(/,/) | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- row[2] = 'No' | |
-- | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb: unless schema.nil? or schema.empty? | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- report_other_data(schema,ip) | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- end | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- | |
-- | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb: unless databases.empty? | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- databases.each do |db| | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- query= "SELECT table_name FROM all_tables where owner=\'#{db}\'" | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- tables = prepare_exec(query) | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb: unless tables.empty? | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- schema[db]= tables | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- end | |
./modules/auxiliary/scanner/oracle/oracle_hashdump.rb- end | |
-- | |
./modules/auxiliary/scanner/oracle/sid_brute.rb: if datastore['SID'].nil? || datastore['SID'].empty? | |
./modules/auxiliary/scanner/oracle/sid_brute.rb- sids = extract_words(datastore['SID_FILE']).map {|s| s.to_s.strip.upcase}.uniq | |
./modules/auxiliary/scanner/oracle/sid_brute.rb- else | |
./modules/auxiliary/scanner/oracle/sid_brute.rb- sids = [datastore['SID'].to_s.strip.upcase] | |
-- | |
./modules/auxiliary/scanner/oracle/sid_brute.rb: userpass_sleep_interval unless (@@oracle_sid_fail | @@oracle_sid_success).empty? | |
./modules/auxiliary/scanner/oracle/sid_brute.rb- next if @@oracle_sid_fail.include?(s) || @@oracle_sid_success.include?(s) | |
./modules/auxiliary/scanner/oracle/sid_brute.rb- ret = block.call(s) | |
./modules/auxiliary/scanner/oracle/sid_brute.rb- case ret | |
-- | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb: if datastore['SID'].nil? || datastore['SID'].empty? | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- print_status "Using blank SID for authentication." | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- end | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- each_user_pass do |user, pass| | |
-- | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb: if pass.nil? || pass.empty? | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- print_status "Skipping blank password for #{user}" | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- else | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- do_login(user, pass, ver) | |
-- | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb: if datastore['SID'].nil? || datastore['SID'].empty? | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- nil | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- else | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- datastore['SID'] | |
-- | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb: :data => ((sid.nil? || sid.empty?) ? "*BLANK*" : sid), | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- :update => :unique_data | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- ) | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- end | |
-- | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb: if sid.nil? || sid.empty? | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- ora_info.merge! :user => user | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- else | |
./modules/auxiliary/scanner/oracle/isqlplus_login.rb- ora_info.merge! :user => "#{sid}/#{user}" | |
-- | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb: if sid.nil? || sid.empty? | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb- print_good("#{msg} Received ORA-01017 on a blank SID -- SIDs are not enforced upon login.") | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb- else | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb- print_good("#{msg} Received ORA-01017, probable correct SID '#{sid.strip}'") | |
-- | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb: :data => ((sid.nil? || sid.empty?) ? "*BLANK*" : sid), | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb- :update => :unique_data | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb- ) | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb- end | |
-- | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb: if datastore['SID'] and not datastore['SID'].empty? | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb- [datastore['SID']] | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb- elsif sid_file and ::File.readable? sid_file | |
./modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb- ::File.open(sid_file,"rb") {|f| f.read f.stat.size}.each_line.map {|x| x.strip.upcase}.uniq | |
-- | |
./modules/auxiliary/scanner/postgres/postgres_hashdump.rb: next if row[0].empty? or row[1].empty? | |
./modules/auxiliary/scanner/postgres/postgres_hashdump.rb- password = row[1] | |
./modules/auxiliary/scanner/postgres/postgres_hashdump.rb- password.slice!(0,3) | |
./modules/auxiliary/scanner/postgres/postgres_hashdump.rb- tbl << [row[0], password] | |
-- | |
./modules/auxiliary/scanner/http/yaws_traversal.rb: if datastore['FILEPATH'].nil? or datastore['FILEPATH'].empty? | |
./modules/auxiliary/scanner/http/yaws_traversal.rb- print_error("Please supply the name of the file you want to download") | |
./modules/auxiliary/scanner/http/yaws_traversal.rb- return | |
./modules/auxiliary/scanner/http/yaws_traversal.rb- end | |
-- | |
./modules/auxiliary/scanner/http/soap_xml.rb: if (res && !(res.body.empty?)) | |
./modules/auxiliary/scanner/http/soap_xml.rb- if (res.body =~ /method name is not valid/) | |
./modules/auxiliary/scanner/http/soap_xml.rb- print_status("Server rejected SOAPAction: #{v}#{n} with HTTP: #{res.code} #{res.message}.") | |
./modules/auxiliary/scanner/http/soap_xml.rb- elsif (res.message =~ /Cannot process the message because the content type/) | |
-- | |
./modules/auxiliary/scanner/http/squiz_matrix_user_enum.rb: if(@users_found.empty?) | |
./modules/auxiliary/scanner/http/squiz_matrix_user_enum.rb- print_status("#{target_url} - No users found.") | |
./modules/auxiliary/scanner/http/squiz_matrix_user_enum.rb- else | |
./modules/auxiliary/scanner/http/squiz_matrix_user_enum.rb- print_good("#{target_url} - Users found: #{@users_found.keys.sort.join(", ")}") | |
-- | |
./modules/auxiliary/scanner/http/tomcat_enum.rb: if(@users_found.empty?) | |
./modules/auxiliary/scanner/http/tomcat_enum.rb- print_status("#{target_url} - No users found.") | |
./modules/auxiliary/scanner/http/tomcat_enum.rb- else | |
./modules/auxiliary/scanner/http/tomcat_enum.rb- print_good("#{target_url} - Users found: #{@users_found.keys.sort.join(", ")}") | |
-- | |
./modules/auxiliary/scanner/http/ssl.rb: if caissuer.to_s.empty? | |
./modules/auxiliary/scanner/http/ssl.rb- print_good("Certificate contains no CA Issuers extension... possible self signed certificate") | |
./modules/auxiliary/scanner/http/ssl.rb- else | |
./modules/auxiliary/scanner/http/ssl.rb- print_status("#{ip}:#{rport} " +caissuer.to_s[0..-2]) | |
-- | |
./modules/auxiliary/scanner/http/dir_scanner.rb: while(not queue.empty?) | |
./modules/auxiliary/scanner/http/dir_scanner.rb- t = [] | |
./modules/auxiliary/scanner/http/dir_scanner.rb- 1.upto(nt) do | |
./modules/auxiliary/scanner/http/dir_scanner.rb- t << framework.threads.spawn("Module(#{self.refname})-#{rhost}", false, queue.shift) do |testf| | |
-- | |
./modules/auxiliary/scanner/http/crawler.rb: if page.url.query and not page.url.query.empty? | |
./modules/auxiliary/scanner/http/crawler.rb- form[:method] = 'GET' | |
./modules/auxiliary/scanner/http/crawler.rb- form[:path] = page.url.path | |
./modules/auxiliary/scanner/http/crawler.rb- vars = page.url.query.split('&').map{|x| x.split("=", 2) } | |
-- | |
./modules/auxiliary/scanner/http/crawler.rb: if f['action'] and not f['action'].strip.empty? | |
./modules/auxiliary/scanner/http/crawler.rb- action = f['action'] | |
./modules/auxiliary/scanner/http/crawler.rb- | |
./modules/auxiliary/scanner/http/crawler.rb- # Prepend relative URLs with the current directory | |
-- | |
./modules/auxiliary/scanner/http/web_vulndb.rb: while(not queue.empty?) | |
./modules/auxiliary/scanner/http/web_vulndb.rb- t = [] | |
./modules/auxiliary/scanner/http/web_vulndb.rb- 1.upto(nt) do | |
./modules/auxiliary/scanner/http/web_vulndb.rb- t << framework.threads.spawn("Module(#{self.refname})-#{rhost}", false, queue.shift) do |testf| | |
-- | |
./modules/auxiliary/scanner/http/web_vulndb.rb: if testmesg.empty? or usecode | |
./modules/auxiliary/scanner/http/web_vulndb.rb- if(not res or ((res.code.to_i == ecode) or (emesg and res.body.index(emesg)))) | |
./modules/auxiliary/scanner/http/web_vulndb.rb- if dm == false | |
./modules/auxiliary/scanner/http/web_vulndb.rb- print_status("NOT Found #{wmap_base_url}#{tpath}#{testfvuln} #{res.code.to_i}") | |
-- | |
./modules/auxiliary/scanner/http/owa_login.rb: # apparently you cannot do each_user_pass.empty? or even inspect() it | |
./modules/auxiliary/scanner/http/owa_login.rb- isempty = true | |
./modules/auxiliary/scanner/http/owa_login.rb- each_user_pass do |user| | |
./modules/auxiliary/scanner/http/owa_login.rb- isempty = false | |
-- | |
./modules/auxiliary/scanner/http/files_dir.rb: while(not queue.empty?) | |
./modules/auxiliary/scanner/http/files_dir.rb- t = [] | |
./modules/auxiliary/scanner/http/files_dir.rb- 1.upto(nt) do | |
./modules/auxiliary/scanner/http/files_dir.rb- t << framework.threads.spawn("Module(#{self.refname})-#{rhost}", false, queue.shift) do |testf| | |
-- | |
./modules/auxiliary/scanner/http/apache_userdir_enum.rb: if(@users_found.empty?) | |
./modules/auxiliary/scanner/http/apache_userdir_enum.rb- print_status("#{target_url} - No users found.") | |
./modules/auxiliary/scanner/http/apache_userdir_enum.rb- else | |
./modules/auxiliary/scanner/http/apache_userdir_enum.rb- print_good("#{target_url} - Users found: #{@users_found.keys.sort.join(", ")}") | |
-- | |
./modules/auxiliary/scanner/http/blind_sql_query.rb: if !datastore['QUERY'] or datastore['QUERY'].empty? | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- datastore['QUERY'] = nil | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- gvars = nil | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- else | |
-- | |
./modules/auxiliary/scanner/http/blind_sql_query.rb: if !datastore['DATA'] or datastore['DATA'].empty? | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- datastore['DATA'] = nil | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- pvars = nil | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- else | |
-- | |
./modules/auxiliary/scanner/http/blind_sql_query.rb: if !datastore['COOKIE'] or datastore['COOKIE'].empty? | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- datastore['COOKIE'] = nil | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- cvars = nil | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- else | |
-- | |
./modules/auxiliary/scanner/http/blind_sql_query.rb: if normalres.body.empty? | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- print_error("No body to obtain signature") | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- return | |
./modules/auxiliary/scanner/http/blind_sql_query.rb- else | |
-- | |
./modules/auxiliary/scanner/http/error_sql_injection.rb: if not datastore['QUERY'].empty? | |
./modules/auxiliary/scanner/http/error_sql_injection.rb- qvars = queryparse(datastore['QUERY']) #Now its a Hash | |
./modules/auxiliary/scanner/http/error_sql_injection.rb- else | |
./modules/auxiliary/scanner/http/error_sql_injection.rb- return | |
-- | |
./modules/auxiliary/scanner/http/error_sql_injection.rb: if not datastore['DATA'].empty? | |
./modules/auxiliary/scanner/http/error_sql_injection.rb- qvars = queryparse(datastore['DATA']) #Now its a Hash | |
./modules/auxiliary/scanner/http/error_sql_injection.rb- else | |
./modules/auxiliary/scanner/http/error_sql_injection.rb- return | |
-- | |
./modules/auxiliary/scanner/http/wordpress_login_enum.rb: unless (@users_found.empty?) | |
./modules/auxiliary/scanner/http/wordpress_login_enum.rb- print_good("#{target_url} - WordPress Enumeration - Found #{uf = @users_found.keys.size} valid #{uf == 1 ? "user" : "users"}") | |
./modules/auxiliary/scanner/http/wordpress_login_enum.rb- end | |
./modules/auxiliary/scanner/http/wordpress_login_enum.rb- end | |
-- | |
./modules/auxiliary/analyze/jtr_linux.rb: unless myloots.nil? or myloots.empty? | |
./modules/auxiliary/analyze/jtr_linux.rb- myloots.each do |myloot| | |
./modules/auxiliary/analyze/jtr_linux.rb- begin | |
./modules/auxiliary/analyze/jtr_linux.rb- usf = File.open(myloot.path, "rb") | |
-- | |
./modules/auxiliary/analyze/jtr_linux.rb: unless schemas.nil? or schemas.empty? | |
./modules/auxiliary/analyze/jtr_linux.rb- schemas.each do |anote| | |
./modules/auxiliary/analyze/jtr_linux.rb- anote.data.each do |key,value| | |
./modules/auxiliary/analyze/jtr_linux.rb- seed << key | |
-- | |
./modules/auxiliary/analyze/jtr_linux.rb: unless instances.nil? or instances.empty? | |
./modules/auxiliary/analyze/jtr_linux.rb- instances.each do |anote| | |
./modules/auxiliary/analyze/jtr_linux.rb- seed << anote.data['InstanceName'] | |
./modules/auxiliary/analyze/jtr_linux.rb- end | |
-- | |
./modules/auxiliary/analyze/jtr_linux.rb: unless seed.empty? | |
./modules/auxiliary/analyze/jtr_linux.rb- seed.flatten! | |
./modules/auxiliary/analyze/jtr_linux.rb- seed.uniq! | |
./modules/auxiliary/analyze/jtr_linux.rb- end | |
-- | |
./modules/auxiliary/analyze/postgres_md5_crack.rb: unless schemas.nil? or schemas.empty? | |
./modules/auxiliary/analyze/postgres_md5_crack.rb- schemas.each do |anote| | |
./modules/auxiliary/analyze/postgres_md5_crack.rb- anote.data.each do |key,value| | |
./modules/auxiliary/analyze/postgres_md5_crack.rb- seed << key | |
-- | |
./modules/auxiliary/analyze/postgres_md5_crack.rb: unless instances.nil? or instances.empty? | |
./modules/auxiliary/analyze/postgres_md5_crack.rb- instances.each do |anote| | |
./modules/auxiliary/analyze/postgres_md5_crack.rb- seed << anote.data['InstanceName'] | |
./modules/auxiliary/analyze/postgres_md5_crack.rb- end | |
-- | |
./modules/auxiliary/analyze/postgres_md5_crack.rb: unless seed.empty? | |
./modules/auxiliary/analyze/postgres_md5_crack.rb- seed.flatten! | |
./modules/auxiliary/analyze/postgres_md5_crack.rb- seed.uniq! | |
./modules/auxiliary/analyze/postgres_md5_crack.rb- | |
-- | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb: unless schemas.nil? or schemas.empty? | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb- schemas.each do |anote| | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb- anote.data.each do |key,value| | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb- seed << key | |
-- | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb: unless instances.nil? or instances.empty? | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb- instances.each do |anote| | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb- seed << anote.data['InstanceName'] | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb- end | |
-- | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb: unless myloots.nil? or myloots.empty? | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb- myloots.each do |myloot| | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb- begin | |
./modules/auxiliary/analyze/jtr_oracle_fast.rb- oracle_array = CSV.read(myloot.path).drop(1) | |
-- | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb: unless myloots.nil? or myloots.empty? | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb- myloots.each do |myloot| | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb- begin | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb- mssql_array = CSV.read(myloot.path).drop(1) | |
-- | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb: unless schemas.nil? or schemas.empty? | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb- schemas.each do |anote| | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb- anote.data.each do |key,value| | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb- seed << key | |
-- | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb: unless instances.nil? or instances.empty? | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb- instances.each do |anote| | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb- seed << anote.data['InstanceName'] | |
./modules/auxiliary/analyze/jtr_mysql_fast.rb- end | |
-- | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb: unless schemas.nil? or schemas.empty? | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb- schemas.each do |anote| | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb- anote.data.each do |key,value| | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb- seed << key | |
-- | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb: unless instances.nil? or instances.empty? | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb- instances.each do |anote| | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb- seed << anote.data['InstanceName'] | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb- end | |
-- | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb: unless myloots.nil? or myloots.empty? | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb- myloots.each do |myloot| | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb- begin | |
./modules/auxiliary/analyze/jtr_mssql_fast.rb- mssql_array = CSV.read(myloot.path).drop(1) | |
-- | |
./modules/auxiliary/admin/motorola/wr850g_cred.rb: if response.nil? or response.empty? | |
./modules/auxiliary/admin/motorola/wr850g_cred.rb- print_status("No response from server") | |
./modules/auxiliary/admin/motorola/wr850g_cred.rb- return | |
./modules/auxiliary/admin/motorola/wr850g_cred.rb- end | |
-- | |
./modules/auxiliary/admin/tftp/tftp_transfer_util.rb: if not fdata.empty? | |
./modules/auxiliary/admin/tftp/tftp_transfer_util.rb- fdata_decorated = "DATA:#{datastore['FILEDATA']}" | |
./modules/auxiliary/admin/tftp/tftp_transfer_util.rb- elsif ::File.readable? fname | |
./modules/auxiliary/admin/tftp/tftp_transfer_util.rb- fname | |
-- | |
./modules/auxiliary/admin/tftp/tftp_transfer_util.rb: if data and not data.empty? | |
./modules/auxiliary/admin/tftp/tftp_transfer_util.rb- unless framework.db.active | |
./modules/auxiliary/admin/tftp/tftp_transfer_util.rb- print_status "No database connected, so not actually saving the data:" | |
./modules/auxiliary/admin/tftp/tftp_transfer_util.rb- print_line data | |
-- | |
./modules/auxiliary/admin/edirectory/edirectory_edirutil.rb: if datastore['PARAM'].nil? or datastore['PARAM'].empty? | |
./modules/auxiliary/admin/edirectory/edirectory_edirutil.rb- print_error("You must supply a parameter for action: #{action.name}") | |
./modules/auxiliary/admin/edirectory/edirectory_edirutil.rb- return | |
./modules/auxiliary/admin/edirectory/edirectory_edirutil.rb- else | |
-- | |
./modules/auxiliary/admin/oracle/oraenum.rb: ) if not vparm["utl_file_dir"]#.empty? | |
./modules/auxiliary/admin/oracle/oraenum.rb- | |
./modules/auxiliary/admin/oracle/oraenum.rb- print_status("\tAudit log is saved at #{vparm["audit_file_dest"]}") | |
./modules/auxiliary/admin/oracle/oraenum.rb- report_note( | |
-- | |
./modules/auxiliary/admin/oracle/oraenum.rb: ) if not vparm["audit_file_dest"]#.empty? | |
./modules/auxiliary/admin/oracle/oraenum.rb- | |
./modules/auxiliary/admin/oracle/oraenum.rb- end | |
./modules/auxiliary/admin/oracle/oraenum.rb- | |
-- | |
./modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb: find_files(files) unless files.empty? | |
./modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb- end | |
./modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb- end | |
./modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb- | |
./modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb: if not @files_found.empty? | |
./modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb- print_good("File(s) found:") | |
./modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb- | |
./modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb- @files_found.each do |f| | |
-- | |
./modules/auxiliary/admin/http/tomcat_utf8_traversal.rb: find_files(files) unless files.empty? | |
./modules/auxiliary/admin/http/tomcat_utf8_traversal.rb- end | |
./modules/auxiliary/admin/http/tomcat_utf8_traversal.rb- end | |
./modules/auxiliary/admin/http/tomcat_utf8_traversal.rb- | |
./modules/auxiliary/admin/http/tomcat_utf8_traversal.rb: if not @files_found.empty? | |
./modules/auxiliary/admin/http/tomcat_utf8_traversal.rb- print_good("File(s) found:") | |
./modules/auxiliary/admin/http/tomcat_utf8_traversal.rb- | |
./modules/auxiliary/admin/http/tomcat_utf8_traversal.rb- @files_found.each do |f| | |
-- | |
./modules/auxiliary/spoof/wifi/dnspwn.rb: self.wifi.filter = @filter if not @filter.empty? | |
./modules/auxiliary/spoof/wifi/dnspwn.rb- each_packet do |pkt| | |
./modules/auxiliary/spoof/wifi/dnspwn.rb- d3 = pkt.dot3 | |
./modules/auxiliary/spoof/wifi/dnspwn.rb- | |
-- | |
./modules/auxiliary/gather/dns_enum.rb: if(datastore['ENUM_RVL'] and datastore['IPRANGE'] and not datastore['IPRANGE'].empty?) | |
./modules/auxiliary/gather/dns_enum.rb- reverselkp(datastore['IPRANGE'],datastore['NS']) | |
./modules/auxiliary/gather/dns_enum.rb- end | |
./modules/auxiliary/gather/dns_enum.rb- end | |
-- | |
./modules/auxiliary/gather/shodan_search.rb: if results[page].empty? | |
./modules/auxiliary/gather/shodan_search.rb- print_error("No Results Found!") | |
./modules/auxiliary/gather/shodan_search.rb- return | |
./modules/auxiliary/gather/shodan_search.rb- end | |
-- | |
./modules/auxiliary/crawler/msfcrawler.rb: cinipath = (inipath.nil? or inipath.empty?) ? '/' : inipath | |
./modules/auxiliary/crawler/msfcrawler.rb- | |
./modules/auxiliary/crawler/msfcrawler.rb- inireq = { | |
./modules/auxiliary/crawler/msfcrawler.rb- 'rhost' => ctarget, | |
-- | |
./modules/auxiliary/crawler/msfcrawler.rb: if !File.extname(hashreq['uri']).empty? and datastore['DontCrawl'].include? File.extname(hashreq['uri']) | |
./modules/auxiliary/crawler/msfcrawler.rb- vprint_status "URI not crawled #{hashreq['uri']}" | |
./modules/auxiliary/crawler/msfcrawler.rb- else | |
./modules/auxiliary/crawler/msfcrawler.rb- prx = nil | |
-- | |
./modules/auxiliary/crawler/msfcrawler.rb: # sleep(0.01) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./modules/auxiliary/crawler/msfcrawler.rb- # i = 0 | |
./modules/auxiliary/crawler/msfcrawler.rb- #end | |
./modules/auxiliary/crawler/msfcrawler.rb- #### | |
-- | |
./modules/auxiliary/crawler/msfcrawler.rb: if reqopts['query'] and !reqopts['query'].empty? | |
./modules/auxiliary/crawler/msfcrawler.rb- print_status ">>> [Q] #{reqopts['query']}" | |
./modules/auxiliary/crawler/msfcrawler.rb- end | |
./modules/auxiliary/crawler/msfcrawler.rb- | |
-- | |
./modules/auxiliary/crawler/msfcrawler.rb: if (uri.host.nil? or uri.host.empty?) | |
./modules/auxiliary/crawler/msfcrawler.rb- uritargethost = self.ctarget | |
./modules/auxiliary/crawler/msfcrawler.rb- uritargetssl = self.cssl | |
./modules/auxiliary/crawler/msfcrawler.rb- end | |
-- | |
./modules/auxiliary/crawler/msfcrawler.rb: if (uri.path.nil? or uri.path.empty?) | |
./modules/auxiliary/crawler/msfcrawler.rb- uritargetpath = "/" | |
./modules/auxiliary/crawler/msfcrawler.rb- end | |
./modules/auxiliary/crawler/msfcrawler.rb- | |
-- | |
./modules/auxiliary/crawler/msfcrawler.rb: if !newp.to_s.empty? | |
./modules/auxiliary/crawler/msfcrawler.rb- newp = File.join(oldp.dirname,newp) | |
./modules/auxiliary/crawler/msfcrawler.rb- end | |
./modules/auxiliary/crawler/msfcrawler.rb- end | |
-- | |
./modules/payloads/stagers/php/bind_tcp.rb: if (datastore['LPORT'] and not datastore['LPORT'].empty?) | |
./modules/payloads/stagers/php/bind_tcp.rb- lport = datastore['LPORT'] | |
./modules/payloads/stagers/php/bind_tcp.rb- else | |
./modules/payloads/stagers/php/bind_tcp.rb- lport = '4444' | |
-- | |
./modules/payloads/stagers/php/reverse_tcp.rb: if (datastore['LHOST'] and not datastore['LHOST'].empty?) | |
./modules/payloads/stagers/php/reverse_tcp.rb- lhost = datastore['LHOST'] | |
./modules/payloads/stagers/php/reverse_tcp.rb- lport = datastore['LPORT'] | |
./modules/payloads/stagers/php/reverse_tcp.rb- else | |
-- | |
./modules/payloads/singles/linux/mipsbe/shell_reverse_tcp.rb: if( !datastore['LHOST'] or datastore['LHOST'].empty? ) | |
./modules/payloads/singles/linux/mipsbe/shell_reverse_tcp.rb- return super | |
./modules/payloads/singles/linux/mipsbe/shell_reverse_tcp.rb- end | |
./modules/payloads/singles/linux/mipsbe/shell_reverse_tcp.rb- | |
-- | |
./modules/payloads/singles/linux/mipsle/shell_reverse_tcp.rb: if( !datastore['LHOST'] or datastore['LHOST'].empty? ) | |
./modules/payloads/singles/linux/mipsle/shell_reverse_tcp.rb- return super | |
./modules/payloads/singles/linux/mipsle/shell_reverse_tcp.rb- end | |
./modules/payloads/singles/linux/mipsle/shell_reverse_tcp.rb- | |
-- | |
./modules/payloads/singles/java/jsp_shell_reverse_tcp.rb: if( !datastore['LHOST'] or datastore['LHOST'].empty? ) | |
./modules/payloads/singles/java/jsp_shell_reverse_tcp.rb- return super | |
./modules/payloads/singles/java/jsp_shell_reverse_tcp.rb- end | |
./modules/payloads/singles/java/jsp_shell_reverse_tcp.rb- | |
-- | |
./modules/payloads/singles/php/reverse_php.rb: if (!datastore['LHOST'] or datastore['LHOST'].empty?) | |
./modules/payloads/singles/php/reverse_php.rb- # datastore is empty on msfconsole startup | |
./modules/payloads/singles/php/reverse_php.rb- ipaddr = 0x7f000001 | |
./modules/payloads/singles/php/reverse_php.rb- port = 4444 | |
-- | |
./modules/exploits/windows/license/calicclnt_getconfig.rb: next if req.empty? | |
./modules/exploits/windows/license/calicclnt_getconfig.rb- | |
./modules/exploits/windows/license/calicclnt_getconfig.rb- if (req =~ /OS\<([^\>]+)/) | |
./modules/exploits/windows/license/calicclnt_getconfig.rb- print_status("Target reports OS: #{$1}") | |
-- | |
./modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb: if res[:errors] and not res[:errors].empty? | |
./modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb- errstr = "" | |
./modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb- res[:errors].each do |err| | |
./modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb- errstr << err | |
-- | |
./modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb: if not res[:rows] or res[:rows].empty? | |
./modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb- return nil | |
./modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb- end | |
./modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb- | |
-- | |
./modules/exploits/windows/http/osb_uname_jlist.rb: if not datastore['CMD'].empty? | |
./modules/exploits/windows/http/osb_uname_jlist.rb- print_status("Executing command '#{datastore['CMD']}'") | |
./modules/exploits/windows/http/osb_uname_jlist.rb- execute_command(datastore['CMD']) | |
./modules/exploits/windows/http/osb_uname_jlist.rb- return | |
-- | |
./modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb: if not datastore['CMD'].empty? | |
./modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb- print_status("Executing command '#{datastore['CMD']}'") | |
./modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb- execute_command(datastore['CMD']) | |
./modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb- return | |
-- | |
./modules/exploits/windows/antivirus/ams_hndlrsvc.rb: if not datastore['CMD'].empty? | |
./modules/exploits/windows/antivirus/ams_hndlrsvc.rb- print_status("Executing command '#{datastore['CMD']}'") | |
./modules/exploits/windows/antivirus/ams_hndlrsvc.rb- execute_command(datastore['CMD']) | |
./modules/exploits/windows/antivirus/ams_hndlrsvc.rb- return | |
-- | |
./modules/exploits/windows/antivirus/ams_xfr.rb: if not datastore['CMD'].empty? | |
./modules/exploits/windows/antivirus/ams_xfr.rb- print_status("Executing command '#{datastore['CMD']}'") | |
./modules/exploits/windows/antivirus/ams_xfr.rb- execute_command(datastore['CMD']) | |
./modules/exploits/windows/antivirus/ams_xfr.rb- return | |
-- | |
./modules/exploits/multi/wyse/hagent_untrusted_hsdata.rb: next if req.empty? | |
./modules/exploits/multi/wyse/hagent_untrusted_hsdata.rb- print_status("HTTP Request: #{req.split("\n")[0].strip}") | |
./modules/exploits/multi/wyse/hagent_untrusted_hsdata.rb- | |
./modules/exploits/multi/wyse/hagent_untrusted_hsdata.rb- case req | |
-- | |
./modules/exploits/multi/http/familycms_less_exec.rb: if not result.strip.empty? | |
./modules/exploits/multi/http/familycms_less_exec.rb- print_status("Result of the command:\n#{result}") | |
./modules/exploits/multi/http/familycms_less_exec.rb- end | |
./modules/exploits/multi/http/familycms_less_exec.rb- end | |
-- | |
./modules/exploits/multi/http/struts_code_exec.rb: if not datastore['CMD'].empty? | |
./modules/exploits/multi/http/struts_code_exec.rb- print_status("Executing user supplied command") | |
./modules/exploits/multi/http/struts_code_exec.rb- execute_command(datastore['CMD']) | |
./modules/exploits/multi/http/struts_code_exec.rb- return | |
-- | |
./modules/exploits/unix/webapp/php_include.rb: if(uri and ! uri.empty?) | |
./modules/exploits/unix/webapp/php_include.rb- uri.gsub!(/\?.*/, "") | |
./modules/exploits/unix/webapp/php_include.rb- print_status("Checking uri #{uri}") | |
./modules/exploits/unix/webapp/php_include.rb- response = send_request_raw({ 'uri' => uri}) | |
-- | |
./modules/exploits/unix/webapp/php_include.rb: if (datastore['PHPURI'] and not datastore['PHPURI'].empty? and (datastore['POSTDATA'].nil? or datastore['POSTDATA'].empty?) ) | |
./modules/exploits/unix/webapp/php_include.rb- uris << datastore['PHPURI'].strip.gsub('XXpathXX', Rex::Text.to_hex(php_include_url, "%")) | |
./modules/exploits/unix/webapp/php_include.rb- http_method = "GET" | |
./modules/exploits/unix/webapp/php_include.rb: elsif (datastore['POSTDATA'] and not datastore['POSTDATA'].empty?) | |
./modules/exploits/unix/webapp/php_include.rb- uris << datastore['PHPURI'] | |
./modules/exploits/unix/webapp/php_include.rb- postdata = datastore['POSTDATA'].strip.gsub('XXpathXX', Rex::Text.to_hex(php_include_url, "%")) | |
./modules/exploits/unix/webapp/php_include.rb- http_method = "POST" | |
-- | |
./modules/exploits/unix/webapp/php_include.rb: next if line.empty? | |
./modules/exploits/unix/webapp/php_include.rb- next if line =~ /^#/ | |
./modules/exploits/unix/webapp/php_include.rb- next if line !~ /^\// | |
./modules/exploits/unix/webapp/php_include.rb- | |
-- | |
./test/modules/auxiliary/test/capture.rb: next if p.payload.empty? | |
./test/modules/auxiliary/test/capture.rb- if (p.payload =~ /GET\s+([^\s]+)\s+HTTP/smi) | |
./test/modules/auxiliary/test/capture.rb- url = $1 | |
./test/modules/auxiliary/test/capture.rb- print_status("GET #{url}") | |
-- | |
./scripts/meterpreter/hashdump.rb: if(enchash.empty?) | |
./scripts/meterpreter/hashdump.rb- case pass | |
./scripts/meterpreter/hashdump.rb- when @sam_lmpass | |
./scripts/meterpreter/hashdump.rb- return @sam_empty_lm | |
-- | |
./scripts/meterpreter/autoroute.rb: return false if(ip.nil? || ip.strip.empty?) | |
./scripts/meterpreter/autoroute.rb- begin | |
./scripts/meterpreter/autoroute.rb- rw = Rex::Socket::RangeWalker.new(ip.strip) | |
./scripts/meterpreter/autoroute.rb- (rw.valid? && rw.length == 1) ? true : false | |
-- | |
./scripts/meterpreter/winenum.rb: sleep(0.05) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/winenum.rb- threadnum = 0 | |
./scripts/meterpreter/winenum.rb- end | |
./scripts/meterpreter/winenum.rb- end | |
-- | |
./scripts/meterpreter/winenum.rb: sleep(0.10) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/winenum.rb- i = 0 | |
./scripts/meterpreter/winenum.rb- end | |
./scripts/meterpreter/winenum.rb- end | |
-- | |
./scripts/meterpreter/winenum.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/winenum.rb-end | |
./scripts/meterpreter/winenum.rb-#------------------------------------------------------------------------------- | |
./scripts/meterpreter/winenum.rb-# Function for running a list of WMIC commands stored in a array, returns string | |
-- | |
./scripts/meterpreter/winenum.rb: sleep(0.01) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/winenum.rb- i = 0 | |
./scripts/meterpreter/winenum.rb- end | |
./scripts/meterpreter/winenum.rb- end | |
./scripts/meterpreter/winenum.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/winenum.rb- | |
./scripts/meterpreter/winenum.rb- rescue ::Exception => e | |
./scripts/meterpreter/winenum.rb- print_status("Error running WMIC commands: #{e.class} #{e}") | |
-- | |
./scripts/meterpreter/enum_chrome.rb:@output_format << "json" if @output_format.empty? | |
./scripts/meterpreter/enum_chrome.rb-if @output_format.include?("json") | |
./scripts/meterpreter/enum_chrome.rb- begin | |
./scripts/meterpreter/enum_chrome.rb- require 'json' | |
-- | |
./scripts/meterpreter/enum_chrome.rb: if @output_format.empty? | |
./scripts/meterpreter/enum_chrome.rb- print_status("Falling back to raw text output.") | |
./scripts/meterpreter/enum_chrome.rb- @output_format << "text" | |
./scripts/meterpreter/enum_chrome.rb- end | |
-- | |
./scripts/meterpreter/arp_scanner.rb: sleep(0.05) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/arp_scanner.rb- i = 0 | |
./scripts/meterpreter/arp_scanner.rb- end | |
./scripts/meterpreter/arp_scanner.rb- end | |
./scripts/meterpreter/arp_scanner.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/arp_scanner.rb- return found | |
./scripts/meterpreter/arp_scanner.rb-end | |
./scripts/meterpreter/arp_scanner.rb- | |
-- | |
./scripts/meterpreter/winbf.rb: if lockout.empty? | |
./scripts/meterpreter/winbf.rb- print_status "\tNo account lockout threshold configured" | |
./scripts/meterpreter/winbf.rb- else | |
./scripts/meterpreter/winbf.rb- print_status "\tWARNING Lockout threshold configured, if #{lockout} attempts in #{failcount} minutes account will be locked" | |
-- | |
./scripts/meterpreter/get_application_list.rb: sleep(0.05) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/get_application_list.rb- threadnum = 0 | |
./scripts/meterpreter/get_application_list.rb- end | |
./scripts/meterpreter/get_application_list.rb- end | |
-- | |
./scripts/meterpreter/netenum.rb: sleep(0.05) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/netenum.rb- i = 0 | |
./scripts/meterpreter/netenum.rb- end | |
./scripts/meterpreter/netenum.rb- end | |
./scripts/meterpreter/netenum.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/netenum.rb- end | |
./scripts/meterpreter/netenum.rb- rescue ::Exception => e | |
./scripts/meterpreter/netenum.rb- print_status("The following Error was encountered: #{e.class} #{e}") | |
-- | |
./scripts/meterpreter/netenum.rb: sleep(0.05) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/netenum.rb- i = 0 | |
./scripts/meterpreter/netenum.rb- end | |
./scripts/meterpreter/netenum.rb- end | |
./scripts/meterpreter/netenum.rb: a.delete_if {|x| not x.alive?} while not a.empty? | |
./scripts/meterpreter/netenum.rb- end | |
./scripts/meterpreter/netenum.rb- rescue ::Exception => e | |
./scripts/meterpreter/netenum.rb- print_status("The following Error was encountered: #{e.class} #{e}") | |
-- | |
./scripts/shell/spawn_meterpreter.rb: if (not ret.empty?) | |
./scripts/shell/spawn_meterpreter.rb- aborted = true | |
./scripts/shell/spawn_meterpreter.rb- end | |
./scripts/shell/spawn_meterpreter.rb- end | |
-- | |
./scripts/shell/spawn_meterpreter.rb: print_error('Output: ' + ret.inspect) if ret and not ret.empty? | |
./scripts/shell/spawn_meterpreter.rb- break | |
./scripts/shell/spawn_meterpreter.rb- end | |
./scripts/shell/spawn_meterpreter.rb- | |
-- | |
./msfrop:if opts.empty? and (ARGV.empty? or ARGV.nil?) | |
./msfrop- puts "no options" | |
./msfrop- puts opt | |
./msfrop- exit(1) | |
-- | |
./external/source/unixasm/objdumptoc.rb: unless filename.empty? | |
./external/source/unixasm/objdumptoc.rb- self.file = File.new(filename) | |
./external/source/unixasm/objdumptoc.rb- else | |
./external/source/unixasm/objdumptoc.rb- self.file = STDIN | |
-- | |
./tools/verify_datastore.rb:unless undeclared_datastores.empty? | |
./tools/verify_datastore.rb- puts "[-] %-60s : fail (undeclared)" % [infile] | |
./tools/verify_datastore.rb- puts "[-] The following datastore elements are undeclared" if verbose | |
./tools/verify_datastore.rb- undeclared_datastores.uniq.sort.each {|opt| puts " \e[31m#{opt}\e[0m" } | |
-- | |
./tools/verify_datastore.rb:unless unused_datastores.empty? | |
./tools/verify_datastore.rb- puts "[*] %-60s : warn (unused)" % [infile] | |
./tools/verify_datastore.rb- puts "[*] The following datastore elements are unused" if verbose | |
./tools/verify_datastore.rb- unused_datastores.uniq.sort.each {|opt| puts " \e[33m#{opt}\e[0m" } | |
-- | |
./tools/verify_datastore.rb:if undeclared_datastores.empty? && unused_datastores.empty? | |
./tools/verify_datastore.rb- puts "[+] %-60s : okay" % [infile] | |
./tools/verify_datastore.rb-end | |
./tools/verify_datastore.rb- | |
-- | |
./tools/metasm_shell.rb: if not ed.reloc.empty? | |
./tools/metasm_shell.rb- puts 'W: encoded string has unresolved relocations: ' + ed.reloc.map { |o, r| r.target.inspect }.join(', ') | |
./tools/metasm_shell.rb- end | |
./tools/metasm_shell.rb- ed.fill | |
-- | |
./tools/metasm_shell.rb: next if l.strip.empty? | |
./tools/metasm_shell.rb- | |
./tools/metasm_shell.rb- begin | |
./tools/metasm_shell.rb- l = l.encode | |
-- | |
./msfbinscan:if mode.empty? | |
./msfbinscan- $stderr.puts "A mode must be selected" | |
./msfbinscan- $stderr.puts opt | |
./msfbinscan- exit(1) | |
-- | |
./msfbinscan: bin = Metasm::AutoExe.decode_file(file) if not file.empty? | |
./msfbinscan- | |
./msfbinscan- if bin.kind_of?(Metasm::PE) | |
./msfbinscan- case mode | |
-- | |
./lib/readline_compatible.rb: def self.empty?() | |
./lib/readline_compatible.rb- RbReadline.history_length == 0 | |
./lib/readline_compatible.rb- end | |
./lib/readline_compatible.rb- | |
-- | |
./lib/rbmysql/protocol.rb: return nil if lcb.empty? | |
./lib/rbmysql/protocol.rb- case v = lcb.slice!(0) | |
./lib/rbmysql/protocol.rb- when ?\xfb | |
./lib/rbmysql/protocol.rb- return nil | |
-- | |
./lib/rbmysql/protocol.rb: if host.nil? or host.empty? or host == "localhost" | |
./lib/rbmysql/protocol.rb- socket = ENV["MYSQL_UNIX_PORT"] || MYSQL_UNIX_PORT | |
./lib/rbmysql/protocol.rb- @sock = UNIXSocket.new socket | |
./lib/rbmysql/protocol.rb- else | |
-- | |
./lib/rbmysql/protocol.rb: return "" if plain.nil? or plain.empty? | |
./lib/rbmysql/protocol.rb- hash_stage1 = Digest::SHA1.digest plain | |
./lib/rbmysql/protocol.rb- hash_stage2 = Digest::SHA1.digest hash_stage1 | |
./lib/rbmysql/protocol.rb- return hash_stage1.unpack("C*").zip(Digest::SHA1.digest(@scramble_buff+hash_stage2).unpack("C*")).map{|a,b| a^b}.pack("C*") | |
-- | |
./lib/rbmysql/compat.rb: return nil if @fields.empty? | |
./lib/rbmysql/compat.rb- res = Result.allocate | |
./lib/rbmysql/compat.rb- res.instance_variable_set :@mysql, @mysql | |
./lib/rbmysql/compat.rb- res.instance_variable_set :@fields, @fields | |
-- | |
./lib/metasm/samples/rubstop.rb: stack.shift until stack.empty? or stack.first == 0 # argv | |
./lib/metasm/samples/rubstop.rb- stack.shift | |
./lib/metasm/samples/rubstop.rb: stack.shift until stack.empty? or stack.first == 0 # envp | |
./lib/metasm/samples/rubstop.rb- stack.shift | |
./lib/metasm/samples/rubstop.rb: stack.shift until stack.empty? or stack.shift == 3 # find PHDR ptr in auxv | |
./lib/metasm/samples/rubstop.rb- if phdr = stack.shift | |
./lib/metasm/samples/rubstop.rb- phdr &= 0xffff_f000 | |
./lib/metasm/samples/rubstop.rb- loadsyms phdr, phdr.to_s(16) | |
-- | |
./lib/metasm/samples/lindebug.rb: elsif near.empty? | |
./lib/metasm/samples/lindebug.rb- log "unknown value #{ex.inspect}" | |
./lib/metasm/samples/lindebug.rb- return {} | |
./lib/metasm/samples/lindebug.rb- else | |
-- | |
./lib/metasm/samples/lindebug.rb: if s.empty? | |
./lib/metasm/samples/lindebug.rb- log "unknown symbol #{sym}" | |
./lib/metasm/samples/lindebug.rb- else | |
./lib/metasm/samples/lindebug.rb- s.sort.each { |s_| log "#{'%08x' % s_} #{@rs.symbols_len[s_].to_s.ljust 6} #{@rs.findsymbol(s_)}" } | |
-- | |
./lib/metasm/samples/dbghelp.rb: if ARGV.empty? | |
./lib/metasm/samples/dbghelp.rb- # display list of running processes if no target found | |
./lib/metasm/samples/dbghelp.rb- puts Metasm::WinOS.list_processes.sort_by { |pr_| pr_.pid } | |
./lib/metasm/samples/dbghelp.rb- abort 'target needed' | |
-- | |
./lib/metasm/samples/factorize-headers-peimports.rb:exit if funcnames.empty? | |
./lib/metasm/samples/factorize-headers-peimports.rb- | |
./lib/metasm/samples/factorize-headers-peimports.rb-src = <<EOS + opts[:hdrs].to_a.map { |h| "#include <#{h}>\n" }.join | |
./lib/metasm/samples/factorize-headers-peimports.rb-#ifdef DDK | |
-- | |
./lib/metasm/samples/metasm-shell.rb: if not ed.reloc.empty? | |
./lib/metasm/samples/metasm-shell.rb- puts 'W: encoded string has unresolved relocations: ' + ed.reloc.map { |o, r| r.target.inspect }.join(', ') | |
./lib/metasm/samples/metasm-shell.rb- end | |
./lib/metasm/samples/metasm-shell.rb- ed.fill | |
-- | |
./lib/metasm/samples/metasm-shell.rb: next if data.strip.empty? | |
./lib/metasm/samples/metasm-shell.rb- data = data.encode | |
./lib/metasm/samples/metasm-shell.rb- puts '"' + data.unpack('C*').map { |c| '\\x%02x' % c }.join + '"' | |
./lib/metasm/samples/metasm-shell.rb- rescue Metasm::Exception => e | |
-- | |
./lib/metasm/samples/compilation-steps.rb:src = ARGV.empty? ? <<EOS : ARGF.read | |
./lib/metasm/samples/compilation-steps.rb-void foo(int); | |
./lib/metasm/samples/compilation-steps.rb-void bla() | |
./lib/metasm/samples/compilation-steps.rb-{ | |
-- | |
./lib/metasm/samples/install_win_env.rb: data << ';' if not data.empty? | |
./lib/metasm/samples/install_win_env.rb- data << metasmpath << 0 | |
./lib/metasm/samples/install_win_env.rb- ret = d.regsetvalueexa(key, 'RUBYLIB', 0, d::REG_EXPAND_SZ, data, data.length) | |
./lib/metasm/samples/install_win_env.rb- if ret == 0 | |
-- | |
./lib/metasm/samples/dasmnavig.rb: if not @posstack.empty? | |
./lib/metasm/samples/dasmnavig.rb- @posh, @pos, @x, @y = @posstack.pop | |
./lib/metasm/samples/dasmnavig.rb- end | |
./lib/metasm/samples/dasmnavig.rb- when ?\n | |
-- | |
./lib/metasm/samples/dasmnavig.rb: return if label.empty? or not newy = @text.index(@text.find { |l| l[0, label.length] == label }) or newy == @pos+@y | |
./lib/metasm/samples/dasmnavig.rb- @posstack << [@posh, @pos, @x, @y] | |
./lib/metasm/samples/dasmnavig.rb- view(0, newy) | |
./lib/metasm/samples/dasmnavig.rb- when :up | |
-- | |
./lib/metasm/samples/dynamic_ruby.rb: if tb.statements.empty? | |
./lib/metasm/samples/dynamic_ruby.rb- cd = test | |
./lib/metasm/samples/dynamic_ruby.rb- else | |
./lib/metasm/samples/dynamic_ruby.rb- tb.statements << test | |
-- | |
./lib/metasm/samples/dynamic_ruby.rb: if body_int.statements.empty? | |
./lib/metasm/samples/dynamic_ruby.rb- if body_other | |
./lib/metasm/samples/dynamic_ruby.rb- body_other.belse = default | |
./lib/metasm/samples/dynamic_ruby.rb- body_other_head | |
-- | |
./lib/metasm/samples/dynamic_ruby.rb: abort 'need <class#method>' if ARGV.empty? | |
./lib/metasm/samples/dynamic_ruby.rb- require 'pp' | |
./lib/metasm/samples/dynamic_ruby.rb- puts '#if 0' | |
./lib/metasm/samples/dynamic_ruby.rb- ARGV.each { |av| | |
-- | |
./lib/metasm/samples/dasm-plugins/selfmodify.rb: if @data.empty? | |
./lib/metasm/samples/dasm-plugins/selfmodify.rb- s, e = @dasm.get_section_at(addr) | |
./lib/metasm/samples/dasm-plugins/selfmodify.rb- return if not s | |
./lib/metasm/samples/dasm-plugins/selfmodify.rb- return s.read(len) | |
-- | |
./lib/metasm/samples/dasm-plugins/selfmodify.rb: if @data.empty? | |
./lib/metasm/samples/dasm-plugins/selfmodify.rb- @base = @startaddr = addr | |
./lib/metasm/samples/dasm-plugins/selfmodify.rb- @data << newdata | |
./lib/metasm/samples/dasm-plugins/selfmodify.rb- return | |
-- | |
./lib/metasm/samples/dasm-plugins/c_constants.rb: dict.keys.join(' | ') if not dict.empty? | |
./lib/metasm/samples/dasm-plugins/c_constants.rb- end | |
./lib/metasm/samples/dasm-plugins/c_constants.rb-end | |
./lib/metasm/samples/dasm-plugins/c_constants.rb- | |
-- | |
./lib/metasm/samples/dasm-plugins/dasm_all.rb: if not @function[addr] and b.from_subfuncret.to_a.empty? and b.from_normal.to_a.empty? | |
./lib/metasm/samples/dasm-plugins/dasm_all.rb- l = auto_label_at(addr, 'sub_orph') | |
./lib/metasm/samples/dasm-plugins/dasm_all.rb- puts "dasm_all: found orphan function #{l}" | |
./lib/metasm/samples/dasm-plugins/dasm_all.rb- @function[addrstart+off] = DecodedFunction.new | |
-- | |
./lib/metasm/samples/dasm-plugins/bookmark.rb: if s = gui.curview.instance_variable_get('@selected_boxes') and not s.empty? | |
./lib/metasm/samples/dasm-plugins/bookmark.rb- al = s.map { |b| b[:line_address] } | |
./lib/metasm/samples/dasm-plugins/bookmark.rb- elsif fa = find_function_start(gui.curaddr) | |
./lib/metasm/samples/dasm-plugins/bookmark.rb- al = function_blocks(fa).map { |k, v| block_at(k).list.map { |di| di.address } } | |
-- | |
./lib/metasm/samples/dasm-plugins/deobfuscate.rb: if next_ops.empty? | |
./lib/metasm/samples/dasm-plugins/deobfuscate.rb- next_hash[:pattern] ||= [] | |
./lib/metasm/samples/dasm-plugins/deobfuscate.rb- next_hash[:pattern] << pattern | |
./lib/metasm/samples/dasm-plugins/deobfuscate.rb- else | |
-- | |
./lib/metasm/samples/dasm-plugins/deobfuscate.rb: dasm.replace_instrs(unused.first.address, unused.first.address, []) if not unused.empty? | |
./lib/metasm/samples/dasm-plugins/deobfuscate.rb- | |
./lib/metasm/samples/dasm-plugins/deobfuscate.rb- # patch the dasm graph | |
./lib/metasm/samples/dasm-plugins/deobfuscate.rb- if dasm.replace_instrs(lastdi.address, di.address, newinstrs) | |
-- | |
./lib/metasm/samples/dasm-plugins/dump_text.rb: if s.empty? | |
./lib/metasm/samples/dasm-plugins/dump_text.rb- gui.messagebox('select boxes (ctrl+click)') | |
./lib/metasm/samples/dasm-plugins/dump_text.rb- next | |
./lib/metasm/samples/dasm-plugins/dump_text.rb- end | |
-- | |
./lib/metasm/samples/elf_listexports.rb: puts line if not line.empty? | |
./lib/metasm/samples/elf_listexports.rb-} | |
-- | |
./lib/metasm/samples/wintrace.rb: if ARGV.empty? | |
./lib/metasm/samples/wintrace.rb- # display list of running processes if no target found | |
./lib/metasm/samples/wintrace.rb- puts Metasm::WinOS.list_processes.sort_by { |pr_| pr_.pid } | |
./lib/metasm/samples/wintrace.rb- abort 'target needed' | |
-- | |
./lib/metasm/samples/pe_listexports.rb: puts line if not line.empty? | |
./lib/metasm/samples/pe_listexports.rb-} | |
-- | |
./lib/metasm/samples/bindiff.rb: s[:leaves] += 1 if g[aa].empty? | |
./lib/metasm/samples/bindiff.rb- dasm.decoded[aa].block.each_to_otherfunc(dasm) { s[:ext_calls] += 1 } | |
./lib/metasm/samples/bindiff.rb- end | |
./lib/metasm/samples/bindiff.rb- | |
-- | |
./lib/metasm/samples/bindiff.rb:w1.dasm_widget.focus_addr ep.first if w1 and not ep.empty? | |
./lib/metasm/samples/bindiff.rb:w2.dasm_widget.focus_addr ep.first if w2 and not ep.empty? | |
./lib/metasm/samples/bindiff.rb- | |
./lib/metasm/samples/bindiff.rb-opts[:plugin].to_a.each { |p| dasm1.load_plugin(p) if dasm1 ; dasm2.load_plugin(p) if dasm2 } | |
./lib/metasm/samples/bindiff.rb-opts[:hookstr].to_a.each { |f| eval f } | |
-- | |
./lib/metasm/samples/factorize-headers-elfimports.rb:opts[:path] ||= [ARGV.shift] if not ARGV.empty? | |
./lib/metasm/samples/factorize-headers-elfimports.rb- | |
./lib/metasm/samples/factorize-headers-elfimports.rb-case exe | |
./lib/metasm/samples/factorize-headers-elfimports.rb-when PE | |
-- | |
./lib/metasm/samples/gdbclient.rb: readregs if @regs_cache.empty? | |
./lib/metasm/samples/gdbclient.rb- @regs_cache | |
./lib/metasm/samples/gdbclient.rb- end | |
./lib/metasm/samples/gdbclient.rb- | |
-- | |
./lib/metasm/samples/gdbclient.rb: if not @regs_cache.empty? and @regs_dirty | |
./lib/metasm/samples/gdbclient.rb- send_regs | |
./lib/metasm/samples/gdbclient.rb- end | |
./lib/metasm/samples/gdbclient.rb- end | |
-- | |
./lib/metasm/samples/gdbclient.rb: return if @regs_cache.empty? | |
./lib/metasm/samples/gdbclient.rb- regs = @regs_cache.values_at(*GDBREGS) | |
./lib/metasm/samples/gdbclient.rb- @regs_dirty = false | |
./lib/metasm/samples/gdbclient.rb- gdb_msg('G', hex(regs.pack('L*'))) | |
-- | |
./lib/metasm/samples/generate_libsigs.rb: targets = Dir['*.a'] + Dir['*.lib'] if targets.empty? | |
./lib/metasm/samples/generate_libsigs.rb- targets.each { |t| create_sig(AutoExe.decode_file(t)) } | |
./lib/metasm/samples/generate_libsigs.rb-end | |
-- | |
./lib/metasm/samples/disassemble.rb: if ARGV.empty? | |
./lib/metasm/samples/disassemble.rb- exe.send(method) | |
./lib/metasm/samples/disassemble.rb- else | |
./lib/metasm/samples/disassemble.rb- exe.send(method, *ARGV.map { |addr| makeint[addr] }) | |
-- | |
./lib/metasm/metasm/encode.rb: if elem.all? { |ed| ed.kind_of? EncodedData and ed.reloc.empty? } | |
./lib/metasm/metasm/encode.rb- elem = [elem.sort_by { |ed| ed.length }.first] | |
./lib/metasm/metasm/encode.rb- end | |
./lib/metasm/metasm/encode.rb- elem.each { |e| | |
-- | |
./lib/metasm/metasm/encode.rb: if extlist.empty? | |
./lib/metasm/metasm/encode.rb- (target_bounds[idx] ||= []) << target.bind(binding).reduce | |
./lib/metasm/metasm/encode.rb- else | |
./lib/metasm/metasm/encode.rb- rec_checkminmax[idx, target, binding.merge(extlist.last => minbinding[extlist.last]), extlist[0...-1]] | |
-- | |
./lib/metasm/metasm/encode.rb: raise EncodeError, "cannot find candidate in #{elem.inspect}, immediate too big #{wantsize.inspect} #{target_bounds.inspect}" if acceptable.empty? | |
./lib/metasm/metasm/encode.rb- | |
./lib/metasm/metasm/encode.rb- # keep the shortest | |
./lib/metasm/metasm/encode.rb- acceptable.sort_by { |edata| edata.virtsize }.first | |
-- | |
./lib/metasm/metasm/encode.rb: if data.reloc.empty? and not data.data.empty? # avoid useless iterations | |
./lib/metasm/metasm/encode.rb- nr = (targetsize-edata.virtsize) / data.length - 1 | |
./lib/metasm/metasm/encode.rb- if nr > 0 | |
./lib/metasm/metasm/encode.rb- dat = data.data.ljust(data.virtsize, 0.chr) | |
-- | |
./lib/metasm/metasm/encode.rb: raise EncodeError, "no matching opcode found for #{i}#{errmsg}" if oplist.empty? | |
./lib/metasm/metasm/encode.rb- oplist.each { |ed| ed.reloc.each_value { |v| v.backtrace = i.backtrace } } | |
./lib/metasm/metasm/encode.rb- oplist | |
./lib/metasm/metasm/encode.rb- end | |
-- | |
./lib/metasm/metasm/compile_c.rb: raise "compile_c name conflict: #{cf.inspect}" if not cf.empty? | |
./lib/metasm/metasm/compile_c.rb- @exeformat.unique_labels_cache.update @auto_label_list | |
./lib/metasm/metasm/compile_c.rb- | |
./lib/metasm/metasm/compile_c.rb- @parser.toplevel.precompile(self) | |
-- | |
./lib/metasm/metasm/compile_c.rb: if not funcs.empty? | |
./lib/metasm/metasm/compile_c.rb- @exeformat.compile_setsection @source, '.text' | |
./lib/metasm/metasm/compile_c.rb- funcs.each { |func| c_function(func) } | |
./lib/metasm/metasm/compile_c.rb- c_program_epilog | |
-- | |
./lib/metasm/metasm/compile_c.rb: if not rwdata.empty? | |
./lib/metasm/metasm/compile_c.rb- @exeformat.compile_setsection @source, '.data' | |
./lib/metasm/metasm/compile_c.rb- rwdata.each { |data| align = c_idata(data, align) } | |
./lib/metasm/metasm/compile_c.rb- end | |
-- | |
./lib/metasm/metasm/compile_c.rb: if not rodata.empty? | |
./lib/metasm/metasm/compile_c.rb- @exeformat.compile_setsection @source, '.rodata' | |
./lib/metasm/metasm/compile_c.rb- rodata.each { |data| align = c_idata(data, align) } | |
./lib/metasm/metasm/compile_c.rb- end | |
-- | |
./lib/metasm/metasm/compile_c.rb: if not udata.empty? | |
./lib/metasm/metasm/compile_c.rb- @exeformat.compile_setsection @source, '.bss' | |
./lib/metasm/metasm/compile_c.rb- udata.each { |data| align = c_udata(data, align) } | |
./lib/metasm/metasm/compile_c.rb- end | |
-- | |
./lib/metasm/metasm/compile_c.rb: @source.last << ':' if not @source.last.empty? | |
./lib/metasm/metasm/compile_c.rb- return 0 | |
./lib/metasm/metasm/compile_c.rb- end | |
./lib/metasm/metasm/compile_c.rb- | |
-- | |
./lib/metasm/metasm/compile_c.rb: @source.last << ':' if not @source.last.empty? | |
./lib/metasm/metasm/compile_c.rb- # could .align here, but if there is our label name just before, it should have been .aligned too.. | |
./lib/metasm/metasm/compile_c.rb- raise "unknown struct initializer #{value.inspect}" if not value.kind_of? ::Array | |
./lib/metasm/metasm/compile_c.rb- sz = 0 | |
-- | |
./lib/metasm/metasm/compile_c.rb: @source.last << ':' if not @source.last.empty? | |
./lib/metasm/metasm/compile_c.rb- len = sizeof(nil, type) | |
./lib/metasm/metasm/compile_c.rb- raise "unknown union initializer #{value.inspect}" if not value.kind_of? ::Array | |
./lib/metasm/metasm/compile_c.rb- idx = value.rindex(value.compact.last) || 0 | |
-- | |
./lib/metasm/metasm/compile_c.rb: @source.last << ':' if not @source.last.empty? | |
./lib/metasm/metasm/compile_c.rb- len = type.length || value.length | |
./lib/metasm/metasm/compile_c.rb- value.each { |v| | |
./lib/metasm/metasm/compile_c.rb- @source << '' | |
-- | |
./lib/metasm/metasm/compile_c.rb: scope.statements << self if scope and not @statements.empty? | |
./lib/metasm/metasm/compile_c.rb- end | |
./lib/metasm/metasm/compile_c.rb- | |
./lib/metasm/metasm/compile_c.rb- # removes unused labels, and in-place goto (goto toto; toto:) | |
-- | |
./lib/metasm/metasm/compile_c.rb: @statements.delete s if step == 2 and s.statements.empty? | |
./lib/metasm/metasm/compile_c.rb- when CExpression; walk[s] if step == 1 | |
./lib/metasm/metasm/compile_c.rb- when Label | |
./lib/metasm/metasm/compile_c.rb- case step | |
-- | |
./lib/metasm/metasm/compile_c.rb: @rexpr.map! { |e_| (types.empty? ? e_ : CExpression.new(nil, nil, e_, types.shift)).precompile_inner(compiler, scope) } | |
./lib/metasm/metasm/compile_c.rb- CExpression.precompile_type(compiler, scope, self) | |
./lib/metasm/metasm/compile_c.rb- self | |
./lib/metasm/metasm/compile_c.rb- end | |
-- | |
./lib/metasm/metasm/mips/decode.rb: wantregs = Reg.i_to_s.values if wantregs.empty? | |
./lib/metasm/metasm/mips/decode.rb- wantregs.map { |r| r.to_sym }.each(&bt_val) | |
./lib/metasm/metasm/mips/decode.rb- | |
./lib/metasm/metasm/mips/decode.rb- puts "update_func_bind: #{Expression[faddr]} has sp -> #{b[:$sp]}" if not Expression[b[:$sp], :-, :$sp].reduce.kind_of?(::Integer) if $VERBOSE | |
-- | |
./lib/metasm/metasm/mips/render.rb: if not i.args.empty? | |
./lib/metasm/metasm/mips/render.rb- r << ' ' | |
./lib/metasm/metasm/mips/render.rb- if (a = i.args.first).kind_of? Expression and a.op == :- and a.lexpr.kind_of? String and a.rexpr.kind_of? String and opcode_list_byname[i.opname].first.props[:setip] | |
./lib/metasm/metasm/mips/render.rb- # jmp foo is stored as jmp foo - bar ; bar: | |
-- | |
./lib/metasm/metasm/decompile.rb: var.initializer = data.map { |v| C::CExpression[v, C::BaseType.new(:int)] } unless (data - [0]).empty? | |
./lib/metasm/metasm/decompile.rb- if (tsz == 1 or tsz == 2) and eos = data.index(0) and (0..3).all? { |i| data[i] >= 0x20 and data[i] < 0x7f } # printable str | |
./lib/metasm/metasm/decompile.rb- # XXX 0x80 with ruby1.9... | |
./lib/metasm/metasm/decompile.rb- var.initializer = C::CExpression[data[0, eos].pack('C*'), C::Pointer.new(ptype)] rescue nil | |
-- | |
./lib/metasm/metasm/decompile.rb: while not bts.empty? | |
./lib/metasm/metasm/decompile.rb- if bts.last.kind_of? C::Label; ary.unshift bts.pop | |
./lib/metasm/metasm/decompile.rb- elsif bes.last.kind_of? C::Label; ary.unshift bes.pop | |
./lib/metasm/metasm/decompile.rb- elsif bts.last.to_s == bes.last.to_s; ary.unshift bes.pop ; bts.pop | |
-- | |
./lib/metasm/metasm/decompile.rb: func_top = true if g.from_optim[l].to_a.empty? | |
./lib/metasm/metasm/decompile.rb- break | |
./lib/metasm/metasm/decompile.rb- end | |
./lib/metasm/metasm/decompile.rb- end | |
-- | |
./lib/metasm/metasm/decompile.rb: if false and dom_ro.empty? and dom_wo.empty? and dom.length == 2 and # TODO | |
./lib/metasm/metasm/decompile.rb- arg.has_attribute('out') and not arg.has_attribute('in') | |
./lib/metasm/metasm/decompile.rb- # *(int32*)&var_10 = &var_4; | |
./lib/metasm/metasm/decompile.rb- # set_pointed_value(*(int32*)&var_10); => writeonly var_4, may start a new domain | |
-- | |
./lib/metasm/metasm/decompile.rb: } if not future_array.empty? | |
./lib/metasm/metasm/decompile.rb- | |
./lib/metasm/metasm/decompile.rb- # if (x != 0) => if (x) | |
./lib/metasm/metasm/decompile.rb- walk(scope) { |st| | |
-- | |
./lib/metasm/metasm/main.rb: base = (base << '_uuid' << ('%08x' % base.object_id)).freeze if base.empty? or @unique_labels_cache[base] | |
./lib/metasm/metasm/main.rb- @unique_labels_cache[base] = true | |
./lib/metasm/metasm/main.rb- base | |
./lib/metasm/metasm/main.rb- end | |
-- | |
./lib/metasm/metasm/main.rb: raise "share_ns #{(other.unique_labels_cache.keys & @unique_labels_cache.keys).inspect}" if !(other.unique_labels_cache.keys & @unique_labels_cache.keys).empty? | |
./lib/metasm/metasm/main.rb- @unique_labels_cache.update other.unique_labels_cache | |
./lib/metasm/metasm/main.rb- other.unique_labels_cache = @unique_labels_cache | |
./lib/metasm/metasm/main.rb- self | |
-- | |
./lib/metasm/metasm/main.rb: fill if not other.data.empty? | |
./lib/metasm/metasm/main.rb: other.reloc.each { |k, v| @reloc[k + @virtsize] = v } if not other.reloc.empty? | |
./lib/metasm/metasm/main.rb: if not other.export.empty? | |
./lib/metasm/metasm/main.rb- other.export.each { |k, v| | |
./lib/metasm/metasm/main.rb- if @export[k] and @export[k] != v + @virtsize | |
./lib/metasm/metasm/main.rb- cf = (other.export.keys & @export.keys).find_all { |k_| other.export[k_] != @export[k_] - @virtsize } | |
-- | |
./lib/metasm/metasm/main.rb: if @data.empty?; @data = other.data.dup | |
./lib/metasm/metasm/main.rb- elsif not @data.kind_of?(String); @data = @data.to_str << other.data | |
./lib/metasm/metasm/main.rb- else @data << other.data | |
./lib/metasm/metasm/main.rb- end | |
-- | |
./lib/metasm/metasm/main.rb: if @data.empty?; @data = other.dup | |
./lib/metasm/metasm/main.rb- elsif not @data.kind_of?(String); @data = @data.to_str << other | |
./lib/metasm/metasm/main.rb- else @data << other | |
./lib/metasm/metasm/main.rb- end | |
-- | |
./lib/metasm/metasm/main.rb: elsif not val.data.empty? # patch end of real data | |
./lib/metasm/metasm/main.rb- @data << ([0].pack('C')*(from-@data.length)) if @data.length < from | |
./lib/metasm/metasm/main.rb- @data[from..-1] = val.data | |
./lib/metasm/metasm/main.rb- else # patch end of real data with fully virtual | |
-- | |
./lib/metasm/metasm/parse.rb: break if i.args.empty? and opcode_list_byname[ntok.raw] and opcode_list_byname[i.opname].find { |op| op.args.empty? } | |
./lib/metasm/metasm/parse.rb- break if not arg = parse_argument(lexer) | |
./lib/metasm/metasm/parse.rb- i.args << arg | |
./lib/metasm/metasm/parse.rb- lexer.skip_space | |
-- | |
./lib/metasm/metasm/parse.rb: t.backtrace += macro.backtrace[-2..-1] if not macro.backtrace.empty? | |
./lib/metasm/metasm/parse.rb- if labels[t.raw] | |
./lib/metasm/metasm/parse.rb- t.raw = labels[t.raw] | |
./lib/metasm/metasm/parse.rb- t | |
-- | |
./lib/metasm/metasm/parse.rb: puts "Undefined forward reference to anonymous labels #{@locallabels_fwd.keys.inspect}" if $VERBOSE and not @locallabels_fwd.empty? | |
./lib/metasm/metasm/parse.rb- | |
./lib/metasm/metasm/parse.rb- self | |
./lib/metasm/metasm/parse.rb- end | |
-- | |
./lib/metasm/metasm/parse.rb: until opstack.empty? or OP_PRIO[op.value][opstack.last] | |
./lib/metasm/metasm/parse.rb- stack << new(opstack.pop, stack.pop, stack.pop) | |
./lib/metasm/metasm/parse.rb- end | |
./lib/metasm/metasm/parse.rb- | |
-- | |
./lib/metasm/metasm/parse.rb: until opstack.empty? | |
./lib/metasm/metasm/parse.rb- stack << new(opstack.pop, stack.pop, stack.pop) | |
./lib/metasm/metasm/parse.rb- end | |
./lib/metasm/metasm/parse.rb- | |
-- | |
./lib/metasm/metasm/sh4/decode.rb: if not op.empty? | |
./lib/metasm/metasm/sh4/decode.rb- di.opcode = op.first | |
./lib/metasm/metasm/sh4/decode.rb- di | |
./lib/metasm/metasm/sh4/decode.rb- end | |
-- | |
./lib/metasm/metasm/parse_c.rb: when :quoted; body << (body.empty? ? tok.value : tok.value.inspect) # asm "pop\nret" VS asm add al, 'z' | |
./lib/metasm/metasm/parse_c.rb- when :string | |
./lib/metasm/metasm/parse_c.rb- body << \ | |
./lib/metasm/metasm/parse_c.rb- case tok.raw | |
-- | |
./lib/metasm/metasm/parse_c.rb: raise v1, 'pack stack empty' if @pragma_pack_stack.empty? | |
./lib/metasm/metasm/parse_c.rb- @pragma_pack = @pragma_pack_stack.pop | |
./lib/metasm/metasm/parse_c.rb- @pragma_pack = v2.raw.to_i if v2 and v2.raw # #pragma pack(pop, 4) => pop stack, but use 4 as pack value (imho) | |
./lib/metasm/metasm/parse_c.rb- raise v2, 'bad pack value' if @pragma_pack == 0 | |
-- | |
./lib/metasm/metasm/parse_c.rb: @unreadtoks.empty? and @lexer.eos? | |
./lib/metasm/metasm/parse_c.rb- end | |
./lib/metasm/metasm/parse_c.rb- | |
./lib/metasm/metasm/parse_c.rb- def unreadtok(tok) | |
-- | |
./lib/metasm/metasm/parse_c.rb: raise tok || parser, 'bad type name' if not qualifier.empty? or var.storage | |
./lib/metasm/metasm/parse_c.rb- nil | |
./lib/metasm/metasm/parse_c.rb- else | |
./lib/metasm/metasm/parse_c.rb: var.type.qualifier = var.type.qualifier.to_a | qualifier if not qualifier.empty? | |
./lib/metasm/metasm/parse_c.rb- var.type.parse_attributes(parser, true) | |
./lib/metasm/metasm/parse_c.rb- var | |
./lib/metasm/metasm/parse_c.rb- end | |
-- | |
./lib/metasm/metasm/parse_c.rb: elsif not specifier.empty? | |
./lib/metasm/metasm/parse_c.rb- raise tok || parser, 'invalid specifier list' | |
./lib/metasm/metasm/parse_c.rb- end | |
./lib/metasm/metasm/parse_c.rb- when :int # short, long, long long X signed, unsigned | |
-- | |
./lib/metasm/metasm/parse_c.rb: raise tok || parser, 'invalid type' if not specifier.empty? | |
./lib/metasm/metasm/parse_c.rb- end | |
./lib/metasm/metasm/parse_c.rb- | |
./lib/metasm/metasm/parse_c.rb- @type = BaseType.new(name, *specifier) | |
./lib/metasm/metasm/parse_c.rb: @type.qualifier = qualifier if not qualifier.empty? | |
./lib/metasm/metasm/parse_c.rb- end | |
./lib/metasm/metasm/parse_c.rb- | |
./lib/metasm/metasm/parse_c.rb- # updates @type and @name, parses pointer/arrays/function declarations | |
-- | |
./lib/metasm/metasm/parse_c.rb: until opstack.empty? or OP_PRIO[opstack.last][:'?:'] | |
./lib/metasm/metasm/parse_c.rb- popstack[] | |
./lib/metasm/metasm/parse_c.rb- end | |
./lib/metasm/metasm/parse_c.rb- stack << parse(parser, scope) | |
-- | |
./lib/metasm/metasm/parse_c.rb: until opstack.empty? or OP_PRIO[op.value][opstack.last] | |
./lib/metasm/metasm/parse_c.rb- popstack[] | |
./lib/metasm/metasm/parse_c.rb- end | |
./lib/metasm/metasm/parse_c.rb- end | |
-- | |
./lib/metasm/metasm/parse_c.rb: until opstack.empty? | |
./lib/metasm/metasm/parse_c.rb- popstack[] | |
./lib/metasm/metasm/parse_c.rb- end | |
./lib/metasm/metasm/parse_c.rb- | |
-- | |
./lib/metasm/metasm/parse_c.rb: t.backtrace.backtrace.grep(::String).grep(/^</).empty? | |
./lib/metasm/metasm/parse_c.rb- } | |
./lib/metasm/metasm/parse_c.rb- | |
./lib/metasm/metasm/parse_c.rb- @toplevel.statements.clear # don't want all Declarations | |
-- | |
./lib/metasm/metasm/parse_c.rb: while !(ar = (todo_deps.values.flatten - todo_deps.keys)).empty? | |
./lib/metasm/metasm/parse_c.rb- ar.each { |t| | |
./lib/metasm/metasm/parse_c.rb- todo_rndr[t], todo_deps[t] = t.dump_def(@toplevel) | |
./lib/metasm/metasm/parse_c.rb- } | |
-- | |
./lib/metasm/metasm/parse_c.rb: r.last << ' ' if not r.last.empty? | |
./lib/metasm/metasm/parse_c.rb- r.last << '{' | |
./lib/metasm/metasm/parse_c.rb- tr, dep = e.dump(scope, [''], dep) | |
./lib/metasm/metasm/parse_c.rb: tr.pop if tr.last.empty? | |
./lib/metasm/metasm/parse_c.rb- r.concat tr.map { |s| Case.dump_indent(s) } | |
./lib/metasm/metasm/parse_c.rb- (r.last[-1] == ?{ ? r.last : r) << '}' | |
./lib/metasm/metasm/parse_c.rb- else | |
-- | |
./lib/metasm/metasm/parse_c.rb: break if todo_rndr.empty? | |
./lib/metasm/metasm/parse_c.rb: todo_now = todo_deps.keys.find_all { |k| todo_deps[k].empty? } | |
./lib/metasm/metasm/parse_c.rb: if todo_now.empty? | |
./lib/metasm/metasm/parse_c.rb- r << '// dependency problem, this may not compile' | |
./lib/metasm/metasm/parse_c.rb- todo_now = todo_deps.keys | |
./lib/metasm/metasm/parse_c.rb- end | |
-- | |
./lib/metasm/metasm/parse_c.rb: r << '' if not r.last.empty? | |
./lib/metasm/metasm/parse_c.rb- if s.kind_of? Block | |
./lib/metasm/metasm/parse_c.rb- r, dep = Statement.dump(s, self, r, dep) | |
./lib/metasm/metasm/parse_c.rb- else | |
-- | |
./lib/metasm/metasm/parse_c.rb: decl.last << '()' if decl.last.empty? | |
./lib/metasm/metasm/parse_c.rb- decl.last << '[' | |
./lib/metasm/metasm/parse_c.rb- decl, dep = CExpression.dump(@length, scope, decl, dep) if length | |
./lib/metasm/metasm/parse_c.rb- decl.last << ']' | |
-- | |
./lib/metasm/metasm/parse_c.rb: decl.last << '()' if decl.last.empty? | |
./lib/metasm/metasm/parse_c.rb- decl.last << '(' | |
./lib/metasm/metasm/parse_c.rb- if args | |
./lib/metasm/metasm/parse_c.rb- @args.each { |arg| | |
-- | |
./lib/metasm/metasm/parse_c.rb: decl.last << 'void' if @args.empty? | |
./lib/metasm/metasm/parse_c.rb- end | |
./lib/metasm/metasm/parse_c.rb- end | |
./lib/metasm/metasm/parse_c.rb- decl.last << ')' | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: break a if l.empty? | |
./lib/metasm/metasm/disassemble_api.rb- todo.concat l | |
./lib/metasm/metasm/disassemble_api.rb- end | |
./lib/metasm/metasm/disassemble_api.rb- end | |
-- | |
./lib/metasm/metasm/disassemble_api.rb:#puts " ** patch next_addr to #{Expression[tb.list.last.next_addr]}" if not by.empty? and by.last.opcode.props[:saveip] | |
./lib/metasm/metasm/disassemble_api.rb: by.last.next_addr = tb.list.last.next_addr if not by.empty? and by.last.opcode.props[:saveip] | |
./lib/metasm/metasm/disassemble_api.rb- fb.list.each { |di| @decoded.delete di.address } | |
./lib/metasm/metasm/disassemble_api.rb- fb.list.clear | |
./lib/metasm/metasm/disassemble_api.rb- tb.list.each { |di| @decoded.delete di.address } | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: @addrs_done.delete_if { |ad| normalize(ad[0]) == fb.address or ad[1] == fb.address } if by.empty? and tb.address != fb.address | |
./lib/metasm/metasm/disassemble_api.rb- | |
./lib/metasm/metasm/disassemble_api.rb- # update to_normal/from_normal | |
./lib/metasm/metasm/disassemble_api.rb- fb.to_normal = tb.to_normal | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: if by.empty? | |
./lib/metasm/metasm/disassemble_api.rb- ndi.block.from_normal[idx,1] = fb.from_normal.to_a | |
./lib/metasm/metasm/disassemble_api.rb- else | |
./lib/metasm/metasm/disassemble_api.rb- ndi.block.from_normal[idx] = fb.list.last.address | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: if by.empty? | |
./lib/metasm/metasm/disassemble_api.rb- ndi.block.from_subfuncret[idx,1] = fb.from_subfuncret.to_a | |
./lib/metasm/metasm/disassemble_api.rb- else | |
./lib/metasm/metasm/disassemble_api.rb- ndi.block.from_subfuncret[idx] = fb.list.last.address | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: if by.empty? | |
./lib/metasm/metasm/disassemble_api.rb- tb.to_subfuncret = nil if tb.to_subfuncret == [] | |
./lib/metasm/metasm/disassemble_api.rb- tolist = tb.to_subfuncret || tb.to_normal.to_a | |
./lib/metasm/metasm/disassemble_api.rb- if lfrom = get_label_at(fb.address) and tolist.length == 1 | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: fb if not by.empty? | |
./lib/metasm/metasm/disassemble_api.rb- end | |
./lib/metasm/metasm/disassemble_api.rb- | |
./lib/metasm/metasm/disassemble_api.rb- # undefine a sequence of decodedinstructions from an address | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: true if x.empty? | |
./lib/metasm/metasm/disassemble_api.rb- end | |
./lib/metasm/metasm/disassemble_api.rb- } | |
./lib/metasm/metasm/disassemble_api.rb: @addrs_done.delete_if { |ad| !(addrs & [normalize(ad[0]), normalize(ad[1])]).empty? } | |
./lib/metasm/metasm/disassemble_api.rb- end | |
./lib/metasm/metasm/disassemble_api.rb- | |
./lib/metasm/metasm/disassemble_api.rb- # merge two instruction blocks if they form a simple chain and are adjacent | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: b.send("#{s}=", l_.map { |e| Expression.parse(pp.feed!(e)).reduce }) if not l_.empty? | |
./lib/metasm/metasm/disassemble_api.rb- } | |
./lib/metasm/metasm/disassemble_api.rb- rescue | |
./lib/metasm/metasm/disassemble_api.rb- puts "load: bad block #{l.inspect}" if $VERBOSE | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: @function[a].return_address = r if not r.empty? | |
./lib/metasm/metasm/disassemble_api.rb- @function[a].finalized = true | |
./lib/metasm/metasm/disassemble_api.rb- # TODO | |
./lib/metasm/metasm/disassemble_api.rb- rescue | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: t = (t.empty? ? nil : t.to_sym) | |
./lib/metasm/metasm/disassemble_api.rb- len = (len != '' ? len.to_i : nil) | |
./lib/metasm/metasm/disassemble_api.rb- o = (o.to_s != '' ? Expression.parse(pp.feed!(o)).reduce : nil) # :default/:unknown ? | |
./lib/metasm/metasm/disassemble_api.rb- add_xref(a, Xref.new(t, o, len)) | |
-- | |
./lib/metasm/metasm/disassemble_api.rb: tdi.block.from_subfuncret = nil if tdi.block.from_subfuncret.empty? | |
./lib/metasm/metasm/disassemble_api.rb- } | |
./lib/metasm/metasm/disassemble_api.rb- di.block.to_subfuncret = nil | |
./lib/metasm/metasm/disassemble_api.rb- } | |
-- | |
./lib/metasm/metasm/exe_format/a_out.rb: parse(*a) if not a.empty? | |
./lib/metasm/metasm/exe_format/a_out.rb- @text << assemble_sequence(@textsrc, @cpu) | |
./lib/metasm/metasm/exe_format/a_out.rb- @textsrc.clear | |
./lib/metasm/metasm/exe_format/a_out.rb- @data << assemble_sequence(@datasrc, @cpu) | |
-- | |
./lib/metasm/metasm/exe_format/main.rb: entrypoints = get_default_entrypoints if entrypoints.empty? | |
./lib/metasm/metasm/exe_format/main.rb- disassembler.disassemble(*entrypoints) | |
./lib/metasm/metasm/exe_format/main.rb- @disassembler | |
./lib/metasm/metasm/exe_format/main.rb- end | |
-- | |
./lib/metasm/metasm/exe_format/main.rb: entrypoints = get_default_entrypoints if entrypoints.empty? | |
./lib/metasm/metasm/exe_format/main.rb- disassembler.disassemble_fast_deep(*entrypoints) | |
./lib/metasm/metasm/exe_format/main.rb- @disassembler | |
./lib/metasm/metasm/exe_format/main.rb- end | |
-- | |
./lib/metasm/metasm/exe_format/main.rb: raise ["Unresolved relocations:", @encoded.reloc.map { |o, r| "#{r.target} " + (Backtrace.backtrace_str(r.backtrace) if r.backtrace).to_s }].join("\n") if not @encoded.reloc.empty? | |
./lib/metasm/metasm/exe_format/main.rb- @encoded.data | |
./lib/metasm/metasm/exe_format/main.rb- end | |
./lib/metasm/metasm/exe_format/main.rb- | |
-- | |
./lib/metasm/metasm/exe_format/serialstruct.rb: if not a.empty? | |
./lib/metasm/metasm/exe_format/serialstruct.rb- a.zip(struct_fields.reject { |f| not f[NAME] }).each { |v, f| | |
./lib/metasm/metasm/exe_format/serialstruct.rb- v = int_to_hash(v, f[ENUM]) if f[ENUM] | |
./lib/metasm/metasm/exe_format/serialstruct.rb- v = bits_to_hash(v, f[BITS]) if f[BITS] | |
-- | |
./lib/metasm/metasm/exe_format/coff_decode.rb: if sections and not @sections.empty? | |
./lib/metasm/metasm/exe_format/coff_decode.rb- valign = lambda { |l| EncodedData.align_size(l, @optheader.sect_align) } | |
./lib/metasm/metasm/exe_format/coff_decode.rb- if s = @sections.find { |s_| s_.virtaddr <= rva and s_.virtaddr + valign[s_.virtsize] > rva } | |
./lib/metasm/metasm/exe_format/coff_decode.rb- s.encoded.ptr = rva - s.virtaddr | |
-- | |
./lib/metasm/metasm/exe_format/bflt.rb: parse(*a) if not a.empty? | |
./lib/metasm/metasm/exe_format/bflt.rb- @text << assemble_sequence(@textsrc, @cpu) | |
./lib/metasm/metasm/exe_format/bflt.rb- @textsrc.clear | |
./lib/metasm/metasm/exe_format/bflt.rb- @data << assemble_sequence(@datasrc, @cpu) | |
-- | |
./lib/metasm/metasm/exe_format/coff_encode.rb: gaps = olist.empty? ? 0 : olist.max+1 - olist.min - olist.length | |
./lib/metasm/metasm/exe_format/coff_encode.rb- noord = @exports.length - olist.length | |
./lib/metasm/metasm/exe_format/coff_encode.rb- @ordinal_base ||= [omin - (noord - gaps), 1].max | |
./lib/metasm/metasm/exe_format/coff_encode.rb- | |
-- | |
./lib/metasm/metasm/exe_format/coff_encode.rb: Expression[label_at(ordiat.last, ordiat.last.virtsize, 'iat_end'), :-, label_at(ordiat.first, 0)]] if not ordiat.empty? | |
./lib/metasm/metasm/exe_format/coff_encode.rb- | |
./lib/metasm/metasm/exe_format/coff_encode.rb- iat_s = nil | |
./lib/metasm/metasm/exe_format/coff_encode.rb- | |
-- | |
./lib/metasm/metasm/exe_format/coff_encode.rb: encode_append_section plt if not plt.encoded.empty? | |
./lib/metasm/metasm/exe_format/coff_encode.rb- end | |
./lib/metasm/metasm/exe_format/coff_encode.rb- | |
./lib/metasm/metasm/exe_format/coff_encode.rb- # encodes a thunk to imported function | |
-- | |
./lib/metasm/metasm/exe_format/coff_encode.rb: if not @sections.find { |s| s.encoded and s.encoded.export['metasm_intern_geteip'] } and edata.empty? | |
./lib/metasm/metasm/exe_format/coff_encode.rb- edata << shellcode["metasm_intern_geteip: call 42f\n42:\npop eax\nsub eax, 42b-metasm_intern_geteip\nret"] | |
./lib/metasm/metasm/exe_format/coff_encode.rb- end | |
./lib/metasm/metasm/exe_format/coff_encode.rb- edata << shellcode["#{import.thunk}: call metasm_intern_geteip\njmp [eax+#{import.target}-metasm_intern_geteip]"] | |
-- | |
./lib/metasm/metasm/exe_format/coff_encode.rb: if @relocations.empty? | |
./lib/metasm/metasm/exe_format/coff_encode.rb- rt = RelocationTable.new | |
./lib/metasm/metasm/exe_format/coff_encode.rb- rt.base_addr = 0 | |
./lib/metasm/metasm/exe_format/coff_encode.rb- rt.relocs = [] | |
-- | |
./lib/metasm/metasm/exe_format/coff_encode.rb: parse(*a) if not a.empty? | |
./lib/metasm/metasm/exe_format/coff_encode.rb- @source.each { |k, v| | |
./lib/metasm/metasm/exe_format/coff_encode.rb- raise "no section named #{k} ?" if not s = @sections.find { |s_| s_.name == k } | |
./lib/metasm/metasm/exe_format/coff_encode.rb- s.encoded << assemble_sequence(v, @cpu) | |
-- | |
./lib/metasm/metasm/exe_format/dol.rb: parse(*a) if not a.empty? | |
./lib/metasm/metasm/exe_format/dol.rb- @text[0] ||= EncodedData.new | |
./lib/metasm/metasm/exe_format/dol.rb- @text[0] << assemble_sequence(@textsrc, @cpu) | |
./lib/metasm/metasm/exe_format/dol.rb- @textsrc.clear | |
-- | |
./lib/metasm/metasm/exe_format/mz.rb: parse(*a) if not a.empty? | |
./lib/metasm/metasm/exe_format/mz.rb- @body << assemble_sequence(@source, @cpu) | |
./lib/metasm/metasm/exe_format/mz.rb- @body.fixup @body.binding | |
./lib/metasm/metasm/exe_format/mz.rb- # XXX should create @relocs here | |
-- | |
./lib/metasm/metasm/exe_format/pe.rb: if @mz.encoded.empty? | |
./lib/metasm/metasm/exe_format/pe.rb- @mz.encoded << @encoded[0, @coff_offset-4] | |
./lib/metasm/metasm/exe_format/pe.rb- @mz.encoded.ptr = 0 | |
./lib/metasm/metasm/exe_format/pe.rb- @mz.decode_header | |
-- | |
./lib/metasm/metasm/exe_format/pe.rb: until mzparts.empty? | |
./lib/metasm/metasm/exe_format/pe.rb- break if mzparts.first.virtsize + @mz.encoded.virtsize > 0x3c | |
./lib/metasm/metasm/exe_format/pe.rb- @mz.encoded << mzparts.shift | |
./lib/metasm/metasm/exe_format/pe.rb- end | |
-- | |
./lib/metasm/metasm/exe_format/pe.rb: until mzparts.empty? | |
./lib/metasm/metasm/exe_format/pe.rb- @mz.encoded << mzparts.shift | |
./lib/metasm/metasm/exe_format/pe.rb- end | |
./lib/metasm/metasm/exe_format/pe.rb- | |
-- | |
./lib/metasm/metasm/exe_format/pe.rb: encode_default_mz_header if @mz.encoded.empty? | |
./lib/metasm/metasm/exe_format/pe.rb- | |
./lib/metasm/metasm/exe_format/pe.rb- @encoded << @mz.encoded.dup | |
./lib/metasm/metasm/exe_format/pe.rb- | |
-- | |
./lib/metasm/metasm/exe_format/pe.rb: break if imports.empty? | |
./lib/metasm/metasm/exe_format/pe.rb- iat_p = imports.first.iat_p | |
./lib/metasm/metasm/exe_format/pe.rb- end | |
./lib/metasm/metasm/exe_format/pe.rb: break if imports.empty? | |
./lib/metasm/metasm/exe_format/pe.rb- iat_p += ptrsz | |
./lib/metasm/metasm/exe_format/pe.rb- end | |
./lib/metasm/metasm/exe_format/pe.rb- | |
-- | |
./lib/metasm/metasm/exe_format/shellcode.rb: parse(*a) if not a.empty? | |
./lib/metasm/metasm/exe_format/shellcode.rb- @encoded << assemble_sequence(@source, @cpu) | |
./lib/metasm/metasm/exe_format/shellcode.rb- @source.clear | |
./lib/metasm/metasm/exe_format/shellcode.rb- encode | |
-- | |
./lib/metasm/metasm/exe_format/macho.rb: parse(*a) if not a.empty? | |
./lib/metasm/metasm/exe_format/macho.rb- @source.each { |k, v| | |
./lib/metasm/metasm/exe_format/macho.rb- raise "no segment named #{k} ?" if not s = @segments.find { |s_| s_.name == k } | |
./lib/metasm/metasm/exe_format/macho.rb- s.encoded << assemble_sequence(v, @cpu) | |
-- | |
./lib/metasm/metasm/exe_format/elf_encode.rb: @phoff ||= elf.segments.empty? ? 0 : elf.new_label('phdr') | |
./lib/metasm/metasm/exe_format/elf_encode.rb- @shoff ||= elf.sections.length <= 1 ? 0 : elf.new_label('shdr') | |
./lib/metasm/metasm/exe_format/elf_encode.rb- @flags ||= [] | |
./lib/metasm/metasm/exe_format/elf_encode.rb- @ehsize ||= Header.size(elf) | |
-- | |
./lib/metasm/metasm/exe_format/elf_encode.rb: if not list.empty? or @relocations.empty? | |
./lib/metasm/metasm/exe_format/elf_encode.rb- if list.find { |r| r.addend } | |
./lib/metasm/metasm/exe_format/elf_encode.rb- stype = 'RELA' | |
./lib/metasm/metasm/exe_format/elf_encode.rb- sname = '.rela.plt' | |
-- | |
./lib/metasm/metasm/exe_format/elf_encode.rb: if not list.empty? | |
./lib/metasm/metasm/exe_format/elf_encode.rb- if not @tag['TEXTREL'] and @sections.find { |s_| | |
./lib/metasm/metasm/exe_format/elf_encode.rb- s_.encoded and e = s_.encoded.inv_export[0] and not s_.flags.include? 'WRITE' and | |
./lib/metasm/metasm/exe_format/elf_encode.rb- list.find { |r| Expression[r.offset, :-, e].reduce.kind_of? ::Integer } | |
-- | |
./lib/metasm/metasm/exe_format/elf_encode.rb: if not list.empty? | |
./lib/metasm/metasm/exe_format/elf_encode.rb- if not rela = @sections.find { |s_| s_.type == 'RELA' and s_.name == '.rela.dyn' } | |
./lib/metasm/metasm/exe_format/elf_encode.rb- rela = Section.new | |
./lib/metasm/metasm/exe_format/elf_encode.rb- rela.name = '.rela.dyn' | |
-- | |
./lib/metasm/metasm/exe_format/elf_encode.rb: parse(*a) if not a.empty? | |
./lib/metasm/metasm/exe_format/elf_encode.rb- @source.each { |k, v| | |
./lib/metasm/metasm/exe_format/elf_encode.rb- raise "no section named #{k} ?" if not s = @sections.find { |s_| s_.name == k } | |
./lib/metasm/metasm/exe_format/elf_encode.rb- s.encoded << assemble_sequence(v, @cpu) | |
-- | |
./lib/metasm/metasm/ia32/encode.rb: if !(op.args & [:modrm, :modrmA, :modrmxmm, :modrmmmx]).empty? | |
./lib/metasm/metasm/ia32/encode.rb- # reg field of modrm | |
./lib/metasm/metasm/ia32/encode.rb- regval = (base[-1] >> 3) & 7 | |
./lib/metasm/metasm/ia32/encode.rb- base.pop | |
-- | |
./lib/metasm/metasm/ia32/decode.rb: if not wantregs.empty? | |
./lib/metasm/metasm/ia32/decode.rb- wantregs.each(&bt_val) | |
./lib/metasm/metasm/ia32/decode.rb- else | |
./lib/metasm/metasm/ia32/decode.rb- if dasm.function_blocks(faddr, true).length < 20 | |
-- | |
./lib/metasm/metasm/ia32/compile_c.rb: if not @state.offset.values.grep(::Integer).empty? | |
./lib/metasm/metasm/ia32/compile_c.rb- @state.saved_ebp = Reg.new(5, @cpusz) | |
./lib/metasm/metasm/ia32/compile_c.rb- @state.used << 5 | |
./lib/metasm/metasm/ia32/compile_c.rb- end | |
-- | |
./lib/metasm/metasm/ia32/opcodes.rb: raise "Invalid opcode definition: #{name}: unknown #{argprops.inspect}" unless argprops.empty? | |
./lib/metasm/metasm/ia32/opcodes.rb- | |
./lib/metasm/metasm/ia32/opcodes.rb- yield op if block_given? | |
./lib/metasm/metasm/ia32/opcodes.rb- | |
-- | |
./lib/metasm/metasm/ia32/opcodes.rb: raise "Invalid opcode customisation: #{name}: #{argprops.inspect}" unless argprops.empty? | |
./lib/metasm/metasm/ia32/opcodes.rb- | |
./lib/metasm/metasm/ia32/opcodes.rb- addop_post(op) | |
./lib/metasm/metasm/ia32/opcodes.rb- end | |
-- | |
./lib/metasm/metasm/ia32/debug.rb: raise 'alloc_bphw: no free debugregister' if may.empty? | |
./lib/metasm/metasm/ia32/debug.rb- bp.internal[:dr] = may.first | |
./lib/metasm/metasm/ia32/debug.rb- end | |
./lib/metasm/metasm/ia32/debug.rb- bp.internal[:type] ||= :x | |
-- | |
./lib/metasm/metasm/ia32/decompile.rb: until myblocks.empty? | |
./lib/metasm/metasm/ia32/decompile.rb- b, to = myblocks.shift | |
./lib/metasm/metasm/ia32/decompile.rb- if l = dcmp.dasm.get_label_at(b) | |
./lib/metasm/metasm/ia32/decompile.rb- stmts << C::Label.new(l) | |
-- | |
./lib/metasm/metasm/ia32/decompile.rb: if not myblocks.empty? and not %w[ret jmp].include? dcmp.dasm.decoded[b].block.list.last.instruction.opname | |
./lib/metasm/metasm/ia32/decompile.rb- puts " block #{Expression[b]} has no to and don't end in ret" | |
./lib/metasm/metasm/ia32/decompile.rb- end | |
./lib/metasm/metasm/ia32/decompile.rb- when 1 | |
./lib/metasm/metasm/ia32/decompile.rb: if (myblocks.empty? ? nextaddr != to[0] : myblocks.first.first != to[0]) | |
./lib/metasm/metasm/ia32/decompile.rb- stmts << C::Goto.new(dcmp.dasm.auto_label_at(to[0], 'unknown_goto')) | |
./lib/metasm/metasm/ia32/decompile.rb- end | |
./lib/metasm/metasm/ia32/decompile.rb- else | |
-- | |
./lib/metasm/metasm/ia32/decompile.rb: aso = a.empty? ? 0 : a.last.stackoff.to_i + dcmp.c_parser.typesize[:ptr] | |
./lib/metasm/metasm/ia32/decompile.rb- (so-argsz).times { | |
./lib/metasm/metasm/ia32/decompile.rb- a << C::Variable.new(dcmp.stackoff_to_varname(aso), C::BaseType.new(:int)) | |
./lib/metasm/metasm/ia32/decompile.rb- a.last.add_attribute('unused') | |
-- | |
./lib/metasm/metasm/ia32/main.rb: raise "Invalid arguments #{a.inspect}" if not a.empty? | |
./lib/metasm/metasm/ia32/main.rb- raise "Invalid Ia32 family #{@family.inspect}" if not respond_to?("init_#@family") | |
./lib/metasm/metasm/ia32/main.rb- end | |
./lib/metasm/metasm/ia32/main.rb- | |
-- | |
./lib/metasm/metasm/ia32/parse.rb: raise otok, 'mrm: reg in imm' if imm.kind_of? Expression and not imm.externals.grep(Reg).empty? | |
./lib/metasm/metasm/ia32/parse.rb- | |
./lib/metasm/metasm/ia32/parse.rb- # find default address size | |
./lib/metasm/metasm/ia32/parse.rb- adsz = b ? b.sz : i ? i.sz : nil | |
-- | |
./lib/metasm/metasm/preprocessor.rb: args << arg if not arg.empty? or args.length > 0 or tok.raw != ')' | |
./lib/metasm/metasm/preprocessor.rb- break if tok.raw == ')' | |
./lib/metasm/metasm/preprocessor.rb- end | |
./lib/metasm/metasm/preprocessor.rb- args | |
-- | |
./lib/metasm/metasm/preprocessor.rb: break if tok and tok.type == :punct and tok.raw == ')' and @args.empty? # allow empty list | |
./lib/metasm/metasm/preprocessor.rb- raise @name, 'invalid arg definition' if not tok or tok.type != :string | |
./lib/metasm/metasm/preprocessor.rb- @args << tok | |
./lib/metasm/metasm/preprocessor.rb- nil while tok = lexer.readtok_nopp and tok.type == :space | |
-- | |
./lib/metasm/metasm/preprocessor.rb: while not depend.empty? | |
./lib/metasm/metasm/preprocessor.rb: todo_now = depend.keys.find_all { |k| (depend[k] - [k]).empty? } | |
./lib/metasm/metasm/preprocessor.rb: if todo_now.empty? | |
./lib/metasm/metasm/preprocessor.rb- dep_cycle = lambda { |ary| | |
./lib/metasm/metasm/preprocessor.rb- deps = depend[ary.last] | |
./lib/metasm/metasm/preprocessor.rb- if deps.include? ary.first; ary | |
-- | |
./lib/metasm/metasm/preprocessor.rb: @pos >= @text.length and @queue.empty? and @backtrace.empty? | |
./lib/metasm/metasm/preprocessor.rb- end | |
./lib/metasm/metasm/preprocessor.rb- | |
./lib/metasm/metasm/preprocessor.rb- # push back a token, will be returned on the next readtok | |
-- | |
./lib/metasm/metasm/preprocessor.rb: if not @backtrace.empty? | |
./lib/metasm/metasm/preprocessor.rb- raise ParseError, "parse error in #@filename: unmatched #if/#endif" if @backtrace.last.pop != @ifelse_nesting.length | |
./lib/metasm/metasm/preprocessor.rb- @filename, @lineno, @text, @pos, @queue = @backtrace.pop | |
./lib/metasm/metasm/preprocessor.rb- tok = readtok | |
-- | |
./lib/metasm/metasm/preprocessor.rb: return @queue.pop unless @queue.empty? | |
./lib/metasm/metasm/preprocessor.rb- | |
./lib/metasm/metasm/preprocessor.rb- nbt = [] | |
./lib/metasm/metasm/preprocessor.rb- @backtrace.each { |bt| nbt << bt[0] << bt[1] } | |
-- | |
./lib/metasm/metasm/preprocessor.rb: raise tok, 'unterminated escape' if hex.empty? | |
./lib/metasm/metasm/preprocessor.rb- hex.hex | |
./lib/metasm/metasm/preprocessor.rb- when ?0..?7; | |
./lib/metasm/metasm/preprocessor.rb- oct = '' << c | |
-- | |
./lib/metasm/metasm/preprocessor.rb: raise eol || cmd, 'pp syntax error' if @ifelse_nesting.empty? or (eol = skipspc[] and eol.type != :eol) | |
./lib/metasm/metasm/preprocessor.rb- unreadtok eol | |
./lib/metasm/metasm/preprocessor.rb- case @ifelse_nesting.last | |
./lib/metasm/metasm/preprocessor.rb- when :accept | |
-- | |
./lib/metasm/metasm/preprocessor.rb: raise eol || cmd, 'pp syntax error' if @ifelse_nesting.empty? or (eol = skipspc[] and eol.type != :eol) | |
./lib/metasm/metasm/preprocessor.rb- unreadtok eol | |
./lib/metasm/metasm/preprocessor.rb- @ifelse_nesting.pop | |
./lib/metasm/metasm/preprocessor.rb- | |
-- | |
./lib/metasm/metasm/preprocessor.rb: raise cmd, "macro stack empty" if @pragma_macro_stack.empty? | |
./lib/metasm/metasm/preprocessor.rb- if mbody = @pragma_macro_stack.pop # push undefined macro allowed | |
./lib/metasm/metasm/preprocessor.rb- @definition[m.value] = mbody | |
./lib/metasm/metasm/preprocessor.rb- else | |
-- | |
./lib/metasm/metasm/preprocessor.rb: until opstack.empty? or Expression::OP_PRIO[op.value][opstack.last] | |
./lib/metasm/metasm/preprocessor.rb- stack << Expression.new(opstack.pop, stack.pop, stack.pop) | |
./lib/metasm/metasm/preprocessor.rb- end | |
./lib/metasm/metasm/preprocessor.rb- | |
-- | |
./lib/metasm/metasm/preprocessor.rb: until opstack.empty? | |
./lib/metasm/metasm/preprocessor.rb- stack << Expression.new(opstack.pop, stack.pop, stack.pop) | |
./lib/metasm/metasm/preprocessor.rb- end | |
./lib/metasm/metasm/preprocessor.rb- | |
-- | |
./lib/metasm/metasm/gui/gtk.rb: Gui.main_quit if @@mainwindow_list.empty? # XXX we don't call main_start ourself.. | |
./lib/metasm/metasm/gui/gtk.rb- end | |
./lib/metasm/metasm/gui/gtk.rb- | |
./lib/metasm/metasm/gui/gtk.rb- def widget=(w) | |
-- | |
./lib/metasm/metasm/gui/debug.rb: } if not list_pr.empty? | |
./lib/metasm/metasm/gui/debug.rb- end | |
./lib/metasm/metasm/gui/debug.rb- | |
./lib/metasm/metasm/gui/debug.rb- def prompt_createprocess(caption='chose path') | |
-- | |
./lib/metasm/metasm/gui/debug.rb: if keys and not keys.empty? | |
./lib/metasm/metasm/gui/debug.rb- @statusline = keys.sort.join(' ') | |
./lib/metasm/metasm/gui/debug.rb- else | |
./lib/metasm/metasm/gui/debug.rb- @statusline = 'type \'help\' for help' | |
-- | |
./lib/metasm/metasm/gui/debug.rb: if not s.empty? | |
./lib/metasm/metasm/gui/debug.rb- s = s[1..-1] if s[0] == ?, | |
./lib/metasm/metasm/gui/debug.rb- len ||= solve_expr(s) | |
./lib/metasm/metasm/gui/debug.rb- end | |
-- | |
./lib/metasm/metasm/gui/debug.rb: if not arg.empty? and arg = (solve_expr(arg) rescue arg) | |
./lib/metasm/metasm/gui/debug.rb- @dbg.loadsyms(arg) | |
./lib/metasm/metasm/gui/debug.rb- else | |
./lib/metasm/metasm/gui/debug.rb- @dbg.loadallsyms { |a| | |
-- | |
./lib/metasm/metasm/gui/dasm_decomp.rb: lv << '00' if lv.empty? | |
./lib/metasm/metasm/gui/dasm_decomp.rb- localvar_re = /\b(#{lv.join('|')})\b/ | |
./lib/metasm/metasm/gui/dasm_decomp.rb- globalvar_re = /\b(#{f.initializer.outer.symbol.keys.join('|')})\b/ | |
./lib/metasm/metasm/gui/dasm_decomp.rb- end | |
-- | |
./lib/metasm/metasm/gui/dasm_funcgraph.rb: g = {addr => []} if not g or g.empty? | |
./lib/metasm/metasm/gui/dasm_funcgraph.rb- | |
./lib/metasm/metasm/gui/dasm_funcgraph.rb- # create boxes | |
./lib/metasm/metasm/gui/dasm_funcgraph.rb- (g.keys + g.values).flatten.uniq.each { |a| | |
-- | |
./lib/metasm/metasm/gui/dasm_main.rb: if run or not @entrypoints.empty? or not @dasm.addrs_todo.empty? | |
./lib/metasm/metasm/gui/dasm_main.rb- protect { run = @dasm.disassemble_mainiter(@entrypoints) } | |
./lib/metasm/metasm/gui/dasm_main.rb- gui_update_counter += 1 | |
./lib/metasm/metasm/gui/dasm_main.rb- if gui_update_counter > @gui_update_counter_max | |
-- | |
./lib/metasm/metasm/gui/dasm_main.rb: a = i[0].empty? ? i[2] : i[0] | |
./lib/metasm/metasm/gui/dasm_main.rb- focus_addr(a, nil, true) | |
./lib/metasm/metasm/gui/dasm_main.rb- } | |
./lib/metasm/metasm/gui/dasm_main.rb- } | |
-- | |
./lib/metasm/metasm/gui/dasm_main.rb: if @dasm_pause.empty? and @dasm.addrs_todo.empty? | |
./lib/metasm/metasm/gui/dasm_main.rb- true | |
./lib/metasm/metasm/gui/dasm_main.rb: elsif @dasm_pause.empty? | |
./lib/metasm/metasm/gui/dasm_main.rb- @dasm_pause = @dasm.addrs_todo.dup | |
./lib/metasm/metasm/gui/dasm_main.rb- @dasm.addrs_todo.replace @dasm_pause.find_all { |a, *b| @dasm.decoded[@dasm.normalize(a)] } | |
./lib/metasm/metasm/gui/dasm_main.rb- @dasm_pause -= @dasm.addrs_todo | |
-- | |
./lib/metasm/metasm/gui/dasm_main.rb: } if not list_pr.empty? | |
./lib/metasm/metasm/gui/dasm_main.rb- end | |
./lib/metasm/metasm/gui/dasm_main.rb- | |
./lib/metasm/metasm/gui/dasm_main.rb- # reuse last @savefile to save dasm, prompt for file if undefined | |
-- | |
./lib/metasm/metasm/gui/dasm_main.rb: @dasm_widget.dasm.backtrace_maxblocks = Integer(target) if not target.empty? | |
./lib/metasm/metasm/gui/dasm_main.rb- } if @dasm_widget | |
./lib/metasm/metasm/gui/dasm_main.rb- } | |
./lib/metasm/metasm/gui/dasm_main.rb- addsubmenu(options, 'Backtrace _limit (data)') { | |
-- | |
./lib/metasm/metasm/gui/dasm_main.rb: @dasm_widget.dasm.backtrace_maxblocks_data = Integer(target) if not target.empty? | |
./lib/metasm/metasm/gui/dasm_main.rb- } if @dasm_widget | |
./lib/metasm/metasm/gui/dasm_main.rb- } | |
./lib/metasm/metasm/gui/dasm_main.rb- addsubmenu(options) | |
-- | |
./lib/metasm/metasm/gui/dasm_hex.rb: if not @write_pending.empty? | |
./lib/metasm/metasm/gui/dasm_hex.rb- if curaddr.kind_of? Integer | |
./lib/metasm/metasm/gui/dasm_hex.rb- @write_pending.keys.grep(curaddr...curaddr+(w_h/@font_height+1)*@line_size).each { |k| wp_win[k] = @write_pending[k] } | |
./lib/metasm/metasm/gui/dasm_hex.rb- else wp_win = @write_pending.dup | |
-- | |
./lib/metasm/metasm/gui/dasm_hex.rb: if awp.empty? | |
./lib/metasm/metasm/gui/dasm_hex.rb- s = '' | |
./lib/metasm/metasm/gui/dasm_hex.rb- d_do.unpack(pak).each { |b| | |
./lib/metasm/metasm/gui/dasm_hex.rb- s << (hexfmt % b) | |
-- | |
./lib/metasm/metasm/gui/dasm_hex.rb: if wp.empty? | |
./lib/metasm/metasm/gui/dasm_hex.rb- render[d, :ascii] | |
./lib/metasm/metasm/gui/dasm_hex.rb- else | |
./lib/metasm/metasm/gui/dasm_hex.rb- d.length.times { |o| | |
-- | |
./lib/metasm/metasm/gui/dasm_hex.rb: if not @write_pending.empty? | |
./lib/metasm/metasm/gui/dasm_hex.rb- @write_pending.clear | |
./lib/metasm/metasm/gui/dasm_hex.rb- redraw | |
./lib/metasm/metasm/gui/dasm_hex.rb- else return false | |
-- | |
./lib/metasm/metasm/gui/win32.rb: if buf and not buf.empty? | |
./lib/metasm/metasm/gui/win32.rb- h = Win32Gui.globalalloc(Win32Gui::GMEM_MOVEABLE, buf.length+1) | |
./lib/metasm/metasm/gui/win32.rb- ptr = Win32Gui.globallock(h) | |
./lib/metasm/metasm/gui/win32.rb- Win32Gui.memory_write(ptr, buf) | |
-- | |
./lib/metasm/metasm/gui/win32.rb: Gui.main_quit if @@mainwindow_list.empty? # XXX we didn't call Gui.main, we shouldn't Gui.main_quit... | |
./lib/metasm/metasm/gui/win32.rb- end | |
./lib/metasm/metasm/gui/win32.rb- | |
./lib/metasm/metasm/gui/win32.rb- def destroyed? ; @destroyed ||= false ; end | |
-- | |
./lib/metasm/metasm/gui/win32.rb: if not @btndown.compact.empty? | |
./lib/metasm/metasm/gui/win32.rb- @btndown = [] | |
./lib/metasm/metasm/gui/win32.rb- redraw | |
./lib/metasm/metasm/gui/win32.rb- else | |
-- | |
./lib/metasm/metasm/gui/win32.rb: while not @idle_procs.empty? and Win32Gui.peekmessagea(msg, 0, 0, 0, Win32Gui::PM_NOREMOVE) == 0 | |
./lib/metasm/metasm/gui/win32.rb- @idle_procs.delete_if { |ip| not ip.call } | |
./lib/metasm/metasm/gui/win32.rb- end | |
./lib/metasm/metasm/gui/win32.rb- end | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: if parentdepth.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- # root | |
./lib/metasm/metasm/gui/dasm_graph.rb- maxdepth[g] = 0 | |
./lib/metasm/metasm/gui/dasm_graph.rb- elsif parentdepth.include? nil | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: roots.each { |g| trim[g, g.from] unless g.from.empty? } | |
./lib/metasm/metasm/gui/dasm_graph.rb- roots.each { |g| walk[g] } | |
./lib/metasm/metasm/gui/dasm_graph.rb- | |
./lib/metasm/metasm/gui/dasm_graph.rb- # handle loops now (unmarked nodes) | |
./lib/metasm/metasm/gui/dasm_graph.rb: while unmarked = groups - maxdepth.keys and not unmarked.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- if g = unmarked.find { |g_| g_.from.find { |gg| maxdepth[gg] } } | |
./lib/metasm/metasm/gui/dasm_graph.rb- # loop head | |
./lib/metasm/metasm/gui/dasm_graph.rb- trim[g, g.from.find_all { |gg| not maxdepth[gg] }] # XXX not quite sure for this | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: g = unmarked.find { |g_| g_.from.empty? } || unmarked.first | |
./lib/metasm/metasm/gui/dasm_graph.rb- trim[g, g.from] | |
./lib/metasm/metasm/gui/dasm_graph.rb- maxdepth[g] = 0 | |
./lib/metasm/metasm/gui/dasm_graph.rb- walk[g] | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: if groups.all? { |g1| g1.from.empty? and g1.to.empty? } | |
./lib/metasm/metasm/gui/dasm_graph.rb- # disjoint subgraphs | |
./lib/metasm/metasm/gui/dasm_graph.rb- align_hz[groups] | |
./lib/metasm/metasm/gui/dasm_graph.rb- merge_groups[groups] | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: (gg.from - g1.from).empty? and (g1.from - gg.from).empty? and | |
./lib/metasm/metasm/gui/dasm_graph.rb: (strict ? ((gg.to - g1.to).empty? and (g1.to - gg.to).empty?) : (g1.to & gg.to).first) | |
./lib/metasm/metasm/gui/dasm_graph.rb- } | |
./lib/metasm/metasm/gui/dasm_graph.rb- ary = g1.to.map { |gg| gg.from }.flatten.uniq.find_all { |gg| | |
./lib/metasm/metasm/gui/dasm_graph.rb- gg != g1 and | |
./lib/metasm/metasm/gui/dasm_graph.rb: (gg.to - g1.to).empty? and (g1.to - gg.to).empty? and | |
./lib/metasm/metasm/gui/dasm_graph.rb: (strict ? ((gg.from - g1.from).empty? and (g1.from - gg.from).empty?) : (g1.from & gg.from).first) | |
./lib/metasm/metasm/gui/dasm_graph.rb: } if ary.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb: next if ary.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- ary << g1 | |
./lib/metasm/metasm/gui/dasm_graph.rb- dy = 16*ary.map { |g| g.to.length + g.from.length }.inject { |a, b| a+b } | |
./lib/metasm/metasm/gui/dasm_graph.rb- ary.each { |g| g.h += dy ; g.y -= dy/2 } | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: if ary.first.to.empty? # shrink graph if highly dissymetric and to.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- ah = ary.map { |g| g.h }.max | |
./lib/metasm/metasm/gui/dasm_graph.rb- ary.each { |g| | |
./lib/metasm/metasm/gui/dasm_graph.rb- move_group[g, 0, (g.h-ah)/2] # move up | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: (not strict and g2_.to.empty?) } | |
./lib/metasm/metasm/gui/dasm_graph.rb- next if strict and g2.from != [g] or g.to.length != 2 | |
./lib/metasm/metasm/gui/dasm_graph.rb- g2.h += 16 ; g2.y -= 8 | |
./lib/metasm/metasm/gui/dasm_graph.rb- align_vt[[g, g2]] | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: next if not g2 = g.to.sort_by { |g2_| g2_.h }.find { |g2_| g2_.to == [g] or (g2_.to.empty? and g2_.from == [g]) } | |
./lib/metasm/metasm/gui/dasm_graph.rb- g2.h += 16 | |
./lib/metasm/metasm/gui/dasm_graph.rb- align_vt[[g, g2]] | |
./lib/metasm/metasm/gui/dasm_graph.rb- move_group[g2, g2.x-8, 0] | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: g1 = groups.find_all { |g| g.from.empty? } | |
./lib/metasm/metasm/gui/dasm_graph.rb: g1 << groups[rand(groups.length)] if g1.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- g2 = g1.map { |g| g.to }.flatten.uniq - g1 | |
./lib/metasm/metasm/gui/dasm_graph.rb- align_vt[g1] | |
./lib/metasm/metasm/gui/dasm_graph.rb- g1 = merge_groups[g1] | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: next if g2.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- align_vt[g2] | |
./lib/metasm/metasm/gui/dasm_graph.rb- g2 = merge_groups[g2] | |
./lib/metasm/metasm/gui/dasm_graph.rb- g2.w += 128 ; g2.x -= 64 | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: g1 = groups.find_all { |g| g.from.empty? } | |
./lib/metasm/metasm/gui/dasm_graph.rb: g1 << groups.first if g1.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- cntpre = groups.inject(0) { |cntpre_, g| cntpre_ + g.to.length } | |
./lib/metasm/metasm/gui/dasm_graph.rb- g1.each { |g| maketree[[g]] } | |
./lib/metasm/metasm/gui/dasm_graph.rb- cntpost = groups.inject(0) { |cntpre_, g| cntpre_ + g.to.length } | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: if @selected_boxes.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- @curcontext.view_x -= dx ; @curcontext.view_y -= dy | |
./lib/metasm/metasm/gui/dasm_graph.rb- else | |
./lib/metasm/metasm/gui/dasm_graph.rb- @selected_boxes.each { |b| b.x += dx ; b.y += dy } | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: @curcontext.auto_arrange_init(@selected_boxes.empty? ? @curcontext.box : @selected_boxes) | |
./lib/metasm/metasm/gui/dasm_graph.rb- puts 'reset', @curcontext.dump_layout, '' | |
./lib/metasm/metasm/gui/dasm_graph.rb- zoom_all | |
./lib/metasm/metasm/gui/dasm_graph.rb- redraw | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: if @selected_boxes.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- @fakebox ||= 0 | |
./lib/metasm/metasm/gui/dasm_graph.rb- b = @curcontext.new_box "id_#@fakebox", | |
./lib/metasm/metasm/gui/dasm_graph.rb- :addresses => [], :line_address => [], | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: bl = [b1] if bl.empty? # loop | |
./lib/metasm/metasm/gui/dasm_graph.rb- bl.each { |b2| | |
./lib/metasm/metasm/gui/dasm_graph.rb- if b1.to.include? b2 | |
./lib/metasm/metasm/gui/dasm_graph.rb- b1.to.delete b2 | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: if newf.empty? | |
./lib/metasm/metasm/gui/dasm_graph.rb- roots << b.address | |
./lib/metasm/metasm/gui/dasm_graph.rb- else | |
./lib/metasm/metasm/gui/dasm_graph.rb- todo.concat newf | |
-- | |
./lib/metasm/metasm/gui/dasm_graph.rb: roots << default_root if roots.empty? and default_root | |
./lib/metasm/metasm/gui/dasm_graph.rb- | |
./lib/metasm/metasm/gui/dasm_graph.rb- roots | |
./lib/metasm/metasm/gui/dasm_graph.rb- end | |
-- | |
./lib/metasm/metasm/gui/dasm_listing.rb: return if @arrows.empty? or not @line_address[0] | |
./lib/metasm/metasm/gui/dasm_listing.rb- w_w, w_h = @arrow_zone_w, height | |
./lib/metasm/metasm/gui/dasm_listing.rb- | |
./lib/metasm/metasm/gui/dasm_listing.rb- slot_alloc = {} # [y1, y2] => x slot -- y1 <= y2 | |
-- | |
./lib/metasm/metasm/gui/dasm_listing.rb: nl[] if not l_list.empty? | |
./lib/metasm/metasm/gui/dasm_listing.rb- l_list.each { |name| | |
./lib/metasm/metasm/gui/dasm_listing.rb- str_c << ["#{name}:", :label] | |
./lib/metasm/metasm/gui/dasm_listing.rb- nl[] | |
-- | |
./lib/metasm/metasm/gui/dasm_listing.rb: comment = nil if comment.empty? | |
./lib/metasm/metasm/gui/dasm_listing.rb- len = (1..len).find { |l| @dasm.xrefs[curaddr+l] or s.inv_export[s.ptr+l] or s.reloc[s.ptr+l] } || len | |
./lib/metasm/metasm/gui/dasm_listing.rb- str = str[0, len] if len < str.length | |
./lib/metasm/metasm/gui/dasm_listing.rb- str = str.pack('C*').unpack(@dasm.cpu.endianness == :big ? 'n*' : 'v*') if len == 2 | |
-- | |
./lib/metasm/metasm/os/remote.rb: return if r.empty? | |
./lib/metasm/metasm/os/remote.rb- regs = r.values_at(*@gdbregs) | |
./lib/metasm/metasm/os/remote.rb- gdb_msg('G', hex(@pack_int[regs])) | |
./lib/metasm/metasm/os/remote.rb- end | |
-- | |
./lib/metasm/metasm/os/remote.rb: @reg_val_cache = @gdb.read_regs || {} if @reg_val_cache.empty? | |
./lib/metasm/metasm/os/remote.rb- @reg_val_cache[r] || 0 | |
./lib/metasm/metasm/os/remote.rb- end | |
./lib/metasm/metasm/os/remote.rb- def set_reg_value(r, v) | |
-- | |
./lib/metasm/metasm/os/remote.rb: @gdb.send_regs(@reg_val_cache) if @regs_dirty and not @reg_val_cache.empty? | |
./lib/metasm/metasm/os/remote.rb- @regs_dirty = false | |
./lib/metasm/metasm/os/remote.rb- end | |
./lib/metasm/metasm/os/remote.rb- | |
-- | |
./lib/metasm/metasm/os/main.rb: if @hash_shared.empty? | |
./lib/metasm/metasm/os/main.rb- @hash_owner.delete @hash_key | |
./lib/metasm/metasm/os/main.rb- elsif @hash_owner[@hash_key] == self | |
./lib/metasm/metasm/os/main.rb- @hash_owner[@hash_key] = @hash_shared.first | |
-- | |
./lib/metasm/metasm/os/windows.rb: raise "unresolved shellcode relocs #{r.join(', ')}" if not r.empty? | |
./lib/metasm/metasm/os/windows.rb- shellcode = shellcode.data | |
./lib/metasm/metasm/os/windows.rb- end | |
./lib/metasm/metasm/os/windows.rb- | |
-- | |
./lib/metasm/metasm/render.rb: if not v.empty? and v.all? { |c| c < 0x7f } | |
./lib/metasm/metasm/render.rb- # XXX endianness | |
./lib/metasm/metasm/render.rb- return "'" + v.pack('C*').inspect.gsub("'") { '\\\'' }[1...-1] + "'" | |
./lib/metasm/metasm/render.rb- end | |
-- | |
./lib/metasm/metasm/ppc/decode.rb: wantregs = GPR::Sym if wantregs.empty? | |
./lib/metasm/metasm/ppc/decode.rb- wantregs.map { |r| r.to_sym }.each(&bt_val) | |
./lib/metasm/metasm/ppc/decode.rb- | |
./lib/metasm/metasm/ppc/decode.rb- #puts "update_func_bind: #{Expression[faddr]} has sp -> #{b[:$sp]}" if not Expression[b[:$sp], :-, :$sp].reduce.kind_of?(::Integer) if $VERBOSE | |
-- | |
./lib/metasm/metasm/ppc/decompile.rb: from.empty? or from.find { |f| | |
./lib/metasm/metasm/ppc/decompile.rb- !deps_w[f].include?(r) and uninitialized[f, r, done + [b]] | |
./lib/metasm/metasm/ppc/decompile.rb- } | |
./lib/metasm/metasm/ppc/decompile.rb- } | |
-- | |
./lib/metasm/metasm/ppc/decompile.rb: until myblocks.empty? | |
./lib/metasm/metasm/ppc/decompile.rb- b, to = myblocks.shift | |
./lib/metasm/metasm/ppc/decompile.rb- if l = dcmp.dasm.get_label_at(b) | |
./lib/metasm/metasm/ppc/decompile.rb- stmts << C::Label.new(l) | |
-- | |
./lib/metasm/metasm/ppc/decompile.rb: if not myblocks.empty? and not %w[ret jmp].include? dcmp.dasm.decoded[b].block.list.last.instruction.opname | |
./lib/metasm/metasm/ppc/decompile.rb- puts " block #{Expression[b]} has no to and don't end in ret" | |
./lib/metasm/metasm/ppc/decompile.rb- end | |
./lib/metasm/metasm/ppc/decompile.rb- when 1 | |
./lib/metasm/metasm/ppc/decompile.rb: if (myblocks.empty? ? nextaddr != to[0] : myblocks.first.first != to[0]) | |
./lib/metasm/metasm/ppc/decompile.rb- stmts << C::Goto.new(dcmp.dasm.auto_label_at(to[0], 'unknown_goto')) | |
./lib/metasm/metasm/ppc/decompile.rb- end | |
./lib/metasm/metasm/ppc/decompile.rb- else | |
-- | |
./lib/metasm/metasm/ppc/main.rb: if not i.args.empty? | |
./lib/metasm/metasm/ppc/main.rb- r << ' ' | |
./lib/metasm/metasm/ppc/main.rb- i.args.each { |a| | |
./lib/metasm/metasm/ppc/main.rb- r << a << ', ' | |
-- | |
./lib/metasm/metasm/x86_64/encode.rb: if !(op.args & [:modrm, :modrmA, :modrmxmm, :modrmmmx]).empty? | |
./lib/metasm/metasm/x86_64/encode.rb- # reg field of modrm | |
./lib/metasm/metasm/x86_64/encode.rb- regval = (base[-1] >> 3) & 7 | |
./lib/metasm/metasm/x86_64/encode.rb- base.pop | |
-- | |
./lib/metasm/metasm/x86_64/compile_c.rb: if not @state.offset.values.grep(::Integer).empty? | |
./lib/metasm/metasm/x86_64/compile_c.rb- @state.saved_rbp = Reg.new(5, @cpusz) | |
./lib/metasm/metasm/x86_64/compile_c.rb- @state.used << 5 | |
./lib/metasm/metasm/x86_64/compile_c.rb- end | |
-- | |
./lib/metasm/metasm/x86_64/main.rb: raise "Invalid arguments #{a.inspect}" if not a.empty? | |
./lib/metasm/metasm/x86_64/main.rb- raise "Invalid X86_64 family #{@family.inspect}" if not respond_to?("init_#@family") | |
./lib/metasm/metasm/x86_64/main.rb- end | |
./lib/metasm/metasm/x86_64/main.rb- | |
-- | |
./lib/metasm/metasm/disassemble.rb: @address = arg0.first.address if not arg0.empty? | |
./lib/metasm/metasm/disassemble.rb- arg0.each { |di| add_di(di) } | |
./lib/metasm/metasm/disassemble.rb- else | |
./lib/metasm/metasm/disassemble.rb- @address = arg0 | |
-- | |
./lib/metasm/metasm/disassemble.rb: dasm.cpu.backtrace_update_function_binding(dasm, funcaddr, self, return_address, *unk_regs) if not unk_regs.empty? | |
./lib/metasm/metasm/disassemble.rb- @backtrace_binding | |
./lib/metasm/metasm/disassemble.rb- end | |
./lib/metasm/metasm/disassemble.rb- end | |
-- | |
./lib/metasm/metasm/disassemble.rb: l ||= addrstr if addr.kind_of? Expression and addr.externals.grep(::Symbol).empty? | |
./lib/metasm/metasm/disassemble.rb- elsif not l = e.inv_export[e.ptr] | |
./lib/metasm/metasm/disassemble.rb- l = @program.new_label(addrstr) | |
./lib/metasm/metasm/disassemble.rb- e.add_export l, e.ptr | |
-- | |
./lib/metasm/metasm/disassemble.rb: if @addrs_todo.empty? and entrypoints.empty? | |
./lib/metasm/metasm/disassemble.rb- post_disassemble | |
./lib/metasm/metasm/disassemble.rb- puts 'disassembly finished' if $VERBOSE | |
./lib/metasm/metasm/disassemble.rb- @callback_finished[] if callback_finished | |
-- | |
./lib/metasm/metasm/disassemble.rb: elsif @addrs_todo.empty? | |
./lib/metasm/metasm/disassemble.rb- ep = entrypoints.shift | |
./lib/metasm/metasm/disassemble.rb- l = auto_label_at(normalize(ep), 'entrypoint') | |
./lib/metasm/metasm/disassemble.rb: puts "start disassemble from #{l} (#{entrypoints.length})" if $VERBOSE and not entrypoints.empty? | |
./lib/metasm/metasm/disassemble.rb- @entrypoints << l | |
./lib/metasm/metasm/disassemble.rb- @addrs_todo << [ep] | |
./lib/metasm/metasm/disassemble.rb- else | |
-- | |
./lib/metasm/metasm/disassemble.rb: bd[unk.map { |u| Expression[u].to_s }.sort.join(',')] = Expression::Unknown if not unk.empty? | |
./lib/metasm/metasm/disassemble.rb- @comment[addr] |= ["function binding: " + bd.map { |k, v| "#{k} -> #{v}" }.sort.join(', ')] | |
./lib/metasm/metasm/disassemble.rb- @comment[addr] |= ["function ends at " + f.return_address.map { |ra| Expression[ra] }.join(', ')] if f.return_address | |
./lib/metasm/metasm/disassemble.rb- } | |
-- | |
./lib/metasm/metasm/disassemble.rb: raise if not block.list.empty? | |
./lib/metasm/metasm/disassemble.rb- di_addr = block.address | |
./lib/metasm/metasm/disassemble.rb- delay_slot = nil | |
./lib/metasm/metasm/disassemble.rb- di = nil | |
-- | |
./lib/metasm/metasm/disassemble.rb: if not di_addr or di.opcode.props[:stopexec] or not @program.get_xrefs_x(self, di).empty? | |
./lib/metasm/metasm/disassemble.rb- # do not backtrace until delay slot is finished (eg MIPS: di is a | |
./lib/metasm/metasm/disassemble.rb- # ret and the delay slot holds stack fixup needed to calc func_binding) | |
./lib/metasm/metasm/disassemble.rb- # XXX if the delay slot is also xref_x or :stopexec it is ignored | |
-- | |
./lib/metasm/metasm/disassemble.rb: until ep.empty? | |
./lib/metasm/metasm/disassemble.rb- disassemble_fast_step(ep, &b) | |
./lib/metasm/metasm/disassemble.rb- maxdepth -= 1 | |
./lib/metasm/metasm/disassemble.rb- ep.delete_if { |a| not @decoded[normalize(a[0])] } if maxdepth == 0 | |
-- | |
./lib/metasm/metasm/disassemble.rb: do_ret = funcs.empty? | |
./lib/metasm/metasm/disassemble.rb- ret = [] | |
./lib/metasm/metasm/disassemble.rb- na = di.next_addr + di.bin_length * @cpu.delay_slot(di) | |
./lib/metasm/metasm/disassemble.rb- funcs.each { |fa| | |
-- | |
./lib/metasm/metasm/disassemble.rb: if f = @function[fa] and bf = f.get_backtracked_for(self, fa, di.address) and not bf.empty? | |
./lib/metasm/metasm/disassemble.rb- # this includes retaddr unless f is noreturn | |
./lib/metasm/metasm/disassemble.rb- bf.each { |btt| | |
./lib/metasm/metasm/disassemble.rb- next if btt.type != :x | |
-- | |
./lib/metasm/metasm/disassemble.rb: if b.to_subfuncret and not b.to_subfuncret.empty? | |
./lib/metasm/metasm/disassemble.rb- return if b.to_subfuncret.length != 1 | |
./lib/metasm/metasm/disassemble.rb- addr = normalize(b.to_subfuncret.first) | |
./lib/metasm/metasm/disassemble.rb- return if not b.to_normal or b.to_normal.length != 1 | |
-- | |
./lib/metasm/metasm/disassemble.rb: return if lasts.empty? | |
./lib/metasm/metasm/disassemble.rb- if lasts.all? { |la| | |
./lib/metasm/metasm/disassemble.rb- b = block_at(la) | |
./lib/metasm/metasm/disassemble.rb- next if not di = b.list.last | |
-- | |
./lib/metasm/metasm/disassemble.rb: while not todo.empty? | |
./lib/metasm/metasm/disassemble.rb- obj, addr, type, loopdetect = todo.pop | |
./lib/metasm/metasm/disassemble.rb- di = @decoded[addr] | |
./lib/metasm/metasm/disassemble.rb- if di and type == :subfuncret | |
-- | |
./lib/metasm/metasm/disassemble.rb: raise ArgumentError, "invalid argument to backtrace #{nargs.keys.inspect}" if not nargs.empty? | |
./lib/metasm/metasm/disassemble.rb- | |
./lib/metasm/metasm/disassemble.rb- expr = Expression[expr] | |
./lib/metasm/metasm/disassemble.rb- | |
-- | |
./lib/metasm/metasm/disassemble.rb: !(expr.externals.grep(::Symbol) - [:unknown] - terminals).empty? | |
./lib/metasm/metasm/disassemble.rb- end | |
./lib/metasm/metasm/disassemble.rb- | |
./lib/metasm/metasm/disassemble.rb- # returns an array of expressions, or nil if expr needs more backtrace | |
-- | |
./lib/metasm/metasm/disassemble.rb: if refs.empty? | |
./lib/metasm/metasm/disassemble.rb- if get_section_at(ptr) | |
./lib/metasm/metasm/disassemble.rb- # static data, newer written : return encoded value | |
./lib/metasm/metasm/disassemble.rb- ret |= [decode_imm[ptr, ind.len]] | |
-- | |
./lib/metasm/metasm/disassemble.rb: if not refs.empty? and (expr == true or not need_backtrace(expr)) | |
./lib/metasm/metasm/disassemble.rb- if expr == true | |
./lib/metasm/metasm/disassemble.rb- # found a path avoiding the :w xrefs, read the encoded initial value | |
./lib/metasm/metasm/disassemble.rb- ret |= [decode_imm[ptr, ind.len]] | |
-- | |
./lib/metasm/metasm/disassemble.rb: if expr.expr_externals.all? { |e| @prog_binding[e] or @function[normalize(e)] } and expr.expr_indirections.empty? | |
./lib/metasm/metasm/disassemble.rb- ret |= backtrace_value(expr, maxdepth-1-h[:loopdetect].length) | |
./lib/metasm/metasm/disassemble.rb- false | |
./lib/metasm/metasm/disassemble.rb- else | |
-- | |
./lib/metasm/metasm/disassemble.rb: if expr.expr_externals.all? { |e| @prog_binding[e] or @function[normalize(e)] } and expr.expr_indirections.empty? | |
./lib/metasm/metasm/disassemble.rb- ret |= backtrace_value(expr, maxdepth-1-h[:loopdetect].length) | |
./lib/metasm/metasm/disassemble.rb- false | |
./lib/metasm/metasm/disassemble.rb- else | |
-- | |
./lib/metasm/metasm/disassemble.rb: if not dump_data and edata.length > 16*1024 and blockoffs.empty? | |
./lib/metasm/metasm/disassemble.rb- b["// [#{edata.length} data bytes]"] | |
./lib/metasm/metasm/disassemble.rb- next | |
./lib/metasm/metasm/disassemble.rb- end | |
-- | |
./lib/metasm/metasm/disassemble.rb: if not xr.empty? | |
./lib/metasm/metasm/disassemble.rb- b["\n// Xrefs: #{xr[0, 8].join(' ')}#{' ...' if xr.length > 8}"] | |
./lib/metasm/metasm/disassemble.rb- end | |
./lib/metasm/metasm/disassemble.rb- if block.edata.inv_export[block.edata_ptr] | |
./lib/metasm/metasm/disassemble.rb: b["\n"] if xr.empty? | |
./lib/metasm/metasm/disassemble.rb- label_alias[block.address].each { |name| b["#{name}:"] } | |
./lib/metasm/metasm/disassemble.rb- end | |
./lib/metasm/metasm/disassemble.rb- if c = @comment[block.address] | |
-- | |
./lib/metasm/misc/hexdump.rb: while buf = read(512) and not buf.empty? | |
./lib/metasm/misc/hexdump.rb- buf.hexdump(ctx) | |
./lib/metasm/misc/hexdump.rb- end | |
./lib/metasm/misc/hexdump.rb- ctx.delete :noend | |
-- | |
./lib/metasm/misc/cheader-findpppath.rb: if r.empty? | |
./lib/metasm/misc/cheader-findpppath.rb- ret.pop | |
./lib/metasm/misc/cheader-findpppath.rb- else | |
./lib/metasm/misc/cheader-findpppath.rb- want = true | |
-- | |
./lib/metasm/misc/cheader-findpppath.rb: want = true if not r.empty? | |
./lib/metasm/misc/cheader-findpppath.rb- ret.concat r | |
./lib/metasm/misc/cheader-findpppath.rb- when /^#endif/ | |
./lib/metasm/misc/cheader-findpppath.rb- if not root | |
-- | |
./lib/metasm/misc/objdiff.rb: h["[#{k.inspect}]"] = d if not d.empty? | |
./lib/metasm/misc/objdiff.rb- } | |
./lib/metasm/misc/objdiff.rb- else | |
./lib/metasm/misc/objdiff.rb- a = (@@diff_accessor_cache ||= {})[o1.class] ||= (im = o1.class.public_instance_methods.grep(/^[a-z]/) ; (im & im.map { |m| m + '=' }).map { |m| m.chop }.find_all { |m| o1.instance_variable_get('@'+m) }) | |
./lib/metasm/misc/objdiff.rb: if a.empty? | |
./lib/metasm/misc/objdiff.rb- return o1 == o2 ? h : [o1, o2] | |
./lib/metasm/misc/objdiff.rb- end | |
./lib/metasm/misc/objdiff.rb- a.each { |k| | |
-- | |
./lib/metasm/misc/objdiff.rb: h['.' + k] = d if not d.empty? | |
./lib/metasm/misc/objdiff.rb- } | |
./lib/metasm/misc/objdiff.rb- end | |
./lib/metasm/misc/objdiff.rb- | |
-- | |
./lib/metasm/misc/ppc_pdf2oplist.rb: if args.include? nil and curfields.length == 2 and (curfields - [:ra, :d]).empty? | |
./lib/metasm/misc/ppc_pdf2oplist.rb- args[args.index(nil)] = :ra_i16 | |
./lib/metasm/misc/ppc_pdf2oplist.rb- curfields.clear | |
./lib/metasm/misc/ppc_pdf2oplist.rb: elsif args.include? nil and curfields.length == 2 and (curfields - [:ra, :ds]).empty? | |
./lib/metasm/misc/ppc_pdf2oplist.rb- args[args.index(nil)] = :ra_i16s | |
./lib/metasm/misc/ppc_pdf2oplist.rb- curfields.clear | |
./lib/metasm/misc/ppc_pdf2oplist.rb: elsif args.include? nil and curfields.length == 2 and (curfields - [:ra, :dq]).empty? | |
./lib/metasm/misc/ppc_pdf2oplist.rb- args[args.index(nil)] = :ra_i16q | |
./lib/metasm/misc/ppc_pdf2oplist.rb- curfields.clear | |
./lib/metasm/misc/ppc_pdf2oplist.rb- elsif args.include? nil and curfields.length == 1 | |
-- | |
./lib/metasm/misc/ppc_pdf2oplist.rb: n << ', ' if not args.empty? | |
./lib/metasm/misc/ppc_pdf2oplist.rb- puts "\taddop " + n + args.map { |e| e.inspect }.join(', ') | |
./lib/metasm/misc/ppc_pdf2oplist.rb- } | |
./lib/metasm/misc/ppc_pdf2oplist.rb-end | |
-- | |
./lib/metasm/misc/ppc_pdf2oplist.rb: text.unshift l while l = ilist.pop and l = l.str and (l =~ /,|\)$/ or text.empty?) | |
./lib/metasm/misc/ppc_pdf2oplist.rb- ilist = [] | |
./lib/metasm/misc/ppc_pdf2oplist.rb- make_instr(encoding, bitindices, text) | |
./lib/metasm/misc/ppc_pdf2oplist.rb- elsif l.str.include? 'Special Registers Altered' | |
-- | |
./lib/metasm/misc/ppc_pdf2oplist.rb: puts lines.map { |l_| "(#{l_.y}) #{l_.str}" } if ilist.empty? | |
./lib/metasm/misc/ppc_pdf2oplist.rb- raise 'nofoundop' | |
./lib/metasm/misc/ppc_pdf2oplist.rb- else | |
./lib/metasm/misc/ppc_pdf2oplist.rb- $foundop = false | |
-- | |
./lib/metasm/misc/txt2html.rb: l += 9-2 unless @style.empty? | |
./lib/metasm/misc/txt2html.rb- # 'k: v; ' | |
./lib/metasm/misc/txt2html.rb- @style.each{ |k, v| | |
./lib/metasm/misc/txt2html.rb- l += "#{k}: #{v}; ".length | |
-- | |
./lib/metasm/misc/txt2html.rb: attrs += ' style="' + @style.map{ |k, v| "#{k}: #{v}" }.join('; ') + '"' unless @style.empty? | |
./lib/metasm/misc/txt2html.rb- s = '' << indent << '<' << @name << attrs << (@uniq ? ' />' : '>') | |
./lib/metasm/misc/txt2html.rb- if @uniq | |
./lib/metasm/misc/txt2html.rb- s | |
-- | |
./lib/metasm/misc/txt2html.rb: if ARGV.empty? | |
./lib/metasm/misc/txt2html.rb- Dir.chdir(File.expand_path(File.join(File.dirname(__FILE__), '../doc'))) | |
./lib/metasm/misc/txt2html.rb- ARGV.concat Dir['**/index.txt'] | |
./lib/metasm/misc/txt2html.rb- end | |
-- | |
./lib/metasm/misc/objscan.rb: done[object_id] = self if done.empty? | |
./lib/metasm/misc/objscan.rb- if t = targets.find { |t_| self == t_ } | |
./lib/metasm/misc/objscan.rb- puts "found #{t} at #{path}" | |
./lib/metasm/misc/objscan.rb- end | |
-- | |
./lib/metasm/misc/tcp_proxy_hex.rb: if not str or str.empty? | |
./lib/metasm/misc/tcp_proxy_hex.rb- srv = false | |
./lib/metasm/misc/tcp_proxy_hex.rb- else | |
./lib/metasm/misc/tcp_proxy_hex.rb- s2c << str | |
-- | |
./lib/metasm/misc/tcp_proxy_hex.rb: if not str or str.empty? | |
./lib/metasm/misc/tcp_proxy_hex.rb- clt = false | |
./lib/metasm/misc/tcp_proxy_hex.rb- else | |
./lib/metasm/misc/tcp_proxy_hex.rb- c2s << str | |
-- | |
./lib/metasm/misc/tcp_proxy_hex.rb:timeout = Float(ARGV.shift) if not ARGV.empty? | |
./lib/metasm/misc/tcp_proxy_hex.rb- | |
./lib/metasm/misc/tcp_proxy_hex.rb-s = TCPServer.new(lhost, lport) | |
./lib/metasm/misc/tcp_proxy_hex.rb- | |
-- | |
./lib/metasm/misc/pdfparse.rb: when '+', '-'; break if not buf.empty? | |
./lib/metasm/misc/pdfparse.rb- when '.'; break if buf.include? '.' | |
./lib/metasm/misc/pdfparse.rb- when '0'..'9' | |
./lib/metasm/misc/pdfparse.rb- else break | |
-- | |
./lib/metasm/misc/pdfparse.rb: return if buf.empty? | |
./lib/metasm/misc/pdfparse.rb- skipspc | |
./lib/metasm/misc/pdfparse.rb- buf.include?('.') ? buf.to_f : buf.to_i | |
./lib/metasm/misc/pdfparse.rb- end | |
-- | |
./lib/metasm/misc/pdfparse.rb: if spc > 0 and not @str.empty? | |
./lib/metasm/misc/pdfparse.rb- @str << (' '*spc) | |
./lib/metasm/misc/pdfparse.rb- elsif spc < 0 | |
./lib/metasm/misc/pdfparse.rb- @str.chop! while @str[-1] == ?\ and (spc += 1) <= 0# and (lastchar != ?\ or @str[-2] == lastchar) | |
-- | |
./lib/metasm/misc/pdfparse.rb: @lines.delete_if { |la| la.empty? } | |
./lib/metasm/misc/pdfparse.rb- self | |
./lib/metasm/misc/pdfparse.rb- end | |
./lib/metasm/misc/pdfparse.rb- | |
-- | |
./lib/metasm/misc/pdfparse.rb: if not ARGV.empty? | |
./lib/metasm/misc/pdfparse.rb- ARGV.each { |pagenr| | |
./lib/metasm/misc/pdfparse.rb- puts pdf.page(pagenr.to_i) | |
./lib/metasm/misc/pdfparse.rb- } | |
-- | |
./lib/rabal/tree.rb: @children.empty? | |
./lib/rabal/tree.rb- end | |
./lib/rabal/tree.rb- | |
./lib/rabal/tree.rb- # | |
-- | |
./lib/rabal/tree.rb: if path.empty? then | |
./lib/rabal/tree.rb- return self | |
./lib/rabal/tree.rb- else | |
./lib/rabal/tree.rb- possible_child = path.shift | |
-- | |
./lib/active_support/duration.rb: parts = ["0 seconds"] if parts.empty? | |
./lib/active_support/duration.rb- parts.to_sentence(:locale => :en) | |
./lib/active_support/duration.rb- end | |
./lib/active_support/duration.rb- | |
-- | |
./lib/active_support/inflector.rb: if word.empty? || inflections.uncountables.include?(result.downcase) | |
./lib/active_support/inflector.rb- result | |
./lib/active_support/inflector.rb- else | |
./lib/active_support/inflector.rb- inflections.plurals.each { |(rule, replacement)| break if result.gsub!(rule, replacement) } | |
-- | |
./lib/active_support/inflector.rb: names.shift if names.empty? || names.first.empty? | |
./lib/active_support/inflector.rb- | |
./lib/active_support/inflector.rb- constant = Object | |
./lib/active_support/inflector.rb- names.each do |name| | |
-- | |
./lib/active_support/inflector.rb: names.shift if names.empty? || names.first.empty? | |
./lib/active_support/inflector.rb- | |
./lib/active_support/inflector.rb- constant = Object | |
./lib/active_support/inflector.rb- names.each do |name| | |
-- | |
./lib/active_support/core_ext/date_time/conversions.rb: alias_method :to_default_s, :to_s unless (instance_methods(false) & [:to_s, 'to_s']).empty? | |
./lib/active_support/core_ext/date_time/conversions.rb- | |
./lib/active_support/core_ext/date_time/conversions.rb- # Ruby 1.9 has DateTime#to_time which internally relies on Time. We define our own #to_time which allows | |
./lib/active_support/core_ext/date_time/conversions.rb- # DateTimes outside the range of what can be created with Time. | |
-- | |
./lib/active_support/core_ext/module/introspection.rb: until parts.empty? | |
./lib/active_support/core_ext/module/introspection.rb- parents << (parts * '::').constantize | |
./lib/active_support/core_ext/module/introspection.rb- parts.pop | |
./lib/active_support/core_ext/module/introspection.rb- end | |
-- | |
./lib/active_support/core_ext/array/conversions.rb: if respond_to?(:empty?) && self.empty? | |
./lib/active_support/core_ext/array/conversions.rb- "null" | |
./lib/active_support/core_ext/array/conversions.rb- else | |
./lib/active_support/core_ext/array/conversions.rb- collect { |element| element.id }.join(",") | |
-- | |
./lib/active_support/core_ext/object/blank.rb: # if !address.nil? && !address.empty? | |
./lib/active_support/core_ext/object/blank.rb- # | |
./lib/active_support/core_ext/object/blank.rb- # to | |
./lib/active_support/core_ext/object/blank.rb- # | |
-- | |
./lib/active_support/core_ext/hash/keys.rb: raise(ArgumentError, "Unknown key(s): #{unknown_keys.join(", ")}") unless unknown_keys.empty? | |
./lib/active_support/core_ext/hash/keys.rb- end | |
./lib/active_support/core_ext/hash/keys.rb- end | |
./lib/active_support/core_ext/hash/keys.rb- end | |
-- | |
./lib/active_support/cache/mem_cache_store.rb: addresses = ["localhost"] if addresses.empty? | |
./lib/active_support/cache/mem_cache_store.rb- MemCache.new(addresses, options) | |
./lib/active_support/cache/mem_cache_store.rb- end | |
./lib/active_support/cache/mem_cache_store.rb- | |
-- | |
./lib/active_support/dependencies.rb: return nil if blamed_files.empty? | |
./lib/active_support/dependencies.rb- "This error occurred while loading the following files:\n #{blamed_files.join "\n "}" | |
./lib/active_support/dependencies.rb- end | |
./lib/active_support/dependencies.rb- | |
-- | |
./lib/active_support/dependencies.rb: names.shift if names.first.empty? | |
./lib/active_support/dependencies.rb- | |
./lib/active_support/dependencies.rb- # We can't use defined? because it will invoke const_missing for the parent | |
./lib/active_support/dependencies.rb- # of the name we are checking. | |
-- | |
./lib/active_support/dependencies.rb: log "loading #{path} defined #{newly_defined_paths * ', '}" unless newly_defined_paths.empty? | |
./lib/active_support/dependencies.rb- return result | |
./lib/active_support/dependencies.rb- end | |
./lib/active_support/dependencies.rb- | |
-- | |
./lib/active_support/memoizable.rb: if reload || !defined?(#{memoized_ivar}) || #{memoized_ivar}.empty? # if reload || !defined?(@_memoized_mime_type) || @_memoized_mime_type.empty? | |
./lib/active_support/memoizable.rb- #{memoized_ivar} = [#{original_method}.freeze] # @_memoized_mime_type = [_unmemoized_mime_type.freeze] | |
./lib/active_support/memoizable.rb- end # end | |
./lib/active_support/memoizable.rb- #{memoized_ivar}[0] # @_memoized_mime_type[0] | |
-- | |
./lib/active_support/json/backends/yaml.rb: if marks.empty? | |
./lib/active_support/json/backends/yaml.rb- json.gsub(/\\([\\\/]|u[[:xdigit:]]{4})/) do | |
./lib/active_support/json/backends/yaml.rb- ustr = $1 | |
./lib/active_support/json/backends/yaml.rb- if ustr.start_with?('u') | |
-- | |
./lib/active_support/buffered_logger.rb: unless buffer.empty? | |
./lib/active_support/buffered_logger.rb- old_buffer = buffer | |
./lib/active_support/buffered_logger.rb- @log.write(old_buffer.join) | |
./lib/active_support/buffered_logger.rb- end | |
-- | |
./lib/active_support/testing/deprecation.rb: assert !warnings.empty?, "Expected a deprecation warning within the block but received none" | |
./lib/active_support/testing/deprecation.rb- if match | |
./lib/active_support/testing/deprecation.rb- match = Regexp.new(Regexp.escape(match)) unless match.is_a?(Regexp) | |
./lib/active_support/testing/deprecation.rb- assert warnings.any? { |w| w =~ match }, "No deprecation warning matched #{match}: #{warnings.join(', ')}" | |
-- | |
./lib/active_support/testing/deprecation.rb: assert deprecations.empty?, "Expected no deprecation warning within the block but received #{deprecations.size}: \n #{deprecations * "\n "}" | |
./lib/active_support/testing/deprecation.rb- result | |
./lib/active_support/testing/deprecation.rb- end | |
./lib/active_support/testing/deprecation.rb- | |
-- | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb: if parts.empty? | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb- # shouldn't happen | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb- identifier | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb- elsif parts.length == 1 | |
-- | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb: if results.empty? | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb- raise PeriodNotFound | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb- elsif results.size < 2 | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb- results.first | |
-- | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb: results = matches if !matches.empty? | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb- end | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb- | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb- if results.size < 2 | |
-- | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb: unless @transitions.empty? | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb- utc = TimeOrDateTime.wrap(utc) | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb- index = transition_index(utc.year, utc.mon) | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb- | |
-- | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb: unless @transitions.empty? | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb- local = TimeOrDateTime.wrap(local) | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb- index = transition_index(local.year, local.mon) | |
./lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb- | |
-- | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb: not @servers.empty? | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- end | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- ## | |
-- | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb: raise MemCacheError, "No active servers" if server_stats.empty? | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- server_stats | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- end | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- | |
-- | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb: raise MemCacheError, "No servers available" if @servers.empty? | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- return @servers.first if @servers.length == 1 | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- hkey = hash_for(key) | |
-- | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb: raise ArgumentError, "No host specified" if host.nil? or host.empty? | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- raise ArgumentError, "No port specified" if port.nil? or port.to_i.zero? | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- | |
./lib/active_support/vendor/memcache-client-1.7.4/memcache.rb- @host = host | |
-- | |
./lib/active_support/xml_mini/jdom.rb: if text_children.join.empty? | |
./lib/active_support/xml_mini/jdom.rb- hash | |
./lib/active_support/xml_mini/jdom.rb- else | |
./lib/active_support/xml_mini/jdom.rb- # must use value to prevent double-escaping | |
-- | |
./lib/zip/test/ziptest.rb: assert(zf.entries.empty?) | |
./lib/zip/test/ziptest.rb- | |
./lib/zip/test/ziptest.rb- TestFiles::ASCII_TEST_FILES.each { | |
./lib/zip/test/ziptest.rb- |filename| | |
-- | |
./lib/zip/test/data/generated/longAscii.txt: assert(zf.entries.empty?) | |
./lib/zip/test/data/generated/longAscii.txt- | |
./lib/zip/test/data/generated/longAscii.txt- TestFiles::ASCII_TEST_FILES.each { | |
./lib/zip/test/data/generated/longAscii.txt- |filename| | |
-- | |
./lib/zip/test/data/generated/longAscii.txt: assert(zf.entries.empty?) | |
./lib/zip/test/data/generated/longAscii.txt- | |
./lib/zip/test/data/generated/longAscii.txt- TestFiles::ASCII_TEST_FILES.each { | |
./lib/zip/test/data/generated/longAscii.txt- |filename| | |
-- | |
./lib/zip/test/data/generated/longAscii.txt: assert(zf.entries.empty?) | |
./lib/zip/test/data/generated/longAscii.txt- | |
./lib/zip/test/data/generated/longAscii.txt- TestFiles::ASCII_TEST_FILES.each { | |
./lib/zip/test/data/generated/longAscii.txt- |filename| | |
-- | |
./lib/zip/test/data/file2.txt: assert(zf.entries.empty?) | |
./lib/zip/test/data/file2.txt- | |
./lib/zip/test/data/file2.txt- TestFiles::ASCII_TEST_FILES.each { | |
./lib/zip/test/data/file2.txt- |filename| | |
-- | |
./lib/zip/zip.rb: @outputBuffer.empty? && @decompressor.eof | |
./lib/zip/zip.rb- end | |
./lib/zip/zip.rb- alias :eof? :eof | |
./lib/zip/zip.rb- | |
-- | |
./lib/zip/zip.rb: if (@outputBuffer.empty?) | |
./lib/zip/zip.rb- return internal_produce_input | |
./lib/zip/zip.rb- else | |
./lib/zip/zip.rb- return @outputBuffer.slice!(0...(@outputBuffer.length)) | |
-- | |
./lib/zip/zip.rb: @outputBuffer.empty? && internal_input_finished? | |
./lib/zip/zip.rb- end | |
./lib/zip/zip.rb- alias :eof :input_finished? | |
./lib/zip/zip.rb- alias :eof? :input_finished? | |
-- | |
./lib/zip/ioextras.rb: return @outputBuffer.empty? ? nil : flush | |
./lib/zip/ioextras.rb- end | |
./lib/zip/ioextras.rb- @outputBuffer << produce_input | |
./lib/zip/ioextras.rb- end | |
-- | |
./lib/zip/ioextras.rb: params << "\n" if params.empty? | |
./lib/zip/ioextras.rb- params.flatten.each { | |
./lib/zip/ioextras.rb- |element| | |
./lib/zip/ioextras.rb- val = element.to_s | |
-- | |
./lib/zip/zipfilesystem.rb: expanded.empty? ? "/" : expanded | |
./lib/zip/zipfilesystem.rb- end | |
./lib/zip/zipfilesystem.rb- | |
./lib/zip/zipfilesystem.rb- private | |
-- | |
./lib/net/ssh/buffer.rb: @content.empty? | |
./lib/net/ssh/buffer.rb- end | |
./lib/net/ssh/buffer.rb- | |
./lib/net/ssh/buffer.rb- # Resets the pointer to the start of the buffer. Subsequent reads will | |
-- | |
./lib/net/ssh/verifiers/strict.rb: if matches.empty? | |
./lib/net/ssh/verifiers/strict.rb- ip = arguments[:session].peer[:ip] | |
./lib/net/ssh/verifiers/strict.rb- Net::SSH::KnownHosts.add(host, arguments[:key], arguments[:session].options) | |
./lib/net/ssh/verifiers/strict.rb- return true | |
-- | |
./lib/net/ssh/connection/session.rb: # break if connections.empty? | |
./lib/net/ssh/connection/session.rb- # end | |
./lib/net/ssh/connection/session.rb- def process(wait=nil, &block) | |
./lib/net/ssh/connection/session.rb- return false unless preprocess(&block) | |
-- | |
./lib/net/ssh/transport/hmac/abstract.rb: if v.empty? | |
./lib/net/ssh/transport/hmac/abstract.rb- @key_length = superclass.key_length if @key_length.nil? && superclass.respond_to?(:key_length) | |
./lib/net/ssh/transport/hmac/abstract.rb- return @key_length | |
./lib/net/ssh/transport/hmac/abstract.rb- elsif v.length == 1 | |
-- | |
./lib/net/ssh/transport/hmac/abstract.rb: if v.empty? | |
./lib/net/ssh/transport/hmac/abstract.rb- @mac_length = superclass.mac_length if @mac_length.nil? && superclass.respond_to?(:mac_length) | |
./lib/net/ssh/transport/hmac/abstract.rb- return @mac_length | |
./lib/net/ssh/transport/hmac/abstract.rb- elsif v.length == 1 | |
-- | |
./lib/net/ssh/transport/hmac/abstract.rb: if v.empty? | |
./lib/net/ssh/transport/hmac/abstract.rb- @digest_class = superclass.digest_class if @digest_class.nil? && superclass.respond_to?(:digest_class) | |
./lib/net/ssh/transport/hmac/abstract.rb- return @digest_class | |
./lib/net/ssh/transport/hmac/abstract.rb- elsif v.length == 1 | |
-- | |
./lib/net/ssh/authentication/session.rb: keys.each { |key| key_manager.add(key) } unless keys.empty? | |
./lib/net/ssh/authentication/session.rb: key_data.each { |key2| key_manager.add_key_data(key2) } unless key_data.empty? | |
./lib/net/ssh/authentication/session.rb- | |
./lib/net/ssh/authentication/session.rb- attempted = [] | |
./lib/net/ssh/authentication/session.rb- | |
-- | |
./lib/net/ssh/authentication/methods/keyboard_interactive.rb: puts(name) unless name.empty? | |
./lib/net/ssh/authentication/methods/keyboard_interactive.rb: puts(instruction) unless instruction.empty? | |
./lib/net/ssh/authentication/methods/keyboard_interactive.rb- end | |
./lib/net/ssh/authentication/methods/keyboard_interactive.rb- | |
./lib/net/ssh/authentication/methods/keyboard_interactive.rb- lang_tag = message.read_string | |
-- | |
./lib/net/ssh/test.rb: raise "there is no script to be processed" if socket.script.events.empty? | |
./lib/net/ssh/test.rb- yield | |
./lib/net/ssh/test.rb: assert socket.script.events.empty?, "there should not be any remaining scripted events, but there are still #{socket.script.events.length} pending" | |
./lib/net/ssh/test.rb- end | |
./lib/net/ssh/test.rb- end | |
./lib/net/ssh/test.rb- | |
-- | |
./lib/anemone/http.rb: opts['Cookie'] = @cookie_store.to_s unless @cookie_store.empty? || (!accept_cookies? && @opts[:cookies].nil?) | |
./lib/anemone/http.rb- | |
./lib/anemone/http.rb- if @opts[:http_basic_auth] | |
./lib/anemone/http.rb- opts['Authorization'] = "Basic " + @opts[:http_basic_auth] | |
-- | |
./lib/anemone/page.rb: next if u.nil? or u.empty? | |
./lib/anemone/page.rb- abs = to_absolute(URI(u)) rescue next | |
./lib/anemone/page.rb- @links << abs if in_domain?(abs) | |
./lib/anemone/page.rb- end | |
-- | |
./lib/anemone/page.rb: next if u.nil? or u.empty? | |
./lib/anemone/page.rb- | |
./lib/anemone/page.rb- # Remove any query string | |
./lib/anemone/page.rb- u,tmp = u.split('?',2) | |
-- | |
./lib/anemone/page.rb: absolute.path = '/' if absolute.path.empty? | |
./lib/anemone/page.rb- | |
./lib/anemone/page.rb- return absolute | |
./lib/anemone/page.rb- end | |
-- | |
./lib/anemone/page_store.rb: while !q.empty? | |
./lib/anemone/page_store.rb- page = self[q.deq] | |
./lib/anemone/page_store.rb- page.links.each do |u| | |
./lib/anemone/page_store.rb- begin | |
-- | |
./lib/anemone/page_store.rb: if single and !links.empty? | |
./lib/anemone/page_store.rb- return links[urls.first] | |
./lib/anemone/page_store.rb- else | |
./lib/anemone/page_store.rb- return links | |
-- | |
./lib/anemone/page_store.rb: if single and !links.empty? | |
./lib/anemone/page_store.rb- return links[urls.first] | |
./lib/anemone/page_store.rb- else | |
./lib/anemone/page_store.rb- return links | |
-- | |
./lib/anemone/rex_http.rb: opts['cookie'] = @cookie_store.to_s unless @cookie_store.empty? || (!accept_cookies? && @opts[:cookies].nil?) | |
./lib/anemone/rex_http.rb- | |
./lib/anemone/rex_http.rb- head = {} | |
./lib/anemone/rex_http.rb- if referer | |
-- | |
./lib/anemone/core.rb: @urls.each{ |url| url.path = '/' if url.path.empty? } | |
./lib/anemone/core.rb- | |
./lib/anemone/core.rb- @tentacles = [] | |
./lib/anemone/core.rb- @on_every_page_blocks = [] | |
-- | |
./lib/anemone/core.rb: return if @urls.empty? | |
./lib/anemone/core.rb- | |
./lib/anemone/core.rb- link_queue = Queue.new | |
./lib/anemone/core.rb- page_queue = Queue.new | |
-- | |
./lib/anemone/core.rb: if link_queue.empty? and page_queue.empty? | |
./lib/anemone/core.rb- until link_queue.num_waiting == @tentacles.size | |
./lib/anemone/core.rb- Thread.pass | |
./lib/anemone/core.rb- end | |
./lib/anemone/core.rb: if page_queue.empty? | |
./lib/anemone/core.rb- @tentacles.size.times { link_queue << :END } | |
./lib/anemone/core.rb- break | |
./lib/anemone/core.rb- end | |
-- | |
./lib/anemone/cli/cron.rb: unless not_found.empty? | |
./lib/anemone/cli/cron.rb- puts "\n404's:" | |
./lib/anemone/cli/cron.rb- | |
./lib/anemone/cli/cron.rb- missing_links = pages.urls_linking_to(not_found) | |
-- | |
./lib/rkelly/generated_parser.rb: arr[idx] = i.to_i unless i.empty? | |
./lib/rkelly/generated_parser.rb- idx += 1 | |
./lib/rkelly/generated_parser.rb- end | |
./lib/rkelly/generated_parser.rb- end | |
-- | |
./lib/rkelly/generated_parser.rb: arr[idx] = i.to_i unless i.empty? | |
./lib/rkelly/generated_parser.rb- idx += 1 | |
./lib/rkelly/generated_parser.rb- end | |
./lib/rkelly/generated_parser.rb- end | |
-- | |
./lib/msf/base/sessions/meterpreter_options.rb: if (datastore[key].empty? == false) | |
./lib/msf/base/sessions/meterpreter_options.rb- args = Shellwords.shellwords( datastore[key] ) | |
./lib/msf/base/sessions/meterpreter_options.rb- print_status("Session ID #{session.sid} (#{session.tunnel_to_s}) processing #{key} '#{datastore[key]}'") | |
./lib/msf/base/sessions/meterpreter_options.rb- session.execute_script(args.shift, *args) | |
-- | |
./lib/msf/base/sessions/command_shell.rb: if (not self.info or self.info.empty?) | |
./lib/msf/base/sessions/command_shell.rb- initial_output = shell_read(-1, 0.01) | |
./lib/msf/base/sessions/command_shell.rb- if (initial_output) | |
./lib/msf/base/sessions/command_shell.rb- initial_output.force_encoding("ASCII-8BIT") if initial_output.respond_to?(:force_encoding) | |
-- | |
./lib/msf/base/sessions/command_shell.rb: if (datastore['InitialAutoRunScript'] && datastore['InitialAutoRunScript'].empty? == false) | |
./lib/msf/base/sessions/command_shell.rb- args = Shellwords.shellwords( datastore['InitialAutoRunScript'] ) | |
./lib/msf/base/sessions/command_shell.rb- print_status("Session ID #{sid} (#{tunnel_to_s}) processing InitialAutoRunScript '#{datastore['InitialAutoRunScript']}'") | |
./lib/msf/base/sessions/command_shell.rb- execute_script(args.shift, *args) | |
-- | |
./lib/msf/base/sessions/command_shell.rb: if (datastore['AutoRunScript'] && datastore['AutoRunScript'].empty? == false) | |
./lib/msf/base/sessions/command_shell.rb- args = Shellwords.shellwords( datastore['AutoRunScript'] ) | |
./lib/msf/base/sessions/command_shell.rb- print_status("Session ID #{sid} (#{tunnel_to_s}) processing AutoRunScript '#{datastore['AutoRunScript']}'") | |
./lib/msf/base/sessions/command_shell.rb- execute_script(args.shift, *args) | |
-- | |
./lib/msf/core/post/linux/priv.rb: unless clean_user_id.empty? | |
./lib/msf/core/post/linux/priv.rb- if clean_user_id =~ /^0$/ | |
./lib/msf/core/post/linux/priv.rb- root_priv = true | |
./lib/msf/core/post/linux/priv.rb- elsif clean_user_id =~ /^\d*$/ | |
-- | |
./lib/msf/core/post/windows/eventlog.rb: if evt.empty? | |
./lib/msf/core/post/windows/eventlog.rb- evntlog = eventloglist | |
./lib/msf/core/post/windows/eventlog.rb- else | |
./lib/msf/core/post/windows/eventlog.rb- evntlog << evt | |
-- | |
./lib/msf/core/post/windows/services.rb: sleep(0.05) and a.delete_if {|x| not x.alive?} while not a.empty? | |
./lib/msf/core/post/windows/services.rb- threadnum = 0 | |
./lib/msf/core/post/windows/services.rb- end | |
./lib/msf/core/post/windows/services.rb- end | |
-- | |
./lib/msf/core/payload/solaris.rb: if !(pre.empty?) | |
./lib/msf/core/payload/solaris.rb- pre = sc + pre | |
./lib/msf/core/payload/solaris.rb- end | |
./lib/msf/core/payload/solaris.rb- | |
-- | |
./lib/msf/core/payload/solaris.rb: if !(app.empty?) | |
./lib/msf/core/payload/solaris.rb- app = sc + app | |
./lib/msf/core/payload/solaris.rb- end | |
./lib/msf/core/payload/solaris.rb- | |
Binary file ./lib/msf/core/.module.rb.swp matches | |
-- | |
./lib/msf/core/option_container.rb: return (required? and (value == nil or value.to_s.empty?)) ? false : true | |
./lib/msf/core/option_container.rb- end | |
./lib/msf/core/option_container.rb- | |
./lib/msf/core/option_container.rb- # | |
-- | |
./lib/msf/core/option_container.rb: (value.to_s.empty? == false) and | |
./lib/msf/core/option_container.rb- (value.to_s.match(/^(y|yes|n|no|t|f|0|1|true|false)$/i) == nil))) | |
./lib/msf/core/option_container.rb- return false | |
./lib/msf/core/option_container.rb- end | |
-- | |
./lib/msf/core/option_container.rb: if ((value != nil and value.to_s.empty? == false) and | |
./lib/msf/core/option_container.rb- ((value.to_s.match(/^\d+$/) == nil or value.to_i < 0 or value.to_i > 65535))) | |
./lib/msf/core/option_container.rb- return false | |
./lib/msf/core/option_container.rb- end | |
-- | |
./lib/msf/core/option_container.rb: if (value != nil and value.empty? == false) | |
./lib/msf/core/option_container.rb- begin | |
./lib/msf/core/option_container.rb- ::Rex::Socket.getaddress(value, true) | |
./lib/msf/core/option_container.rb- rescue | |
-- | |
./lib/msf/core/option_container.rb: ret << " " if not ret.empty? | |
./lib/msf/core/option_container.rb- ret << [ rand(0x100000000) ].pack("N").unpack("C*").map{|x| x.to_s }.join(".") | |
./lib/msf/core/option_container.rb- } | |
./lib/msf/core/option_container.rb- return ret | |
-- | |
./lib/msf/core/option_container.rb: if (value != nil and value.empty? == false) | |
./lib/msf/core/option_container.rb- walker = Rex::Socket::RangeWalker.new(normalize(value)) | |
./lib/msf/core/option_container.rb- if (not walker or not walker.valid?) | |
./lib/msf/core/option_container.rb- return false | |
-- | |
./lib/msf/core/option_container.rb: if value and !value.empty? | |
./lib/msf/core/option_container.rb- if value =~ /^memory:\s*([0-9]+)/i | |
./lib/msf/core/option_container.rb- return false unless check_memory_location($1) | |
./lib/msf/core/option_container.rb- else | |
-- | |
./lib/msf/core/option_container.rb: if (errors.empty? == false) | |
./lib/msf/core/option_container.rb- raise OptionValidateError.new(errors), | |
./lib/msf/core/option_container.rb- "One or more options failed to validate", caller | |
./lib/msf/core/option_container.rb- end | |
-- | |
./lib/msf/core/payload_set.rb: (stager_platform & stage_platform).empty?) | |
./lib/msf/core/payload_set.rb- dlog("Stager #{stager_name} and stage #{stage_name} have incompatible platforms: #{stager_platform.names} - #{stage_platform.names}", 'core', LEV_2) | |
./lib/msf/core/payload_set.rb- next | |
./lib/msf/core/payload_set.rb- end | |
-- | |
./lib/msf/core/payload_set.rb: ((stager_arch & stage_arch).empty?)) | |
./lib/msf/core/payload_set.rb- dlog("Stager #{stager_name} and stage #{stage_name} have incompatible architectures: #{stager_arch.join} - #{stage_arch.join}", 'core', LEV_2) | |
./lib/msf/core/payload_set.rb- next | |
./lib/msf/core/payload_set.rb- end | |
-- | |
./lib/msf/core/module_manager.rb: next if ((mod_arch_hash[mod] & opts['Arch']).empty? == true) | |
./lib/msf/core/module_manager.rb- end | |
./lib/msf/core/module_manager.rb- | |
./lib/msf/core/module_manager.rb- # Filter out incompatible platforms | |
-- | |
./lib/msf/core/module_manager.rb: next if ((mod_platform_hash[mod] & opts['Platform']).empty? == true) | |
./lib/msf/core/module_manager.rb- end | |
./lib/msf/core/module_manager.rb- | |
./lib/msf/core/module_manager.rb- # Custom filtering | |
-- | |
./lib/msf/core/module.rb: if username.empty? | |
./lib/msf/core/module.rb- username = self.datastore['PROUSER'].to_s.strip | |
./lib/msf/core/module.rb- end | |
./lib/msf/core/module.rb- | |
-- | |
./lib/msf/core/module.rb: if username.empty? | |
./lib/msf/core/module.rb- username = (ENV['LOGNAME'] || ENV['USERNAME'] || ENV['USER'] || "unknown").to_s.strip | |
./lib/msf/core/module.rb- end | |
./lib/msf/core/module.rb- | |
-- | |
./lib/msf/core/module.rb: (platform & what).empty? == false | |
./lib/msf/core/module.rb- end | |
./lib/msf/core/module.rb- | |
./lib/msf/core/module.rb- # | |
-- | |
./lib/msf/core/module.rb: if(refs and not refs.empty?) | |
./lib/msf/core/module.rb- refs.each_index do |i| | |
./lib/msf/core/module.rb- if !(refs[i].respond_to?('[]') and refs[i].length == 2) | |
./lib/msf/core/module.rb- refs[i] = nil | |
-- | |
./lib/msf/core/handler/reverse_http.rb: if lhost.empty? or lhost == '0.0.0.0' | |
./lib/msf/core/handler/reverse_http.rb- lhost = Rex::Socket.source_address(cli.peerhost) | |
./lib/msf/core/handler/reverse_http.rb- end | |
./lib/msf/core/handler/reverse_http.rb- | |
-- | |
./lib/msf/core/handler/reverse_tcp.rb: if not datastore['ReverseListenerBindAddress'].to_s.empty? | |
./lib/msf/core/handler/reverse_tcp.rb- # Only try to bind to this specific interface | |
./lib/msf/core/handler/reverse_tcp.rb- addrs = [ datastore['ReverseListenerBindAddress'] ] | |
./lib/msf/core/handler/reverse_tcp.rb- | |
-- | |
./lib/msf/core/handler/reverse_https.rb: if lhost.empty? or lhost == '0.0.0.0'or lhost == '::' | |
./lib/msf/core/handler/reverse_https.rb- lhost = Rex::Socket.source_address(cli.peerhost) | |
./lib/msf/core/handler/reverse_https.rb- end | |
./lib/msf/core/handler/reverse_https.rb- | |
-- | |
./lib/msf/core/auxiliary/report.rb: if filename and not filename.empty? | |
./lib/msf/core/auxiliary/report.rb- if filename =~ /(.*)\.(.*)/ | |
./lib/msf/core/auxiliary/report.rb- ext = $2 | |
./lib/msf/core/auxiliary/report.rb- fname = $1 | |
-- | |
./lib/msf/core/auxiliary/report.rb: if [opts[:port],opts[:sname]].compact.empty? | |
./lib/msf/core/auxiliary/report.rb- raise ArgumentError, "Missing option: :sname or :port" | |
./lib/msf/core/auxiliary/report.rb- end | |
./lib/msf/core/auxiliary/report.rb- cred_opts = opts | |
-- | |
./lib/msf/core/auxiliary/wmapmodule.rb: when a.empty? | |
./lib/msf/core/auxiliary/wmapmodule.rb- b.length | |
./lib/msf/core/auxiliary/wmapmodule.rb: when b.empty? | |
./lib/msf/core/auxiliary/wmapmodule.rb- a.length | |
./lib/msf/core/auxiliary/wmapmodule.rb- else | |
./lib/msf/core/auxiliary/wmapmodule.rb- [(a[0] == b[0] ? 0 : 1) + distance(a[1..-1], b[1..-1]), | |
-- | |
./lib/msf/core/auxiliary/auth_brute.rb: userpass_sleep_interval unless @@credentials_tried.empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- end | |
./lib/msf/core/auxiliary/auth_brute.rb- | |
./lib/msf/core/auxiliary/auth_brute.rb- next if @@credentials_skipped[fq_user] | |
-- | |
./lib/msf/core/auxiliary/auth_brute.rb: if datastore[u] and !datastore[u].empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- datastore['USERNAME'] = datastore[u] | |
./lib/msf/core/auxiliary/auth_brute.rb- end | |
./lib/msf/core/auxiliary/auth_brute.rb- end | |
-- | |
./lib/msf/core/auxiliary/auth_brute.rb: if datastore[p] and !datastore[p].empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- datastore['PASSWORD'] = datastore[p] | |
./lib/msf/core/auxiliary/auth_brute.rb- end | |
./lib/msf/core/auxiliary/auth_brute.rb- end | |
-- | |
./lib/msf/core/auxiliary/auth_brute.rb: unless user_array.empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- blank_passwords.concat(user_array.map {|u| [u,""]}) | |
./lib/msf/core/auxiliary/auth_brute.rb- end | |
./lib/msf/core/auxiliary/auth_brute.rb: unless cred_array.empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- cred_array.each {|u,p| blank_passwords << [u,""]} | |
./lib/msf/core/auxiliary/auth_brute.rb- end | |
./lib/msf/core/auxiliary/auth_brute.rb- return(blank_passwords + cred_array) | |
-- | |
./lib/msf/core/auxiliary/auth_brute.rb: unless user_array.empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- user_as_passwords.concat(user_array.map {|u| [u,u]}) | |
./lib/msf/core/auxiliary/auth_brute.rb- end | |
./lib/msf/core/auxiliary/auth_brute.rb: unless cred_array.empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- cred_array.each {|u,p| user_as_passwords << [u,u]} | |
./lib/msf/core/auxiliary/auth_brute.rb- end | |
./lib/msf/core/auxiliary/auth_brute.rb- return(user_as_passwords + cred_array) | |
-- | |
./lib/msf/core/auxiliary/auth_brute.rb: if pass_array.empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- combined_array = user_array.map {|u| [u,""] } | |
./lib/msf/core/auxiliary/auth_brute.rb: elsif user_array.empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- combined_array = pass_array.map {|p| ["",p] } | |
./lib/msf/core/auxiliary/auth_brute.rb- else | |
./lib/msf/core/auxiliary/auth_brute.rb- user_array.each do |u| | |
-- | |
./lib/msf/core/auxiliary/auth_brute.rb: unless obj.all_creds.empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- these_creds = obj.all_creds | |
./lib/msf/core/auxiliary/auth_brute.rb- else | |
./lib/msf/core/auxiliary/auth_brute.rb- these_creds = obj.builders.select {|x| x.respond_to? :imported_users}.map {|b| b.imported_users}.flatten | |
-- | |
./lib/msf/core/auxiliary/auth_brute.rb: if old_msg.match(msg_regex) and !old_msg.match(msg_regex)[6].to_s.strip.empty? | |
./lib/msf/core/auxiliary/auth_brute.rb- complete_message = [ip,port].join(":") | |
./lib/msf/core/auxiliary/auth_brute.rb- (complete_message << " ") if ip | |
./lib/msf/core/auxiliary/auth_brute.rb- complete_message << (old_msg.match(msg_regex)[4] || proto).to_s | |
-- | |
./lib/msf/core/auxiliary/login.rb: return true if( !(datastore['USERNAME'].empty?) and @recvd =~ /#{datastore['USERNAME']}'s/) | |
./lib/msf/core/auxiliary/login.rb- end | |
./lib/msf/core/auxiliary/login.rb- return false | |
./lib/msf/core/auxiliary/login.rb- end | |
-- | |
./lib/msf/core/auxiliary/nmap.rb: return false if (vtag.nil? || vtag.empty?) | |
./lib/msf/core/auxiliary/nmap.rb- return false unless (vtag =~ /^([0-9]+\x2e[0-9]+)/) # Drop the tag. | |
./lib/msf/core/auxiliary/nmap.rb- inum_arr = $1.split(/\x2e/)[0,2].map {|x| x.to_i} | |
./lib/msf/core/auxiliary/nmap.rb- return true if inum_arr[0] > tnum_arr[0] | |
-- | |
./lib/msf/core/auxiliary/nmap.rb: next if nmap_out.strip.empty? | |
./lib/msf/core/auxiliary/nmap.rb- print_status "Nmap: #{nmap_out.strip}" if datastore['NMAP_VERBOSE'] | |
./lib/msf/core/auxiliary/nmap.rb- end | |
./lib/msf/core/auxiliary/nmap.rb- end | |
-- | |
./lib/msf/core/auxiliary/nmap.rb: next if nmap_err.strip.empty? | |
./lib/msf/core/auxiliary/nmap.rb- print_status "Nmap: '#{nmap_err.strip}'" | |
./lib/msf/core/auxiliary/nmap.rb- end | |
./lib/msf/core/auxiliary/nmap.rb- end | |
-- | |
./lib/msf/core/auxiliary/nmap.rb: if datastore['RPORT'] && (datastore['RPORT'].kind_of?(Fixnum) || !datastore['RPORT'].empty?) | |
./lib/msf/core/auxiliary/nmap.rb- return true | |
./lib/msf/core/auxiliary/nmap.rb- end | |
./lib/msf/core/auxiliary/nmap.rb- bad_port = false | |
./lib/msf/core/auxiliary/nmap.rb: if rports.nil? || rports.empty? | |
./lib/msf/core/auxiliary/nmap.rb- print_error "Missing RPORTS" | |
./lib/msf/core/auxiliary/nmap.rb- return false | |
./lib/msf/core/auxiliary/nmap.rb- end | |
-- | |
./lib/msf/core/auxiliary/nmap.rb: if str.nil? || str.empty? | |
./lib/msf/core/auxiliary/nmap.rb- print_error "Missing nmap argument" | |
./lib/msf/core/auxiliary/nmap.rb- return false | |
./lib/msf/core/auxiliary/nmap.rb- end | |
-- | |
./lib/msf/core/db.rb: if notes.empty? | |
./lib/msf/core/db.rb- note = wspace.notes.new(conditions) | |
./lib/msf/core/db.rb- else | |
./lib/msf/core/db.rb- note = notes[0] | |
-- | |
./lib/msf/core/db.rb: if token[0].nil? or token[0].empty? | |
./lib/msf/core/db.rb- cred = service.creds.find_or_initialize_by_user_and_ptype_and_pass(token[0] || "", ptype, token[1] || "") | |
./lib/msf/core/db.rb- else | |
./lib/msf/core/db.rb- cred = service.creds.find_by_user_and_ptype_and_pass(token[0] || "", ptype, token[1] || "") | |
-- | |
./lib/msf/core/db.rb: if token[0].nil? or token[0].empty? | |
./lib/msf/core/db.rb- cred = service.creds.find_or_initialize_by_user_and_ptype(token[0] || "", ptype) | |
./lib/msf/core/db.rb- else | |
./lib/msf/core/db.rb- cred = service.creds.find_by_user_and_ptype(token[0] || "", ptype) | |
-- | |
./lib/msf/core/db.rb: if completed_at.nil? || completed_at.empty? | |
./lib/msf/core/db.rb- task.completed_at = opts[:updated_at] | |
./lib/msf/core/db.rb- else | |
./lib/msf/core/db.rb- task.completed_at = completed_at | |
-- | |
./lib/msf/core/db.rb: if host.name.to_s.empty? | |
./lib/msf/core/db.rb- host.name = vhost | |
./lib/msf/core/db.rb- host.save! | |
./lib/msf/core/db.rb- end | |
-- | |
./lib/msf/core/db.rb: if opts.keys.include?(:ssl) or serv.name.to_s.empty? | |
./lib/msf/core/db.rb- name = opts[:ssl] ? 'https' : 'http' | |
./lib/msf/core/db.rb- serv.name = name | |
./lib/msf/core/db.rb- serv.save! | |
-- | |
./lib/msf/core/db.rb: if cat.empty? | |
./lib/msf/core/db.rb- raise ArgumentError, "report_web_vuln requires the category to be a valid string" | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb- | |
./lib/msf/core/db.rb: if name.empty? | |
./lib/msf/core/db.rb- raise ArgumentError, "report_web_vuln requires the name to be a valid string" | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb- | |
-- | |
./lib/msf/core/db.rb: raise DBImportError.new("The zip file provided is empty.") if data.entries.empty? | |
./lib/msf/core/db.rb- @import_filedata ||= {} | |
./lib/msf/core/db.rb- @import_filedata[:zip_filename] = File.split(data.to_s).last | |
./lib/msf/core/db.rb- @import_filedata[:zip_basename] = @import_filedata[:zip_filename].gsub(/\.zip$/,"") | |
-- | |
./lib/msf/core/db.rb: raise DBImportError.new("The pcap file provided is empty.") if data.body.empty? | |
./lib/msf/core/db.rb- @import_filedata ||= {} | |
./lib/msf/core/db.rb- @import_filedata[:type] = "Libpcap Packet Capture" | |
./lib/msf/core/db.rb- return :libpcap | |
-- | |
./lib/msf/core/db.rb: next if desc_text.nil? or desc_text.empty? | |
./lib/msf/core/db.rb- desc_data = { | |
./lib/msf/core/db.rb- :workspace => wspace, | |
./lib/msf/core/db.rb- :host => addr, | |
-- | |
./lib/msf/core/db.rb: if pkt.is_tcp? and pkt.tcp_src == 80 and !pkt.payload.nil? and !pkt.payload.empty? | |
./lib/msf/core/db.rb- if pkt.payload =~ /^HTTP\x2f1\x2e[01]/ | |
./lib/msf/core/db.rb- http_server_match = pkt.payload.match(/\nServer:\s+([^\r\n]+)[\r\n]/) | |
./lib/msf/core/db.rb- if http_server_match.kind_of?(MatchData) and http_server_match[1] | |
-- | |
./lib/msf/core/db.rb: if pkt.is_tcp? and pkt.tcp_dst == 80 and !pkt.payload.nil? and !pkt.payload.empty? | |
./lib/msf/core/db.rb- if pkt.payload.match(/[\x00-\x20]HTTP\x2f1\x2e[10]/) | |
./lib/msf/core/db.rb- auth_match = pkt.payload.match(/\nAuthorization:\s+Basic\s+([A-Za-z0-9=\x2b]+)/) | |
./lib/msf/core/db.rb- if auth_match.kind_of?(MatchData) and auth_match[1] | |
-- | |
./lib/msf/core/db.rb: if !loot.elements["service-id"].text.to_s.strip.empty? | |
./lib/msf/core/db.rb- unless loot.elements["service-id"].text.to_s.strip == "NULL" | |
./lib/msf/core/db.rb- loot_info[:service] = loot.elements["service-id"].text.to_s.strip | |
./lib/msf/core/db.rb- end | |
-- | |
./lib/msf/core/db.rb: if !task.elements["completed-at"].text.to_s.empty? | |
./lib/msf/core/db.rb- task_info[:completed_at] = nils_for_nulls(task.elements["completed-at"].text.to_s.strip) | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb: if !task.elements["error"].text.to_s.empty? | |
./lib/msf/core/db.rb- task_info[:error] = nils_for_nulls(task.elements["error"].text.to_s.strip) | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb: if !task.elements["result"].text.to_s.empty? | |
./lib/msf/core/db.rb- task_info[:result] = nils_for_nulls(task.elements["result"].text.to_s.strip) | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb- task_info[:orig_path] = nils_for_nulls(task.elements["path"].text.to_s.strip) | |
-- | |
./lib/msf/core/db.rb: data[:info] = extra if not extra.empty? | |
./lib/msf/core/db.rb- if p["name"] != "<unknown>" | |
./lib/msf/core/db.rb- data[:name] = p["name"] | |
./lib/msf/core/db.rb- end | |
-- | |
./lib/msf/core/db.rb: next if hval.to_s.strip.empty? | |
./lib/msf/core/db.rb- headers[hname.downcase] ||= [] | |
./lib/msf/core/db.rb- headers[hname.downcase] << hval | |
./lib/msf/core/db.rb- end | |
-- | |
./lib/msf/core/db.rb: if proof.empty? | |
./lib/msf/core/db.rb- if body | |
./lib/msf/core/db.rb- proof << body + "\n" | |
./lib/msf/core/db.rb- else | |
-- | |
./lib/msf/core/db.rb: if params.empty? and pname | |
./lib/msf/core/db.rb- params = [[pname, vuln['vparam_name'].to_s]] | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb- | |
-- | |
./lib/msf/core/db.rb: next if vuln['type'].to_s.empty? | |
./lib/msf/core/db.rb- | |
./lib/msf/core/db.rb- report_web_vuln(info) | |
./lib/msf/core/db.rb- yield(:web_vuln, url) if block | |
-- | |
./lib/msf/core/db.rb: next if port_states.compact.empty? | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb- yield(:address,data[:host]) if block | |
./lib/msf/core/db.rb- hobj = report_host(data) | |
-- | |
./lib/msf/core/db.rb: data[:info] = extra if not extra.empty? | |
./lib/msf/core/db.rb- if p["name"] != "unknown" | |
./lib/msf/core/db.rb- data[:name] = p["name"] | |
./lib/msf/core/db.rb- end | |
-- | |
./lib/msf/core/db.rb: next if nasl.to_s.strip.empty? | |
./lib/msf/core/db.rb- plugin_name = nil # NBE doesn't ever populate this | |
./lib/msf/core/db.rb- handle_nessus(wspace, hobj_map[ addr ], port, nasl, plugin_name, severity, data) | |
./lib/msf/core/db.rb- end | |
-- | |
./lib/msf/core/db.rb: next if vuln_refs[qid.text].nil? || vuln_refs[qid.text].empty? | |
./lib/msf/core/db.rb- handle_qualys(wspace, hobj, nil, nil, qid.text, nil, vuln_refs[qid.text], nil) | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb- end | |
-- | |
./lib/msf/core/db.rb: return nil if (string.empty? || string.nil?) | |
./lib/msf/core/db.rb- | |
./lib/msf/core/db.rb- begin | |
./lib/msf/core/db.rb- # Validate that it is properly formed base64 first | |
-- | |
./lib/msf/core/db.rb: if host.tunnel_peer and (!thost or thost.empty?) | |
./lib/msf/core/db.rb- # tunnel_peer is of the form ip:port, so strip off the port to | |
./lib/msf/core/db.rb- # get the addr by itself | |
./lib/msf/core/db.rb- thost = host.tunnel_peer.split(":")[0] | |
-- | |
./lib/msf/core/db.rb: if nasl.nil? || nasl.empty? || nasl == 0 || nasl == "0" | |
./lib/msf/core/db.rb- return | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb- | |
-- | |
./lib/msf/core/db.rb: unless plugin_name.to_s.strip.empty? | |
./lib/msf/core/db.rb- vuln_name = plugin_name | |
./lib/msf/core/db.rb- else | |
./lib/msf/core/db.rb- vuln_name = nss | |
-- | |
./lib/msf/core/db.rb: if nasl.nil? || nasl.empty? || nasl == 0 || nasl == "0" | |
./lib/msf/core/db.rb- return | |
./lib/msf/core/db.rb- end | |
./lib/msf/core/db.rb- | |
-- | |
./lib/msf/core/db.rb: if nasl_name.nil? || nasl_name.empty? | |
./lib/msf/core/db.rb- vuln_name = nss | |
./lib/msf/core/db.rb- else | |
./lib/msf/core/db.rb- vuln_name = nasl_name | |
-- | |
./lib/msf/core/exploit.rb: if (arch and arch.empty? == false) | |
./lib/msf/core/exploit.rb- arch = arch.join(", ") | |
./lib/msf/core/exploit.rb- else | |
./lib/msf/core/exploit.rb- arch = 'x86' | |
-- | |
./lib/msf/core/exploit.rb: if (save_regs.empty? == true) | |
./lib/msf/core/exploit.rb- save_regs = nil | |
./lib/msf/core/exploit.rb- end | |
./lib/msf/core/exploit.rb- | |
-- | |
./lib/msf/core/exploit_driver.rb: return ((payload.platform & exp_platform).empty? == false) | |
./lib/msf/core/exploit_driver.rb- end | |
./lib/msf/core/exploit_driver.rb- | |
./lib/msf/core/exploit_driver.rb- ## | |
-- | |
./lib/msf/core/exploit_driver.rb: msg << "#{e.class}" if msg.empty? | |
./lib/msf/core/exploit_driver.rb- | |
./lib/msf/core/exploit_driver.rb- # Record the error to various places | |
./lib/msf/core/exploit_driver.rb- exploit.framework.events.on_module_error(exploit, msg) | |
-- | |
./lib/msf/core/payload.rb: if(asm.nil? or asm.empty?) | |
./lib/msf/core/payload.rb- return x.dup | |
./lib/msf/core/payload.rb- end | |
./lib/msf/core/payload.rb- | |
-- | |
./lib/msf/core/module/platform_list.rb: return platforms.empty? | |
./lib/msf/core/module/platform_list.rb- end | |
./lib/msf/core/module/platform_list.rb- | |
./lib/msf/core/module/platform_list.rb- # | |
-- | |
./lib/msf/core/module/author.rb: if (email and not email.empty?) | |
./lib/msf/core/module/author.rb- str += " <#{email}>" | |
./lib/msf/core/module/author.rb- end | |
./lib/msf/core/module/author.rb- | |
-- | |
./lib/msf/core/rpc/v10/rpc_session.rb: if not (ring_buffer["seq"].nil? || ring_buffer["seq"].empty?) | |
./lib/msf/core/rpc/v10/rpc_session.rb- @session_sequence[sid] = ring_buffer["seq"].to_i | |
./lib/msf/core/rpc/v10/rpc_session.rb- end | |
./lib/msf/core/rpc/v10/rpc_session.rb- return ring_buffer | |
-- | |
./lib/msf/core/rpc/v10/rpc_session.rb: if res.compact.empty? | |
./lib/msf/core/rpc/v10/rpc_session.rb- { "result" => "success"} | |
./lib/msf/core/rpc/v10/rpc_session.rb- else # Doesn't seem like this can fail. Maybe a race? | |
./lib/msf/core/rpc/v10/rpc_session.rb- { "result" => "failure"} | |
-- | |
./lib/msf/core/model/cred.rb: return false if other.proof.empty? | |
./lib/msf/core/model/cred.rb- return false unless self.proof | |
./lib/msf/core/model/cred.rb: return false if self.proof.empty? | |
./lib/msf/core/model/cred.rb- key_id_regex = /[0-9a-fA-F:]+/ | |
./lib/msf/core/model/cred.rb- my_key_id = self.proof[key_id_regex].to_s.downcase | |
./lib/msf/core/model/cred.rb- other_key_id = other.proof[key_id_regex].to_s.downcase | |
-- | |
./lib/msf/core/model/activerecord_patches.rb: return nil if string.empty? | |
./lib/msf/core/model/activerecord_patches.rb- begin | |
./lib/msf/core/model/activerecord_patches.rb- if string.gsub(/\s+/, '') =~ /^([a-z0-9A-Z\+\/=]+)$/ | |
./lib/msf/core/model/activerecord_patches.rb- Marshal.load($1.unpack("m")[0]) | |
-- | |
./lib/msf/core/model/host.rb: if fp.data.kind_of?(Hash) and !fp.data.empty? | |
./lib/msf/core/model/host.rb- return true | |
./lib/msf/core/model/host.rb- else | |
./lib/msf/core/model/host.rb- dlog("Could not validate fingerprint data: #{fp.inspect}") | |
-- | |
./lib/msf/core/db_export.rb: user = (c.user.nil? || c.user.empty?) ? "<BLANK>" : c.user | |
./lib/msf/core/db_export.rb: pass = (c.pass.nil? || c.pass.empty?) ? "<BLANK>" : c.pass | |
./lib/msf/core/db_export.rb- report_file.write "%s:%d:%s:::\n" % [user,c.id,pass] | |
./lib/msf/core/db_export.rb- end | |
./lib/msf/core/db_export.rb- when "smb_netv1_hash" | |
-- | |
./lib/msf/core/db_export.rb: user = (c.user.nil? || c.user.empty?) ? "<BLANK>" : c.user | |
./lib/msf/core/db_export.rb: pass = (c.pass.nil? || c.pass.empty?) ? "<BLANK>" : c.pass | |
./lib/msf/core/db_export.rb- report_file.write "%s::%s\n" % [user,pass] | |
./lib/msf/core/db_export.rb- end | |
./lib/msf/core/db_export.rb- when "smb_netv2_hash" | |
-- | |
./lib/msf/core/db_export.rb: user = (c.user.nil? || c.user.empty?) ? "<BLANK>" : c.user | |
./lib/msf/core/db_export.rb: pass = (c.pass.nil? || c.pass.empty?) ? "<BLANK>" : c.pass | |
./lib/msf/core/db_export.rb- if pass != "<BLANK>" | |
./lib/msf/core/db_export.rb- pass = (c.pass.upcase =~ /^[\x20-\x7e]*:[A-F0-9]{48}:[A-F0-9]{50,}/m) ? c.pass : "<BLANK>" | |
./lib/msf/core/db_export.rb- end | |
-- | |
./lib/msf/core/db_export.rb: user = (c.user.nil? || c.user.empty?) ? "<BLANK>" : c.user | |
./lib/msf/core/db_export.rb- key = ::File.open(c.pass) {|f| f.read f.stat.size} | |
./lib/msf/core/db_export.rb- key_id = (c.proof && c.proof[/^KEY=/]) ? c.proof[4,47] : "<NO-ID>" | |
./lib/msf/core/db_export.rb- report_file.write "#{user} '#{key_id}'\n" | |
-- | |
./lib/msf/core/db_export.rb: user = (c.user.nil? || c.user.empty?) ? "<BLANK>" : Rex::Text.ascii_safe_hex(c.user, true) | |
./lib/msf/core/db_export.rb: pass = (c.pass.nil? || c.pass.empty?) ? "<BLANK>" : Rex::Text.ascii_safe_hex(c.pass, true) | |
./lib/msf/core/db_export.rb- report_file.write "%s %s\n" % [user,pass] | |
./lib/msf/core/db_export.rb- end | |
./lib/msf/core/db_export.rb- end | |
-- | |
./lib/msf/core/plugin_manager.rb: if ((diff = new - old).empty?) | |
./lib/msf/core/plugin_manager.rb- raise RuntimeError, "No classes were loaded from #{path} in the Msf::Plugin namespace." | |
./lib/msf/core/plugin_manager.rb- end | |
./lib/msf/core/plugin_manager.rb- | |
-- | |
./lib/msf/core/db_manager.rb: if(not self.drivers.empty?) | |
./lib/msf/core/db_manager.rb- self.driver = self.drivers[0] | |
./lib/msf/core/db_manager.rb- end | |
./lib/msf/core/db_manager.rb- | |
-- | |
./lib/msf/core/encoded_payload.rb: if (save_regs.empty? == true) | |
./lib/msf/core/encoded_payload.rb- save_regs = nil | |
./lib/msf/core/encoded_payload.rb- end | |
./lib/msf/core/encoded_payload.rb- | |
-- | |
./lib/msf/core/exploit/capture.rb: if(not cap.empty?) | |
./lib/msf/core/exploit/capture.rb- if(not File.exists?(cap)) | |
./lib/msf/core/exploit/capture.rb- raise RuntimeError, "The PCAP file #{cap} could not be found" | |
./lib/msf/core/exploit/capture.rb- end | |
-- | |
./lib/msf/core/exploit/capture.rb: elsif (arp and !self.arp_capture and cap.empty?) | |
./lib/msf/core/exploit/capture.rb- raise RuntimeError, "Could not start the ARP capture process" | |
./lib/msf/core/exploit/capture.rb- end | |
./lib/msf/core/exploit/capture.rb- | |
-- | |
./lib/msf/core/exploit/capture.rb: if(pcap_file.empty?) | |
./lib/msf/core/exploit/capture.rb- raise RuntimeError, "The PCAP file #{pcap_file} is empty" | |
./lib/msf/core/exploit/capture.rb- end | |
./lib/msf/core/exploit/capture.rb- | |
-- | |
./lib/msf/core/exploit/pdf_parse.rb: if object.empty? | |
./lib/msf/core/exploit/pdf_parse.rb- object = "#{Regexp.last_match(1)}" | |
./lib/msf/core/exploit/pdf_parse.rb- end | |
./lib/msf/core/exploit/pdf_parse.rb- else | |
-- | |
./lib/msf/core/exploit/ftp.rb: if !@ftpbuff.empty? | |
./lib/msf/core/exploit/ftp.rb- left << @ftpbuff | |
./lib/msf/core/exploit/ftp.rb- @ftpbuff = "" | |
./lib/msf/core/exploit/ftp.rb- end | |
-- | |
./lib/msf/core/exploit/smtp_deliver.rb: if datastore["USERNAME"] and not datastore["USERNAME"].empty? | |
./lib/msf/core/exploit/smtp_deliver.rb- # Have to double the username. SMTP auth is weird | |
./lib/msf/core/exploit/smtp_deliver.rb- user = "#{datastore["USERNAME"]}\0" * 2 | |
./lib/msf/core/exploit/smtp_deliver.rb- auth = Rex::Text.encode_base64("#{user}#{datastore["PASSWORD"]}") | |
-- | |
./lib/msf/core/exploit/smtp_deliver.rb: if datastore["USERNAME"] and not datastore["USERNAME"].empty? | |
./lib/msf/core/exploit/smtp_deliver.rb- user = Rex::Text.encode_base64("#{datastore["USERNAME"]}") | |
./lib/msf/core/exploit/smtp_deliver.rb- auth = Rex::Text.encode_base64("#{datastore["PASSWORD"]}") | |
./lib/msf/core/exploit/smtp_deliver.rb- raw_send_recv("AUTH LOGIN\r\n",nsock) | |
-- | |
./lib/msf/core/exploit/smtp_deliver.rb: if datastore['PASSWORD'] and datastore["USERNAME"] and not datastore["USERNAME"].empty? | |
./lib/msf/core/exploit/smtp_deliver.rb- # Let the user know their creds are going unused | |
./lib/msf/core/exploit/smtp_deliver.rb- print_verbose("Server didn't ask for authentication, skipping") | |
./lib/msf/core/exploit/smtp_deliver.rb- end | |
-- | |
./lib/msf/core/exploit/ipv6.rb: next if pkt.payload.empty? | |
./lib/msf/core/exploit/ipv6.rb- next unless pkt.payload[0,1] == "\x88" # Neighbor advertisement | |
./lib/msf/core/exploit/ipv6.rb- if(IPAddr.new(pkt.ipv6_daddr).to_i == IPAddr.new(shost).to_i and | |
./lib/msf/core/exploit/ipv6.rb- IPAddr.new(pkt.ipv6_saddr).to_i == IPAddr.new(dhost).to_i) | |
-- | |
./lib/msf/core/exploit/ipv6.rb: next if response_pkt.payload.empty? | |
./lib/msf/core/exploit/ipv6.rb- next unless response_pkt.payload[0,1] == "\x81" # Echo reply | |
./lib/msf/core/exploit/ipv6.rb- if( response_pkt.ipv6_daddr == p.ipv6_saddr and | |
./lib/msf/core/exploit/ipv6.rb- response_pkt.ipv6_saddr == p.ipv6_daddr and | |
-- | |
./lib/msf/core/exploit/smb.rb: return user if(user.nil? || user.empty?) | |
./lib/msf/core/exploit/smb.rb- if !user[/\//] # Only /, not \! | |
./lib/msf/core/exploit/smb.rb- return [nil,user] | |
./lib/msf/core/exploit/smb.rb- else | |
-- | |
./lib/msf/core/exploit/mssql.rb: if(res[:errors] and not res[:errors].empty?) | |
./lib/msf/core/exploit/mssql.rb- if(res[:errors].join =~ /xp_cmdshell/) | |
./lib/msf/core/exploit/mssql.rb- if(force_enable) | |
./lib/msf/core/exploit/mssql.rb- print_error("The xp_cmdshell procedure is not available and could not be enabled") | |
-- | |
./lib/msf/core/exploit/mssql.rb: if(info[:errors] and not info[:errors].empty?) | |
./lib/msf/core/exploit/mssql.rb- info[:errors].each do |err| | |
./lib/msf/core/exploit/mssql.rb- print_error(err) | |
./lib/msf/core/exploit/mssql.rb- end | |
-- | |
./lib/msf/core/exploit/mssql.rb: if(info[:rows] and not info[:rows].empty?) | |
./lib/msf/core/exploit/mssql.rb- | |
./lib/msf/core/exploit/mssql.rb- tbl = Rex::Ui::Text::Table.new( | |
./lib/msf/core/exploit/mssql.rb- 'Indent' => 1, | |
-- | |
./lib/msf/core/exploit/mssql.rb: until data.empty? | |
./lib/msf/core/exploit/mssql.rb- token = data.slice!(0,1).unpack('C')[0] | |
./lib/msf/core/exploit/mssql.rb- case token | |
./lib/msf/core/exploit/mssql.rb- when 0x81 | |
-- | |
./lib/msf/core/exploit/sunrpc.rb: next if line.empty? || line =~ /^\s*#/ | |
./lib/msf/core/exploit/sunrpc.rb- | |
./lib/msf/core/exploit/sunrpc.rb- if line =~ /^(\S+?)\s+(\d+)/ && number == $2.to_i | |
./lib/msf/core/exploit/sunrpc.rb- return $1 | |
-- | |
./lib/msf/core/exploit/wdbrpc_client.rb: if res.empty? | |
./lib/msf/core/exploit/wdbrpc_client.rb- print_error("#{rhost}: No response from the target") | |
./lib/msf/core/exploit/wdbrpc_client.rb- return | |
./lib/msf/core/exploit/wdbrpc_client.rb- end | |
-- | |
./lib/msf/util/exe.rb: next if line.empty? | |
./lib/msf/util/exe.rb- | |
./lib/msf/util/exe.rb- if (rand(2) == 0) | |
./lib/msf/util/exe.rb- wrapper << "nop\n" | |
-- | |
./lib/msf/util/exe.rb: next if line.empty? | |
./lib/msf/util/exe.rb- | |
./lib/msf/util/exe.rb- if (cnt_nop > 0 and rand(4) == 0) | |
./lib/msf/util/exe.rb- wrapper << "nop\n" | |
-- | |
./lib/msf/util/svn.rb: next if line.empty? | |
./lib/msf/util/svn.rb- case line | |
./lib/msf/util/svn.rb- when /framework3/ | |
./lib/msf/util/svn.rb- info[:root] = line | |
-- | |
./lib/msf/ui/console/driver.rb: if ! buff.empty? | |
./lib/msf/ui/console/driver.rb- print_status("resource (#{path})> Ruby Code (#{buff.length} bytes)") | |
./lib/msf/ui/console/driver.rb- begin | |
./lib/msf/ui/console/driver.rb- eval(buff, bin) | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: framework.db.workspaces.map { |s| s.name } if (words & ['-a','--add']).empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
./lib/msf/ui/console/command_dispatcher/db.rb- | |
./lib/msf/ui/console/command_dispatcher/db.rb- def cmd_hosts_help | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: host_ranges.push(nil) if host_ranges.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- | |
./lib/msf/ui/console/command_dispatcher/db.rb- each_host_range_chunk(host_ranges) do |host_search| | |
./lib/msf/ui/console/command_dispatcher/db.rb- framework.db.hosts(framework.db.workspace, onlyup, host_search).each do |host| | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: host_ranges.push(nil) if host_ranges.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb: ports = nil if ports.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- | |
./lib/msf/ui/console/command_dispatcher/db.rb- each_host_range_chunk(host_ranges) do |host_search| | |
./lib/msf/ui/console/command_dispatcher/db.rb- framework.db.services(framework.db.workspace, onlyup, proto, host_search, ports, names).each do |service| | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: host_ranges.push(nil) if host_ranges.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- ports = port_ranges.flatten.uniq | |
./lib/msf/ui/console/command_dispatcher/db.rb- svcs.flatten! | |
./lib/msf/ui/console/command_dispatcher/db.rb- | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: next unless ports.empty? or ports.include? vuln.service.port | |
./lib/msf/ui/console/command_dispatcher/db.rb- # Same for service names | |
./lib/msf/ui/console/command_dispatcher/db.rb: next unless svcs.empty? or svcs.include?(vuln.service.name) | |
./lib/msf/ui/console/command_dispatcher/db.rb- print_status("Time: #{vuln.created_at} Vuln: host=#{host.address} port=#{vuln.service.port} proto=#{vuln.service.proto} name=#{vuln.name} refs=#{reflist.join(',')}") | |
./lib/msf/ui/console/command_dispatcher/db.rb- else | |
./lib/msf/ui/console/command_dispatcher/db.rb- # This vuln has no service, so it can't match | |
./lib/msf/ui/console/command_dispatcher/db.rb: next unless ports.empty? and svcs.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- print_status("Time: #{vuln.created_at} Vuln: host=#{host.address} name=#{vuln.name} refs=#{reflist.join(',')}") | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: next unless host_ranges.empty? or includes | |
./lib/msf/ui/console/command_dispatcher/db.rb- | |
./lib/msf/ui/console/command_dispatcher/db.rb- # Same for ports | |
./lib/msf/ui/console/command_dispatcher/db.rb: next unless ports.empty? or ports.include? cred.service.port | |
./lib/msf/ui/console/command_dispatcher/db.rb- | |
./lib/msf/ui/console/command_dispatcher/db.rb- # Same for service names | |
./lib/msf/ui/console/command_dispatcher/db.rb: next unless svcs.empty? or svcs.include?(cred.service.name) | |
./lib/msf/ui/console/command_dispatcher/db.rb- | |
./lib/msf/ui/console/command_dispatcher/db.rb- if user_regex | |
./lib/msf/ui/console/command_dispatcher/db.rb- next unless user_regex.match(cred.user) | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: if host_ranges.empty? # No host specified - collect all notes | |
./lib/msf/ui/console/command_dispatcher/db.rb- note_list = framework.db.notes | |
./lib/msf/ui/console/command_dispatcher/db.rb- else # Collect notes of specified hosts | |
./lib/msf/ui/console/command_dispatcher/db.rb- each_host_range_chunk(host_ranges) do |host_search| | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: host_ranges.push(nil) if host_ranges.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- | |
./lib/msf/ui/console/command_dispatcher/db.rb- each_host_range_chunk(host_ranges) do |host_search| | |
./lib/msf/ui/console/command_dispatcher/db.rb- framework.db.hosts(framework.db.workspace, false, host_search).each do |host| | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: if files.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- print_error("No such file #{glob}") | |
./lib/msf/ui/console/command_dispatcher/db.rb- next | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: next if nmap_out.strip.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- print_status "Nmap: #{nmap_out.strip}" | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: next if nmap_err.strip.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- print_status "Nmap: '#{nmap_err.strip}'" | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: if rhosts.empty? | |
./lib/msf/ui/console/command_dispatcher/db.rb- print_status "The list is empty, cowardly refusing to set RHOSTS" | |
./lib/msf/ui/console/command_dispatcher/db.rb- return | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
-- | |
./lib/msf/ui/console/command_dispatcher/db.rb: if(not missed.empty?) | |
./lib/msf/ui/console/command_dispatcher/db.rb- print_error("This database command requires the following tools to be installed: #{missed.join(", ")}") | |
./lib/msf/ui/console/command_dispatcher/db.rb- return | |
./lib/msf/ui/console/command_dispatcher/db.rb- end | |
-- | |
./lib/msf/ui/console/command_dispatcher/core.rb: if args.empty? | |
./lib/msf/ui/console/command_dispatcher/core.rb- cmd_resource_help | |
./lib/msf/ui/console/command_dispatcher/core.rb- return false | |
./lib/msf/ui/console/command_dispatcher/core.rb- end | |
-- | |
./lib/msf/ui/console/command_dispatcher/core.rb: if args.empty? | |
./lib/msf/ui/console/command_dispatcher/core.rb- cmd_makerc_help | |
./lib/msf/ui/console/command_dispatcher/core.rb- return false | |
./lib/msf/ui/console/command_dispatcher/core.rb- end | |
-- | |
./lib/msf/ui/console/command_dispatcher/core.rb: if args.include?('-h') or args.empty? | |
./lib/msf/ui/console/command_dispatcher/core.rb- cmd_spool_help | |
./lib/msf/ui/console/command_dispatcher/core.rb- return | |
./lib/msf/ui/console/command_dispatcher/core.rb- end | |
-- | |
./lib/msf/ui/console/command_dispatcher/core.rb: if (res.empty?) | |
./lib/msf/ui/console/command_dispatcher/core.rb- res << (rand(65534)+1).to_s | |
./lib/msf/ui/console/command_dispatcher/core.rb- end | |
./lib/msf/ui/console/command_dispatcher/core.rb- | |
-- | |
./lib/bit-struct/bit-struct.rb: @note = str unless str.empty? | |
./lib/bit-struct/bit-struct.rb- @note | |
./lib/bit-struct/bit-struct.rb- end | |
./lib/bit-struct/bit-struct.rb- end | |
-- | |
./lib/active_record/named_scope.rb: @found ? @found.empty? : count.zero? | |
./lib/active_record/named_scope.rb- end | |
./lib/active_record/named_scope.rb- | |
./lib/active_record/named_scope.rb- def respond_to?(method, include_private = false) | |
-- | |
./lib/active_record/associations.rb: # * <tt>Project#milestones.empty?, Project#milestones.size, Project#milestones, Project#milestones<<(milestone),</tt> | |
./lib/active_record/associations.rb- # <tt>Project#milestones.delete(milestone), Project#milestones.find(milestone_id), Project#milestones.find(:all, options),</tt> | |
./lib/active_record/associations.rb- # <tt>Project#milestones.build, Project#milestones.create</tt> | |
./lib/active_record/associations.rb: # * <tt>Project#categories.empty?, Project#categories.size, Project#categories, Project#categories<<(category1),</tt> | |
./lib/active_record/associations.rb- # <tt>Project#categories.delete(category1)</tt> | |
./lib/active_record/associations.rb- # | |
./lib/active_record/associations.rb- # === A word of warning | |
-- | |
./lib/active_record/associations.rb: # others.empty? | X | X | X | |
./lib/active_record/associations.rb- # others.clear | X | X | X | |
./lib/active_record/associations.rb- # others.delete(other,other,...) | X | X | X | |
./lib/active_record/associations.rb- # others.delete_all | X | X | | |
-- | |
./lib/active_record/associations.rb: # project.milestones.empty? # uses the milestone cache | |
./lib/active_record/associations.rb- # project.milestones(true).size # fetches milestones from the database | |
./lib/active_record/associations.rb- # project.milestones # uses the milestone cache | |
./lib/active_record/associations.rb- # | |
-- | |
./lib/active_record/associations.rb: # [collection.empty?] | |
./lib/active_record/associations.rb- # Returns +true+ if there are no associated objects. | |
./lib/active_record/associations.rb- # [collection.size] | |
./lib/active_record/associations.rb- # Returns the number of associated objects. | |
-- | |
./lib/active_record/associations.rb: # <tt>has_many :clients</tt> would add among others <tt>clients.empty?</tt>.) | |
./lib/active_record/associations.rb- # | |
./lib/active_record/associations.rb- # === Example | |
./lib/active_record/associations.rb- # | |
-- | |
./lib/active_record/associations.rb: # * <tt>Firm#clients.empty?</tt> (similar to <tt>firm.clients.size == 0</tt>) | |
./lib/active_record/associations.rb- # * <tt>Firm#clients.size</tt> (similar to <tt>Client.count "firm_id = #{id}"</tt>) | |
./lib/active_record/associations.rb- # * <tt>Firm#clients.find</tt> (similar to <tt>Client.find(id, :conditions => "firm_id = #{id}")</tt>) | |
./lib/active_record/associations.rb- # * <tt>Firm#clients.exists?(:name => 'ACME')</tt> (similar to <tt>Client.exists?(:name => 'ACME', :firm_id => firm.id)</tt>) | |
-- | |
./lib/active_record/associations.rb: # [collection.empty?] | |
./lib/active_record/associations.rb- # Returns +true+ if there are no associated objects. | |
./lib/active_record/associations.rb- # [collection.size] | |
./lib/active_record/associations.rb- # Returns the number of associated objects. | |
-- | |
./lib/active_record/associations.rb: # <tt>has_and_belongs_to_many :categories</tt> would add among others <tt>categories.empty?</tt>.) | |
./lib/active_record/associations.rb- # | |
./lib/active_record/associations.rb- # === Example | |
./lib/active_record/associations.rb- # | |
-- | |
./lib/active_record/associations.rb: # * <tt>Developer#projects.empty?</tt> | |
./lib/active_record/associations.rb- # * <tt>Developer#projects.size</tt> | |
./lib/active_record/associations.rb- # * <tt>Developer#projects.find(id)</tt> | |
./lib/active_record/associations.rb- # * <tt>Developer#clients.exists?(...)</tt> | |
-- | |
./lib/active_record/associations.rb: force_reload = params.first unless params.empty? | |
./lib/active_record/associations.rb- association = association_instance_get(reflection.name) | |
./lib/active_record/associations.rb- | |
./lib/active_record/associations.rb- if association.nil? || force_reload | |
-- | |
./lib/active_record/associations.rb: force_reload = params.first unless params.empty? | |
./lib/active_record/associations.rb- association = association_instance_get(reflection.name) | |
./lib/active_record/associations.rb- | |
./lib/active_record/associations.rb- unless association | |
-- | |
./lib/active_record/associations.rb: attributees = params.first unless params.empty? | |
./lib/active_record/associations.rb- replace_existing = params[1].nil? ? true : params[1] | |
./lib/active_record/associations.rb- association = association_instance_get(reflection.name) | |
./lib/active_record/associations.rb- | |
-- | |
./lib/active_record/associations.rb: unless (id_list = select_limited_ids_list(options, join_dependency)).empty? | |
./lib/active_record/associations.rb- sql << "#{condition_word(sql)} #{connection.quote_table_name table_name}.#{primary_key} IN (#{id_list}) " | |
./lib/active_record/associations.rb- else | |
./lib/active_record/associations.rb- throw :invalid_query | |
-- | |
./lib/active_record/associations.rb: remove_duplicate_results!(reflection.klass, parent_records, associations[name]) unless parent_records.empty? | |
./lib/active_record/associations.rb- end | |
./lib/active_record/associations.rb- end | |
./lib/active_record/associations.rb- end | |
-- | |
./lib/active_record/validations.rb: is_empty = value.respond_to?(:empty?) ? value.empty? : false | |
./lib/active_record/validations.rb- add(attr, :empty, :default => custom_message) unless !value.nil? && !is_empty | |
./lib/active_record/validations.rb- end | |
./lib/active_record/validations.rb- end | |
-- | |
./lib/active_record/validations.rb: @errors.empty? | |
./lib/active_record/validations.rb- end | |
./lib/active_record/validations.rb- | |
./lib/active_record/validations.rb- # Removes all errors that have been added. | |
-- | |
./lib/active_record/validations.rb: # person.errors.empty? # => false | |
./lib/active_record/validations.rb- # person.errors.count # => 2 | |
./lib/active_record/validations.rb- # person.errors.on "last_name" # => "can't be empty" | |
./lib/active_record/validations.rb- # person.errors.on "phone_number" # => "has invalid format" | |
-- | |
./lib/active_record/validations.rb: errors.empty? | |
./lib/active_record/validations.rb- end | |
./lib/active_record/validations.rb- | |
./lib/active_record/validations.rb- # Performs the opposite of <tt>valid?</tt>. Returns true if errors were added, false otherwise. | |
-- | |
./lib/active_record/dirty.rb: !changed_attributes.empty? | |
./lib/active_record/dirty.rb- end | |
./lib/active_record/dirty.rb- | |
./lib/active_record/dirty.rb- # List of attributes with unsaved changes. | |
-- | |
./lib/active_record/base.rb: "(#{segments.join(') AND (')})" unless segments.empty? | |
./lib/active_record/base.rb- end | |
./lib/active_record/base.rb- | |
./lib/active_record/base.rb- private | |
-- | |
./lib/active_record/base.rb: return ids.first if expects_array && ids.first.empty? | |
./lib/active_record/base.rb- | |
./lib/active_record/base.rb- ids = ids.flatten.compact.uniq | |
./lib/active_record/base.rb- | |
-- | |
./lib/active_record/base.rb: if subclass_name.empty? | |
./lib/active_record/base.rb- allocate | |
./lib/active_record/base.rb- | |
./lib/active_record/base.rb- else | |
-- | |
./lib/active_record/base.rb: if value.respond_to?(:empty?) && value.empty? | |
./lib/active_record/base.rb- connection.quote(nil) | |
./lib/active_record/base.rb- else | |
./lib/active_record/base.rb- value.map { |v| connection.quote(v) }.join(',') | |
-- | |
./lib/active_record/base.rb: return 0 if quoted_attributes.empty? | |
./lib/active_record/base.rb- connection.update( | |
./lib/active_record/base.rb- "UPDATE #{self.class.quoted_table_name} " + | |
./lib/active_record/base.rb- "SET #{quoted_comma_pair_list(connection, quoted_attributes)} " + | |
-- | |
./lib/active_record/base.rb: statement = if quoted_attributes.empty? | |
./lib/active_record/base.rb- connection.empty_insert_statement(self.class.table_name) | |
./lib/active_record/base.rb- else | |
./lib/active_record/base.rb- "INSERT INTO #{self.class.quoted_table_name} " + | |
-- | |
./lib/active_record/base.rb: if values.empty? | |
./lib/active_record/base.rb- send(name + "=", nil) | |
./lib/active_record/base.rb- else | |
./lib/active_record/base.rb- | |
-- | |
./lib/active_record/base.rb: unless errors.empty? | |
./lib/active_record/base.rb- raise MultiparameterAssignmentErrors.new(errors), "#{errors.size} error(s) on assignment of multiparameter attributes" | |
./lib/active_record/base.rb- end | |
./lib/active_record/base.rb- end | |
-- | |
./lib/active_record/base.rb: parameter_value = value.empty? ? nil : type_cast_attribute_value(multiparameter_name, value) | |
./lib/active_record/base.rb- attributes[attribute_name] << [ find_parameter_position(multiparameter_name), parameter_value ] | |
./lib/active_record/base.rb- end | |
./lib/active_record/base.rb- | |
-- | |
./lib/active_record/fixtures.rb:# assert !Foo.find(:all).empty? | |
./lib/active_record/fixtures.rb-# Foo.destroy_all | |
./lib/active_record/fixtures.rb:# assert Foo.find(:all).empty? | |
./lib/active_record/fixtures.rb-# end | |
./lib/active_record/fixtures.rb-# | |
./lib/active_record/fixtures.rb-# test "godzilla aftermath" do | |
./lib/active_record/fixtures.rb:# assert !Foo.find(:all).empty? | |
./lib/active_record/fixtures.rb-# end | |
./lib/active_record/fixtures.rb-# end | |
./lib/active_record/fixtures.rb-# | |
-- | |
./lib/active_record/fixtures.rb: unless table_names_to_fetch.empty? | |
./lib/active_record/fixtures.rb- ActiveRecord::Base.silence do | |
./lib/active_record/fixtures.rb- connection.disable_referential_integrity do | |
./lib/active_record/fixtures.rb- fixtures_map = {} | |
-- | |
./lib/active_record/fixtures.rb: raise RuntimeError, 'Load fixtures before instantiating them.' if Fixtures.all_loaded_fixtures.empty? | |
./lib/active_record/fixtures.rb- unless @@required_fixture_classes | |
./lib/active_record/fixtures.rb- self.class.require_fixture_classes Fixtures.all_loaded_fixtures.keys | |
./lib/active_record/fixtures.rb- @@required_fixture_classes = true | |
-- | |
./lib/active_record/migration.rb: # Tag.find(:all).each { |tag| tag.destroy if tag.pages.empty? } | |
./lib/active_record/migration.rb- # end | |
./lib/active_record/migration.rb- # | |
./lib/active_record/migration.rb- # def self.down | |
-- | |
./lib/active_record/migration.rb: unless arguments.empty? || method == :execute | |
./lib/active_record/migration.rb- arguments[0] = Migrator.proper_table_name(arguments.first) | |
./lib/active_record/migration.rb- end | |
./lib/active_record/migration.rb- connection.send(method, *arguments, &block) | |
-- | |
./lib/active_record/attribute_methods.rb: !generated_methods.empty? | |
./lib/active_record/attribute_methods.rb- end | |
./lib/active_record/attribute_methods.rb- | |
./lib/active_record/attribute_methods.rb- # Generates all the attribute related methods for columns in the database | |
-- | |
./lib/active_record/test_case.rb: assert failed_patterns.empty?, "Query pattern(s) #{failed_patterns.map(&:inspect).join(', ')} not found." | |
./lib/active_record/test_case.rb- end | |
./lib/active_record/test_case.rb- | |
./lib/active_record/test_case.rb- def assert_queries(num = 1) | |
-- | |
./lib/active_record/i18n_interpolation_deprecation.rb: return string unless string.is_a?(String) && !values.empty? | |
./lib/active_record/i18n_interpolation_deprecation.rb- | |
./lib/active_record/i18n_interpolation_deprecation.rb- string = string.gsub(/%d|%s/) do |s| | |
./lib/active_record/i18n_interpolation_deprecation.rb- instead = DEPRECATED_INTERPOLATORS[s] | |
-- | |
./lib/active_record/association_preload.rb: return if records.empty? | |
./lib/active_record/association_preload.rb- case associations | |
./lib/active_record/association_preload.rb- when Array then associations.each {|association| preload_associations(records, association, preload_options)} | |
./lib/active_record/association_preload.rb- when Symbol, String then preload_one_association(records, associations.to_sym, preload_options) | |
-- | |
./lib/active_record/association_preload.rb: unless parents.empty? | |
./lib/active_record/association_preload.rb- parents.first.class.preload_associations(parents, child) | |
./lib/active_record/association_preload.rb- end | |
./lib/active_record/association_preload.rb- end | |
-- | |
./lib/active_record/association_preload.rb: unless through_records.empty? | |
./lib/active_record/association_preload.rb- source = reflection.source_reflection.name | |
./lib/active_record/association_preload.rb- through_records.first.class.preload_associations(through_records, source) | |
./lib/active_record/association_preload.rb- if through_reflection.macro == :belongs_to | |
-- | |
./lib/active_record/association_preload.rb: unless through_records.empty? | |
./lib/active_record/association_preload.rb- source = reflection.source_reflection.name | |
./lib/active_record/association_preload.rb- through_records.first.class.preload_associations(through_records, source, options) | |
./lib/active_record/association_preload.rb- through_records.each do |through_record| | |
-- | |
./lib/active_record/association_preload.rb: next if id_map.empty? | |
./lib/active_record/association_preload.rb- klass = klass_name.constantize | |
./lib/active_record/association_preload.rb- | |
./lib/active_record/association_preload.rb- table_name = klass.quoted_table_name | |
-- | |
./lib/active_record/serializers/xml_serializer.rb: if records.empty? | |
./lib/active_record/serializers/xml_serializer.rb- builder.tag!(tag, type) | |
./lib/active_record/serializers/xml_serializer.rb- else | |
./lib/active_record/serializers/xml_serializer.rb- builder.tag!(tag, type) do | |
-- | |
./lib/active_record/locking/optimistic.rb: return 0 if attribute_names.empty? | |
./lib/active_record/locking/optimistic.rb- | |
./lib/active_record/locking/optimistic.rb- lock_col = self.class.locking_column | |
./lib/active_record/locking/optimistic.rb- previous_value = send(lock_col).to_i | |
-- | |
./lib/active_record/connection_adapters/mysql_adapter.rb: variables.first['Value'] unless variables.empty? | |
./lib/active_record/connection_adapters/mysql_adapter.rb- end | |
./lib/active_record/connection_adapters/mysql_adapter.rb- | |
./lib/active_record/connection_adapters/mysql_adapter.rb- # Returns a table's primary key and belonging sequence. | |
-- | |
./lib/active_record/connection_adapters/postgresql_adapter.rb: if result.nil? or result.empty? | |
./lib/active_record/connection_adapters/postgresql_adapter.rb- # If that fails, try parsing the primary key's default value. | |
./lib/active_record/connection_adapters/postgresql_adapter.rb- # Support the 7.x and 8.0 nextval('foo'::text) as well as | |
./lib/active_record/connection_adapters/postgresql_adapter.rb- # the 8.1+ nextval('foo'::regclass). | |
-- | |
./lib/active_record/connection_adapters/sqlite3_adapter.rb: raise(ActiveRecord::StatementInvalid, "Could not find table '#{table_name}'") if structure.empty? | |
./lib/active_record/connection_adapters/sqlite3_adapter.rb- end | |
./lib/active_record/connection_adapters/sqlite3_adapter.rb- end | |
./lib/active_record/connection_adapters/sqlite3_adapter.rb- end | |
-- | |
./lib/active_record/connection_adapters/abstract/connection_pool.rb: !@connections.empty? | |
./lib/active_record/connection_adapters/abstract/connection_pool.rb- end | |
./lib/active_record/connection_adapters/abstract/connection_pool.rb- | |
./lib/active_record/connection_adapters/abstract/connection_pool.rb- # Disconnects all connections in the pool, and clears the pool. | |
-- | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb: return nil if string.empty? | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb- | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb- fast_string_to_date(string) || fallback_string_to_date(string) | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb- end | |
-- | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb: return nil if string.empty? | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb- | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb- fast_string_to_time(string) || fallback_string_to_time(string) | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb- end | |
-- | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb: return nil if string.empty? | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb- | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb- string_to_time "2000-01-01 #{string}" | |
./lib/active_record/connection_adapters/abstract/schema_definitions.rb- end | |
-- | |
./lib/active_record/connection_adapters/sqlite_adapter.rb: raise(ActiveRecord::StatementInvalid, "Could not find table '#{table_name}'") if structure.empty? | |
./lib/active_record/connection_adapters/sqlite_adapter.rb- end | |
./lib/active_record/connection_adapters/sqlite_adapter.rb- end | |
./lib/active_record/connection_adapters/sqlite_adapter.rb- | |
-- | |
./lib/active_record/connection_adapters/sqlite_adapter.rb: unless columns.empty? | |
./lib/active_record/connection_adapters/sqlite_adapter.rb- # index name can't be the same | |
./lib/active_record/connection_adapters/sqlite_adapter.rb- opts = { :name => name.gsub(/_(#{from})_/, "_#{to}_") } | |
./lib/active_record/connection_adapters/sqlite_adapter.rb- opts[:unique] = true if index.unique | |
-- | |
./lib/rapid7/nexpose.rb: if (to and not to.empty?) | |
./lib/rapid7/nexpose.rb- return %Q{<range from="#{from}" to="#{to}"/>} | |
./lib/rapid7/nexpose.rb- else | |
./lib/rapid7/nexpose.rb- return %Q{<range from="#{from}"/>} | |
-- | |
./lib/packetfu/packetfu/packet.rb: if hex_body && !hex_body.empty? | |
./lib/packetfu/packetfu/packet.rb- table << "-" * 66 | |
./lib/packetfu/packetfu/packet.rb- table << "\n" | |
./lib/packetfu/packetfu/packet.rb- table << "00-01-02-03-04-05-06-07-08-09-0a-0b-0c-0d-0e-0f---0123456789abcdef\n" | |
-- | |
./lib/rbreadline.rb: if @if_stack.empty? | |
./lib/rbreadline.rb- #_rl_init_file_error ("$else found without matching $if") | |
./lib/rbreadline.rb- return 0 | |
./lib/rbreadline.rb- end | |
-- | |
./lib/rbreadline.rb: break unless mbchar.scan(/./me).empty? | |
./lib/rbreadline.rb- when 'S' | |
./lib/rbreadline.rb: break unless mbchar.scan(/./ms).empty? | |
./lib/rbreadline.rb- when 'U' | |
./lib/rbreadline.rb: break unless mbchar.scan(/./mu).empty? | |
./lib/rbreadline.rb- when 'X' | |
./lib/rbreadline.rb- break if mbchar.dup.force_encoding(@encoding_name).valid_encoding? | |
./lib/rbreadline.rb- end | |
-- | |
./lib/rbmysql.rb: if params.empty? | |
./lib/rbmysql.rb- res = simple_query(str, &block) | |
./lib/rbmysql.rb- else | |
./lib/rbmysql.rb- res = prepare_query(str, *params, &block) | |
-- | |
./lib/rbmysql.rb: if st.fields.empty? | |
./lib/rbmysql.rb- @affected_rows = st.affected_rows | |
./lib/rbmysql.rb- @insert_id = st.insert_id | |
./lib/rbmysql.rb- @server_status = st.server_status | |
-- | |
./lib/rbmysql.rb: if args.empty? | |
./lib/rbmysql.rb- param = {} | |
./lib/rbmysql.rb- elsif args.size == 1 and args.first.is_a? Hash | |
./lib/rbmysql.rb- arg = args.first.dup | |
-- | |
./lib/rbmysql.rb: param[:db] = uri.path.split(/\/+/).reject{|a|a.empty?}.first | |
./lib/rbmysql.rb- if uri.query | |
./lib/rbmysql.rb- uri.query.split(/\&/).each do |a| | |
./lib/rbmysql.rb- k, v = a.split(/\=/, 2) | |
-- | |
./lib/postgres/postgres-pr/message.rb: raise ArgumentError if field_type == 0 and not field_values.empty? | |
./lib/postgres/postgres-pr/message.rb- @field_type, @field_values = field_type, field_values | |
./lib/postgres/postgres-pr/message.rb- end | |
./lib/postgres/postgres-pr/message.rb- | |
-- | |
./lib/postgres/postgres-pr/message.rb: raise ArgumentError if @field_type == 0 and not @field_values.empty? | |
./lib/postgres/postgres-pr/message.rb- | |
./lib/postgres/postgres-pr/message.rb- sz = 1 | |
./lib/postgres/postgres-pr/message.rb- sz += @field_values.inject(1) {|sum, fld| sum + fld.size + 1} unless @field_type == 0 | |
-- | |
./lib/postgres/postgres-pr/typeconv/array.rb: raise ConversionError, "end of string expected (#{buf.rest})" unless buf.empty? | |
./lib/postgres/postgres-pr/typeconv/array.rb- end | |
./lib/postgres/postgres-pr/typeconv/array.rb- | |
./lib/postgres/postgres-pr/typeconv/array.rb- private | |
-- | |
./lib/postgres/postgres-pr/connection.rb: raise errors.map{|e| e.field_values.join("\t") }.join("\n") unless errors.empty? | |
./lib/postgres/postgres-pr/connection.rb- | |
./lib/postgres/postgres-pr/connection.rb- result | |
./lib/postgres/postgres-pr/connection.rb- end | |
-- | |
./lib/rex/machscan/scanner.rb: if !calls.empty? | |
./lib/rex/machscan/scanner.rb- regexstr += "\xff[#{calls}]|" | |
./lib/rex/machscan/scanner.rb- end | |
./lib/rex/machscan/scanner.rb- | |
-- | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_server_channel.rb: if( @@server_channels[self].empty? ) | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_server_channel.rb- Rex::ThreadSafe.sleep( 0.2 ) | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_server_channel.rb- next | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_server_channel.rb- end | |
-- | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb: if( @datagrams.empty? ) | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb- Rex::ThreadSafe.sleep( 0.2 ) | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb- next | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb- end | |
-- | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb: if( @datagrams.empty? ) | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb- Rex::ThreadSafe.sleep( 0.2 ) | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb- next | |
./lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb- end | |
-- | |
./lib/rex/post/meterpreter/client_core.rb: if( process['arch'] == nil or process['arch'].empty? ) | |
./lib/rex/post/meterpreter/client_core.rb- raise RuntimeError, "Cannot migrate into this process (insufficient privileges)", caller | |
./lib/rex/post/meterpreter/client_core.rb- end | |
./lib/rex/post/meterpreter/client_core.rb- | |
-- | |
./lib/rex/post/meterpreter/packet_dispatcher.rb: if @ping_sent and @pqueue.empty? and (Time.now - @last_recvd > ping_time * 2) | |
./lib/rex/post/meterpreter/packet_dispatcher.rb- dlog("No response to ping, session #{self.sid} is dead", LEV_3) | |
./lib/rex/post/meterpreter/packet_dispatcher.rb- self.alive = false | |
./lib/rex/post/meterpreter/packet_dispatcher.rb- @finish = true | |
-- | |
./lib/rex/post/meterpreter/packet_dispatcher.rb: if not @ping_sent and @pqueue.empty? | |
./lib/rex/post/meterpreter/packet_dispatcher.rb- # Our 'ping' is actually just a check for eof on | |
./lib/rex/post/meterpreter/packet_dispatcher.rb- # channel id 0. This method has no side effects | |
./lib/rex/post/meterpreter/packet_dispatcher.rb- # and always returns an answer (regardless of the | |
-- | |
./lib/rex/post/meterpreter/packet_dispatcher.rb: if(@pqueue.empty?) | |
./lib/rex/post/meterpreter/packet_dispatcher.rb- ::IO.select(nil, nil, nil, 0.10) | |
./lib/rex/post/meterpreter/packet_dispatcher.rb- next | |
./lib/rex/post/meterpreter/packet_dispatcher.rb- end | |
-- | |
./lib/rex/post/meterpreter/client.rb: if ((diff = new - old).empty?) | |
./lib/rex/post/meterpreter/client.rb- diff = [ name.capitalize ] | |
./lib/rex/post/meterpreter/client.rb- end | |
./lib/rex/post/meterpreter/client.rb- | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb: path = (path and not path.empty?) ? path : "cmd.exe" | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb- cmd_execute("-f", path, "-c", "-H", "-i", "-t") | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb- else | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb- path = client.fs.file.expand_path("/bin/bash") | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb: if( not files.empty? ) | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- print_line( "Found #{files.length} result#{ files.length > 1 ? 's' : '' }..." ) | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- files.each do | file | | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- if( file['size'] > 0 ) | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb: print( " #{file['path']}#{ file['path'].empty? ? '' : '\\' }#{file['name']} (#{file['size']} bytes)\n" ) | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- else | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb: print( " #{file['path']}#{ file['path'].empty? ? '' : '\\' }#{file['name']}\n" ) | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- end | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- end | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- else | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb: if (args.empty? or args.include? "-h") | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- cmd_download_help | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- return true | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- end | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb: if src_items.empty? | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- src_items << last | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- # Use the basename of the remote filename so we don't end up with | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- # a file named c:\\boot.ini in linux | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb: if (args.empty? or args.include?("-h")) | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- cmd_upload_help | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- return true | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- end | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb: src_items << last if src_items.empty? | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- dest = last | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb- | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb: args.unshift("list") if args.empty? | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb- # For clarity's sake. | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb- lport = nil | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb: if args.empty? | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb- print( | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb- "Usage: resource path1 path2" + | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb- "Run the commands stored in the supplied files.\n") | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb: if files.empty? | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb- print_error("No such file #{glob}") | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb- next | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb- end | |
-- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb: next if (diff.empty?) | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb- | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb- klass = CommDispatcher.const_get(diff[0]) | |
./lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb- | |
-- | |
./lib/rex/post/file_stat.rb: update(buf) if (buf and not buf.empty?) | |
./lib/rex/post/file_stat.rb- end | |
./lib/rex/post/file_stat.rb- | |
./lib/rex/post/file_stat.rb- def dev | |
-- | |
./lib/rex/pescan/scanner.rb: if !calls.empty? | |
./lib/rex/pescan/scanner.rb- regexstr += "\xff[#{calls}]|" | |
./lib/rex/pescan/scanner.rb- end | |
./lib/rex/pescan/scanner.rb- | |
-- | |
./lib/rex/encoder/alpha2/generic.rb: if poss_encodings.empty? | |
./lib/rex/encoder/alpha2/generic.rb- raise RuntimeError, "No encoding of #{"0x%.2X" % block} possible with limited character set" | |
./lib/rex/encoder/alpha2/generic.rb- end | |
./lib/rex/encoder/alpha2/generic.rb- | |
-- | |
./lib/rex/ropbuilder/rop.rb: if gadgets.empty? and @gadgets.nil? or @gadgets.empty? | |
./lib/rex/ropbuilder/rop.rb- @stdio.print_error("No gadgets collected to convert to CSV format.") | |
./lib/rex/ropbuilder/rop.rb- return | |
./lib/rex/ropbuilder/rop.rb- end | |
-- | |
./lib/rex/ropbuilder/rop.rb: if @gadgets.empty? or @gadgets.nil? | |
./lib/rex/ropbuilder/rop.rb- @gadgets = gadgets | |
./lib/rex/ropbuilder/rop.rb- end | |
./lib/rex/ropbuilder/rop.rb- | |
-- | |
./lib/rex/ropbuilder/rop.rb: if data.empty? or data.nil? | |
./lib/rex/ropbuilder/rop.rb- return [] | |
./lib/rex/ropbuilder/rop.rb- end | |
./lib/rex/ropbuilder/rop.rb- | |
-- | |
./lib/rex/ropbuilder/rop.rb: @file = file if not file.empty? | |
./lib/rex/ropbuilder/rop.rb: @bin = Metasm::AutoExe.decode_file(file) if not file.empty? | |
./lib/rex/ropbuilder/rop.rb- @disassembler = @bin.disassembler if not @bin.nil? | |
./lib/rex/ropbuilder/rop.rb- if @disassembler | |
./lib/rex/ropbuilder/rop.rb- @disassembler.cpu = Metasm::Ia32.new('386_common') | |
-- | |
./lib/rex/parser/retina_xml.rb: next if cve.empty? | |
./lib/rex/parser/retina_xml.rb- pre,val = cve.split('-', 2) | |
./lib/rex/parser/retina_xml.rb- next if not val | |
./lib/rex/parser/retina_xml.rb- next if pre != "CVE" | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @text.to_s.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- @state[:page_response] = @text | |
./lib/rex/parser/acunetix_nokogiri.rb- end | |
./lib/rex/parser/acunetix_nokogiri.rb- | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @text.to_s.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- @state[:page_request] = @text | |
./lib/rex/parser/acunetix_nokogiri.rb- end | |
./lib/rex/parser/acunetix_nokogiri.rb- | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @text.strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- @state[:scan_name] = @text.strip | |
./lib/rex/parser/acunetix_nokogiri.rb- end | |
./lib/rex/parser/acunetix_nokogiri.rb- | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @text.strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- uri = URI.parse(@text) rescue nil | |
./lib/rex/parser/acunetix_nokogiri.rb- return unless uri | |
./lib/rex/parser/acunetix_nokogiri.rb- address = resolve_scan_starturl_address(uri) | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @text.strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- uri = URI.parse(@text) rescue nil | |
./lib/rex/parser/acunetix_nokogiri.rb- return unless uri | |
./lib/rex/parser/acunetix_nokogiri.rb- @state[:starturl_uri] = uri | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @text.strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- return unless in_tag("Scan") | |
./lib/rex/parser/acunetix_nokogiri.rb- svc_info = { | |
./lib/rex/parser/acunetix_nokogiri.rb- :host => svc.host, | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @text.strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- @state[:report_item] = @text | |
./lib/rex/parser/acunetix_nokogiri.rb- end | |
./lib/rex/parser/acunetix_nokogiri.rb- | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if method.strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- @state[:form_variables] ||= [] | |
./lib/rex/parser/acunetix_nokogiri.rb- @state[:form_variables] << [attr_hash(attrs)["Name"],method] | |
./lib/rex/parser/acunetix_nokogiri.rb- end | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @state[:form_variables].empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- method = parse_method(@state[:form_variables].first[1]) | |
./lib/rex/parser/acunetix_nokogiri.rb- vars = @state[:form_variables].map {|x| x[0]} | |
./lib/rex/parser/acunetix_nokogiri.rb- form_info = {} | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @state[:page_request].strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- return unless @state[:page_response] | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @state[:page_response].strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- path,query_string = parse_request(@state[:page_request]) | |
./lib/rex/parser/acunetix_nokogiri.rb- return unless path | |
./lib/rex/parser/acunetix_nokogiri.rb- parsed_response = parse_response(@state[:page_response]) | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if url.strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- uri = URI.parse(url) rescue nil | |
./lib/rex/parser/acunetix_nokogiri.rb- return unless uri | |
./lib/rex/parser/acunetix_nokogiri.rb- host = uri.host | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @text.strip.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- return unless in_tag("Scan") | |
./lib/rex/parser/acunetix_nokogiri.rb- host = @state[:starturl_service_object].host | |
./lib/rex/parser/acunetix_nokogiri.rb- fp_note = { | |
-- | |
./lib/rex/parser/acunetix_nokogiri.rb: return if @parse_warnings.empty? | |
./lib/rex/parser/acunetix_nokogiri.rb- @parse_warnings.each do |pwarn| | |
./lib/rex/parser/acunetix_nokogiri.rb- db.emit(:warning, pwarn, &block) if block | |
./lib/rex/parser/acunetix_nokogiri.rb- end | |
-- | |
./lib/rex/parser/mbsa_nokogiri.rb: return if @report_data[:vulns].empty? | |
./lib/rex/parser/mbsa_nokogiri.rb- @report_data[:vulns].each do |vuln| | |
./lib/rex/parser/mbsa_nokogiri.rb- next unless vuln[:refs] | |
./lib/rex/parser/mbsa_nokogiri.rb: if vuln[:refs].empty? | |
./lib/rex/parser/mbsa_nokogiri.rb- next | |
./lib/rex/parser/mbsa_nokogiri.rb- end | |
./lib/rex/parser/mbsa_nokogiri.rb- if block | |
-- | |
./lib/rex/parser/mbsa_nokogiri.rb: return if @text.to_s.strip.empty? | |
./lib/rex/parser/mbsa_nokogiri.rb- @state[:update]["Title"] = @text.to_s.strip | |
./lib/rex/parser/mbsa_nokogiri.rb- end | |
./lib/rex/parser/mbsa_nokogiri.rb- | |
-- | |
./lib/rex/parser/mbsa_nokogiri.rb: if @state[:update]["BulletinID"].empty? | |
./lib/rex/parser/mbsa_nokogiri.rb- this_update[:refs] << "URL-#{@state[:update][:url]}" | |
./lib/rex/parser/mbsa_nokogiri.rb- else | |
./lib/rex/parser/mbsa_nokogiri.rb- this_update[:refs] << "MSB-#{@state[:update]["BulletinID"]}" | |
-- | |
./lib/rex/parser/mbsa_nokogiri.rb: return if @text.strip.empty? | |
./lib/rex/parser/mbsa_nokogiri.rb- os_match = @text.match(/Computer is running (.*)/) | |
./lib/rex/parser/mbsa_nokogiri.rb- return unless os_match | |
./lib/rex/parser/mbsa_nokogiri.rb- os_info = os_match[1] | |
-- | |
./lib/rex/parser/mbsa_nokogiri.rb: return if @state[:address].strip.empty? | |
./lib/rex/parser/mbsa_nokogiri.rb- @report_data[:host] = @state[:address].strip | |
./lib/rex/parser/mbsa_nokogiri.rb: if @state[:hostname] && !@state[:hostname].empty? | |
./lib/rex/parser/mbsa_nokogiri.rb- @report_data[:name] = @state[:hostname] | |
./lib/rex/parser/mbsa_nokogiri.rb- end | |
./lib/rex/parser/mbsa_nokogiri.rb- @report_data[:state] = Msf::HostState::Alive | |
-- | |
./lib/rex/parser/foundstone_nokogiri.rb: return if @text.nil? || @text.empty? | |
./lib/rex/parser/foundstone_nokogiri.rb- @state[:service][:port] = @text.strip | |
./lib/rex/parser/foundstone_nokogiri.rb- @text = nil | |
./lib/rex/parser/foundstone_nokogiri.rb- end | |
-- | |
./lib/rex/parser/foundstone_nokogiri.rb: return if @text.nil? || @text.empty? | |
./lib/rex/parser/foundstone_nokogiri.rb- @state[:service][:proto] = @text.strip | |
./lib/rex/parser/foundstone_nokogiri.rb- @text = nil | |
./lib/rex/parser/foundstone_nokogiri.rb- end | |
-- | |
./lib/rex/parser/foundstone_nokogiri.rb: return if @text.nil? || @text.empty? | |
./lib/rex/parser/foundstone_nokogiri.rb- banner = normalize_foundstone_banner(@state[:service]["ServiceName"],@text) | |
./lib/rex/parser/foundstone_nokogiri.rb: unless banner.nil? || banner.empty? | |
./lib/rex/parser/foundstone_nokogiri.rb- @state[:service][:banner] = banner | |
./lib/rex/parser/foundstone_nokogiri.rb- end | |
./lib/rex/parser/foundstone_nokogiri.rb- @text = nil | |
-- | |
./lib/rex/parser/foundstone_nokogiri.rb: if @state[:host]["NBName"] && !@state[:host]["NBName"].empty? | |
./lib/rex/parser/foundstone_nokogiri.rb- @report_data[:name] = @state[:host]["NBName"] | |
./lib/rex/parser/foundstone_nokogiri.rb: elsif @state[:host]["DNSName"] && !@state[:host]["DNSName"].empty? | |
./lib/rex/parser/foundstone_nokogiri.rb- @report_data[:name] = @state[:host]["DNSName"] | |
./lib/rex/parser/foundstone_nokogiri.rb- end | |
./lib/rex/parser/foundstone_nokogiri.rb: if @state[:host]["OSName"] && !@state[:host]["OSName"].empty? | |
./lib/rex/parser/foundstone_nokogiri.rb- @report_data[:os_fingerprint] = @state[:host]["OSName"] | |
./lib/rex/parser/foundstone_nokogiri.rb- end | |
./lib/rex/parser/foundstone_nokogiri.rb- @report_data[:state] = Msf::HostState::Alive | |
-- | |
./lib/rex/parser/foundstone_nokogiri.rb: return if @report_data[:ports].empty? | |
./lib/rex/parser/foundstone_nokogiri.rb- @report_data[:ports].each do |svc| | |
./lib/rex/parser/foundstone_nokogiri.rb- db_report(:service, svc.merge(:host => host_object)) | |
./lib/rex/parser/foundstone_nokogiri.rb- end | |
-- | |
./lib/rex/parser/foundstone_nokogiri.rb: return if @report_data[:vulns].empty? | |
./lib/rex/parser/foundstone_nokogiri.rb- @report_data[:vulns].each do |vuln| | |
./lib/rex/parser/foundstone_nokogiri.rb- db_report(:vuln, vuln.merge(:host => host_object)) | |
./lib/rex/parser/foundstone_nokogiri.rb- end | |
-- | |
./lib/rex/parser/foundstone_nokogiri.rb: return "" if(banner.nil? || banner.strip.empty?) | |
./lib/rex/parser/foundstone_nokogiri.rb- if first_line_only? service | |
./lib/rex/parser/foundstone_nokogiri.rb- return (first_line banner) | |
./lib/rex/parser/foundstone_nokogiri.rb- elsif needs_more_processing? service | |
-- | |
./lib/rex/parser/burp_session_nokogiri.rb: return unless @state[:web_site].service.host.name.to_s.empty? | |
./lib/rex/parser/burp_session_nokogiri.rb- host_info = {:workspace => @args[:wspace]} | |
./lib/rex/parser/burp_session_nokogiri.rb- host_info[:address] = @state[:web_site].service.host.address | |
./lib/rex/parser/burp_session_nokogiri.rb- host_info[:name] = @state[:uri].host | |
-- | |
./lib/rex/parser/burp_session_nokogiri.rb: return unless @state[:web_site].service.info.to_s.empty? | |
./lib/rex/parser/burp_session_nokogiri.rb- service_info = {} | |
./lib/rex/parser/burp_session_nokogiri.rb- service_info[:host] = @state[:web_site].service.host | |
./lib/rex/parser/burp_session_nokogiri.rb- service_info[:port] = @state[:web_site].service.port | |
-- | |
./lib/rex/parser/burp_session_nokogiri.rb: return false if @text.strip.empty? | |
./lib/rex/parser/burp_session_nokogiri.rb- @text = @text.strip | |
./lib/rex/parser/burp_session_nokogiri.rb- end | |
./lib/rex/parser/burp_session_nokogiri.rb- | |
-- | |
./lib/rex/parser/burp_session_nokogiri.rb: return if @parse_warnings.empty? | |
./lib/rex/parser/burp_session_nokogiri.rb- return unless block | |
./lib/rex/parser/burp_session_nokogiri.rb- @parse_warnings.each_with_index do |pwarn,i| | |
./lib/rex/parser/burp_session_nokogiri.rb- unless @parse_warned.include? i | |
-- | |
./lib/rex/parser/nexpose_simple_nokogiri.rb: @report_data[:host_fingerprint].reject! {|k,v| v.nil? || v.empty?} | |
./lib/rex/parser/nexpose_simple_nokogiri.rb: return if @report_data[:host_fingerprint].empty? | |
./lib/rex/parser/nexpose_simple_nokogiri.rb- note = { | |
./lib/rex/parser/nexpose_simple_nokogiri.rb- :workspace => host_object.workspace, | |
./lib/rex/parser/nexpose_simple_nokogiri.rb- :host => host_object, | |
-- | |
./lib/rex/parser/nexpose_simple_nokogiri.rb: return if @report_data[:ports].empty? | |
./lib/rex/parser/nexpose_simple_nokogiri.rb- reported = [] | |
./lib/rex/parser/nexpose_simple_nokogiri.rb- @report_data[:ports].each do |svc| | |
./lib/rex/parser/nexpose_simple_nokogiri.rb- reported << db_report(:service, svc.merge(:host => host_object)) | |
-- | |
./lib/rex/parser/netsparker_xml.rb: if not str.to_s.strip.empty? | |
./lib/rex/parser/netsparker_xml.rb- @vuln['info'] << [@attr['name'] || "Information", str] | |
./lib/rex/parser/netsparker_xml.rb- end | |
./lib/rex/parser/netsparker_xml.rb- when :in_netsparker | |
-- | |
./lib/rex/parser/appscan_nokogiri.rb: return if @state[:request_body].strip.empty? | |
./lib/rex/parser/appscan_nokogiri.rb- web_form_info = {} | |
./lib/rex/parser/appscan_nokogiri.rb- web_form_info[:web_site] = page_info[:web_site] | |
./lib/rex/parser/appscan_nokogiri.rb- web_form_info[:path] = page_info[:path] | |
-- | |
./lib/rex/parser/appscan_nokogiri.rb: return if parsed_params.empty? | |
./lib/rex/parser/appscan_nokogiri.rb- web_form_info[:params] = parsed_params | |
./lib/rex/parser/appscan_nokogiri.rb- web_form = db_report(:web_form, web_form_info) | |
./lib/rex/parser/appscan_nokogiri.rb- @state[:web_forms] ||= [] | |
-- | |
./lib/rex/parser/appscan_nokogiri.rb: return if parsed_headers.empty? | |
./lib/rex/parser/appscan_nokogiri.rb- web_page_info[:headers] = parsed_headers | |
./lib/rex/parser/appscan_nokogiri.rb- web_page = db_report(:web_page, web_page_info) | |
./lib/rex/parser/appscan_nokogiri.rb- @state[:web_pages] ||= [] | |
-- | |
./lib/rex/parser/appscan_nokogiri.rb: return unless service.info.to_s.empty? | |
./lib/rex/parser/appscan_nokogiri.rb- service_info = { | |
./lib/rex/parser/appscan_nokogiri.rb- :host => service.host, | |
./lib/rex/parser/appscan_nokogiri.rb- :port => service.port, | |
-- | |
./lib/rex/parser/appscan_nokogiri.rb: return if @parse_warnings.empty? | |
./lib/rex/parser/appscan_nokogiri.rb- @parse_warnings.each do |pwarn| | |
./lib/rex/parser/appscan_nokogiri.rb- db.emit(:warning, pwarn, &block) if block | |
./lib/rex/parser/appscan_nokogiri.rb- end | |
-- | |
./lib/rex/parser/appscan_nokogiri.rb: return false if @text.strip.empty? | |
./lib/rex/parser/appscan_nokogiri.rb- @text = @text.strip | |
./lib/rex/parser/appscan_nokogiri.rb- end | |
./lib/rex/parser/appscan_nokogiri.rb- | |
-- | |
./lib/rex/parser/nokogiri_doc_mixin.rb: return if ref_type.nil? || ref_type.empty? || ref_value.nil? || ref_value.empty? | |
./lib/rex/parser/nokogiri_doc_mixin.rb- ref_value = ref_value.strip | |
./lib/rex/parser/nokogiri_doc_mixin.rb- ref_type = ref_type.strip.upcase | |
./lib/rex/parser/nokogiri_doc_mixin.rb- ret = case ref_type | |
-- | |
./lib/rex/parser/nokogiri_doc_mixin.rb: return false if @report_data[:ports].empty? | |
./lib/rex/parser/nokogiri_doc_mixin.rb- return true | |
./lib/rex/parser/nokogiri_doc_mixin.rb- end | |
./lib/rex/parser/nokogiri_doc_mixin.rb- | |
-- | |
./lib/rex/parser/nokogiri_doc_mixin.rb: raise "Unknown table `#{table}'" if valid_attrs.empty? | |
./lib/rex/parser/nokogiri_doc_mixin.rb- case table | |
./lib/rex/parser/nokogiri_doc_mixin.rb- when :note, :web_site, :web_page, :web_form, :web_vuln | |
./lib/rex/parser/nokogiri_doc_mixin.rb- just_the_facts = nonempty_data | |
-- | |
./lib/rex/parser/nokogiri_doc_mixin.rb: just_the_facts.empty? ? return : db.send("report_#{table}", just_the_facts) | |
./lib/rex/parser/nokogiri_doc_mixin.rb- end | |
./lib/rex/parser/nokogiri_doc_mixin.rb- | |
./lib/rex/parser/nokogiri_doc_mixin.rb- # XXX: It would be better to either have a single registry of acceptable | |
-- | |
./lib/rex/parser/nokogiri_doc_mixin.rb: unless @state[:current_tag].empty? | |
./lib/rex/parser/nokogiri_doc_mixin.rb- missing_ends = @state[:current_tag].keys.map {|x| "'#{x}'"}.join(", ") | |
./lib/rex/parser/nokogiri_doc_mixin.rb- msg = "Warning, the provided file is incomplete, and there may be missing\n" | |
./lib/rex/parser/nokogiri_doc_mixin.rb- msg << "data. The following tags were not closed: #{missing_ends}." | |
-- | |
./lib/rex/parser/nexpose_xml.rb: unless @host["endpoints"].empty? | |
./lib/rex/parser/nexpose_xml.rb- @host["vulns"][@current_vuln_id].merge!("endpoint_data" => @host["endpoints"].last) | |
./lib/rex/parser/nexpose_xml.rb- end | |
./lib/rex/parser/nexpose_xml.rb- if attributes["key"] | |
-- | |
./lib/rex/parser/nmap_nokogiri.rb: port_hash[:info] = extra.compact.join(" ") unless extra.empty? | |
./lib/rex/parser/nmap_nokogiri.rb- # Skip localhost port results when they're unknown | |
./lib/rex/parser/nmap_nokogiri.rb- if( port_hash[:reason] == "localhost-response" && | |
./lib/rex/parser/nmap_nokogiri.rb- port_hash[:state] == Msf::ServiceState::Unknown ) | |
-- | |
./lib/rex/parser/nmap_nokogiri.rb: return if @report_data[:ports].empty? | |
./lib/rex/parser/nmap_nokogiri.rb- reported = [] | |
./lib/rex/parser/nmap_nokogiri.rb- @report_data[:ports].each do |svc| | |
./lib/rex/parser/nmap_nokogiri.rb- reported << db_report(:service, svc.merge(:host => host_object)) | |
-- | |
./lib/rex/parser/nexpose_raw_nokogiri.rb: return if hosts_keys.empty? | |
./lib/rex/parser/nexpose_raw_nokogiri.rb- hosts_keys.each do |key_host,key_values| | |
./lib/rex/parser/nexpose_raw_nokogiri.rb- key_note = { | |
./lib/rex/parser/nexpose_raw_nokogiri.rb- :workspace => @args[:wspace], | |
-- | |
./lib/rex/parser/nexpose_raw_nokogiri.rb: return if matching_tests.empty? | |
./lib/rex/parser/nexpose_raw_nokogiri.rb- @state[:vuln] = vuln | |
./lib/rex/parser/nexpose_raw_nokogiri.rb- @state[:vuln][:matches] = matching_tests | |
./lib/rex/parser/nexpose_raw_nokogiri.rb- end | |
-- | |
./lib/rex/parser/nexpose_raw_nokogiri.rb: return if @report_data[:ports].empty? | |
./lib/rex/parser/nexpose_raw_nokogiri.rb- reported = [] | |
./lib/rex/parser/nexpose_raw_nokogiri.rb- @report_data[:ports].each do |svc| | |
./lib/rex/parser/nexpose_raw_nokogiri.rb- reported << db_report(:service, svc.merge(:host => host_object)) | |
-- | |
./lib/rex/time.rb: str.empty? ? "0 secs" : str.strip | |
./lib/rex/time.rb- end | |
./lib/rex/time.rb- | |
./lib/rex/time.rb- # | |
-- | |
./lib/rex/io/stream.rb: break if (temp == nil or temp.empty? == true) | |
./lib/rex/io/stream.rb- | |
./lib/rex/io/stream.rb- buf += temp | |
./lib/rex/io/stream.rb- lps += 1 | |
-- | |
./lib/rex/text.rb: until s.empty? | |
./lib/rex/text.rb- (ret ||= []).push s.slice!(0, n) | |
./lib/rex/text.rb- end | |
./lib/rex/text.rb- else | |
-- | |
./lib/rex/elfscan/scanner.rb: if !calls.empty? | |
./lib/rex/elfscan/scanner.rb- regexstr += "\xff[#{calls}]|" | |
./lib/rex/elfscan/scanner.rb- end | |
./lib/rex/elfscan/scanner.rb- | |
-- | |
./lib/rex/arch/x86.rb: if !opcodes.empty? | |
./lib/rex/arch/x86.rb- return opcodes[rand(opcodes.length)].chr + encode_modrm(dst, dst) | |
./lib/rex/arch/x86.rb- end | |
./lib/rex/arch/x86.rb-# TODO: SHL/SHR | |
-- | |
./lib/rex/arch/x86.rb: if opcodes.empty? | |
./lib/rex/arch/x86.rb- raise RuntimeError, "Could not find a usable opcode", caller() | |
./lib/rex/arch/x86.rb- end | |
./lib/rex/arch/x86.rb- end | |
-- | |
./lib/rex/socket/range_walker.rb: return false if ip_part.nil? or ip_part.empty? or mask_part.nil? or mask_part.empty? | |
./lib/rex/socket/range_walker.rb- return false if mask_part !~ /^[0-9]{1,2}$/ # Illegal mask -- numerals only | |
./lib/rex/socket/range_walker.rb- return false if mask_part.to_i > 32 # This too -- between 0 and 32. | |
./lib/rex/socket/range_walker.rb- begin | |
-- | |
./lib/rex/socket/range_walker.rb: (@ranges and not @ranges.empty?) | |
./lib/rex/socket/range_walker.rb- end | |
./lib/rex/socket/range_walker.rb- | |
./lib/rex/socket/range_walker.rb- # | |
-- | |
./lib/rex/socket/range_walker.rb: return false if ((not @ranges) or @ranges.empty?) | |
./lib/rex/socket/range_walker.rb- return false if not range_walker.ranges | |
./lib/rex/socket/range_walker.rb- | |
./lib/rex/socket/range_walker.rb- range_walker.ranges.all? do |start, stop| | |
-- | |
./lib/rex/socket/range_walker.rb: if section.empty? | |
./lib/rex/socket/range_walker.rb- # pretty sure this is an unintentional artifact of the C | |
./lib/rex/socket/range_walker.rb- # functions that turn strings into ints, but it sort of makes | |
./lib/rex/socket/range_walker.rb- # sense, so why not | |
-- | |
./lib/rex/socket/range_walker.rb: bounds[0] = 0 if bounds[0].nil? or bounds[0].empty? | |
./lib/rex/socket/range_walker.rb: bounds[1] = 255 if bounds[1].nil? or bounds[1].empty? | |
./lib/rex/socket/range_walker.rb- bounds.map!{|b| b.to_i} | |
./lib/rex/socket/range_walker.rb- return false if bounds[0] > bounds[1] | |
./lib/rex/socket/range_walker.rb- else | |
-- | |
./lib/rex/ui/text/color.rb: attr = "\e[%sm" % attr if (attr.empty? == false) | |
./lib/rex/ui/text/color.rb- return attr | |
./lib/rex/ui/text/color.rb- end | |
./lib/rex/ui/text/color.rb- | |
-- | |
./lib/rex/ui/text/dispatcher_shell.rb: if (tab_words.empty? and dispatcher.respond_to?('commands')) | |
./lib/rex/ui/text/dispatcher_shell.rb- items.concat(dispatcher.commands.keys) | |
./lib/rex/ui/text/dispatcher_shell.rb- end | |
./lib/rex/ui/text/dispatcher_shell.rb- | |
-- | |
./lib/rex/ui/text/dispatcher_shell.rb: return [''] if items.empty? | |
./lib/rex/ui/text/dispatcher_shell.rb- else | |
./lib/rex/ui/text/dispatcher_shell.rb- # Otherwise we add the completion items to the list | |
./lib/rex/ui/text/dispatcher_shell.rb- items.concat(res) | |
-- | |
./lib/rex/ui/text/input/readline.rb: ::Readline::HISTORY.pop if (line and line.empty?) | |
./lib/rex/ui/text/input/readline.rb- ensure | |
./lib/rex/ui/text/input/readline.rb- Thread.current.priority = orig || 0 | |
./lib/rex/ui/text/input/readline.rb- end | |
-- | |
./lib/rex/proto/proxy/socks4a.rb: return raw if( @userid.empty? ) | |
./lib/rex/proto/proxy/socks4a.rb- return raw + [ @userid ].pack( 'Z*' ) | |
./lib/rex/proto/proxy/socks4a.rb- end | |
./lib/rex/proto/proxy/socks4a.rb- | |
-- | |
./lib/rex/proto/proxy/socks4a.rb: if( not hostname.empty? ) | |
./lib/rex/proto/proxy/socks4a.rb- begin | |
./lib/rex/proto/proxy/socks4a.rb- return Rex::Socket.addr_itoa( Rex::Socket.gethostbyname( hostname )[3].unpack( 'N' ).first ) | |
./lib/rex/proto/proxy/socks4a.rb- rescue ::SocketError | |
-- | |
./lib/rex/proto/tftp/client.rb: if data_blocks.size > 1 and data_blocks.last.empty? | |
./lib/rex/proto/tftp/client.rb- data_blocks.pop | |
./lib/rex/proto/tftp/client.rb- end | |
./lib/rex/proto/tftp/client.rb- return data_blocks | |
-- | |
./lib/rex/proto/tftp/client.rb: if data_blocks.empty? | |
./lib/rex/proto/tftp/client.rb- yield "Closing down since there is no data to send." if block_given? | |
./lib/rex/proto/tftp/client.rb- self.status = {:success => [self.local_file, self.local_file, 0, 0]} | |
./lib/rex/proto/tftp/client.rb- return nil | |
-- | |
./lib/rex/proto/http/server.rb: raise ::EOFError if data.empty? | |
./lib/rex/proto/http/server.rb- | |
./lib/rex/proto/http/server.rb- case cli.request.parse(data) | |
./lib/rex/proto/http/server.rb- when Packet::ParseCode::Completed | |
-- | |
./lib/rex/mime/message.rb: self.content << "\r\n" if not self.content.empty? | |
./lib/rex/mime/message.rb- | |
./lib/rex/mime/message.rb- chunks.each do |chunk| | |
./lib/rex/mime/message.rb- break if chunk == "--" | |
-- | |
./lib/rex/mime/message.rb: if self.content and not self.content.empty? | |
./lib/rex/mime/message.rb- msg << self.content + "\r\n" | |
./lib/rex/mime/message.rb- end | |
./lib/rex/mime/message.rb- | |
-- | |
./msfvenom: if l.nil? or l.empty? | |
./msfvenom- l = ["all"] | |
./msfvenom- end | |
./msfvenom- opts[:list] = l | |
-- | |
./msfvenom: if opts.empty? | |
./msfvenom- puts "no options" | |
./msfvenom- puts opt | |
./msfvenom- exit(1) | |
-- | |
./msfvenom:opts[:encode] ||= !(opts[:badchars].nil? or opts[:badchars].empty?) | |
./msfvenom- | |
./msfvenom- | |
./msfvenom-if opts[:encoder].nil? | |
-- | |
./msfvenom:if payload_raw.nil? or payload_raw.empty? | |
./msfvenom- payload_raw = payload.generate_simple( | |
./msfvenom- 'Format' => fmt, | |
./msfvenom- 'Options' => datastore, | |
-- | |
./documentation/samples/framework/dump_module_info.rb:if (ARGV.empty?) | |
./documentation/samples/framework/dump_module_info.rb- puts "Usage: #{File.basename(__FILE__)} module_name" | |
./documentation/samples/framework/dump_module_info.rb- exit | |
./documentation/samples/framework/dump_module_info.rb-end | |
-- | |
./documentation/samples/framework/encode_file.rb:if (ARGV.empty?) | |
./documentation/samples/framework/encode_file.rb- puts "Usage: #{File.basename(__FILE__)} encoder_name file_name format" | |
./documentation/samples/framework/encode_file.rb- exit | |
./documentation/samples/framework/encode_file.rb-end | |
-- | |
./data/msfcrawler/forms.rb: if fname.empty? | |
./data/msfcrawler/forms.rb- fname = "NONE" | |
./data/msfcrawler/forms.rb- end | |
./data/msfcrawler/forms.rb- | |
-- | |
./data/msfcrawler/forms.rb: if !f.attributes['method'].empty? | |
./data/msfcrawler/forms.rb- m = f.attributes['method'].upcase | |
./data/msfcrawler/forms.rb- end | |
./data/msfcrawler/forms.rb- | |
-- | |
./data/sql/migrate/20110513143900_track_successful_exploits.rb: next if vulns.empty? | |
./data/sql/migrate/20110513143900_track_successful_exploits.rb- vulns.each do |vuln| | |
./data/sql/migrate/20110513143900_track_successful_exploits.rb- vuln.exploited_at = exploited_host.updated_at | |
./data/sql/migrate/20110513143900_track_successful_exploits.rb- vuln.save | |
-- | |
./data/sql/migrate/20110517160800_rename_and_prune_nessus_vulns.rb: next if(new_name.nil? || new_name.strip.empty?) | |
./data/sql/migrate/20110517160800_rename_and_prune_nessus_vulns.rb- v.name = new_name | |
./data/sql/migrate/20110517160800_rename_and_prune_nessus_vulns.rb- v.save! | |
./data/sql/migrate/20110517160800_rename_and_prune_nessus_vulns.rb- end | |
-- | |
./data/sql/migrate/20100819123300_migrate_cred_data.rb: elsif candidate_services.empty? | |
./data/sql/migrate/20100819123300_migrate_cred_data.rb- Msf::DBManager::Service.new do |svc| | |
./data/sql/migrate/20100819123300_migrate_cred_data.rb- svc.host_id = note.host.id | |
./data/sql/migrate/20100819123300_migrate_cred_data.rb- svc.port = default_port | |
-- | |
./data/sql/migrate/20110610085000_move_old_imported_creds_to_new_files.rb: next if cred_data.empty? | |
./data/sql/migrate/20110610085000_move_old_imported_creds_to_new_files.rb- fname = File.join(cred_path,"creds_#{wid}_#{ftype}-#{Time.now.utc.to_i}.txt") | |
./data/sql/migrate/20110610085000_move_old_imported_creds_to_new_files.rb- fdata = cred_data.join("\n") | |
./data/sql/migrate/20110610085000_move_old_imported_creds_to_new_files.rb- fh = File.open(fname, "wb") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment