beefproject / beefproject/beef
Review file read/write operations
- Dominant language
- JavaScript
- Stars
- 11k
- Forks
- 2.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
BeEF reads and writes to various files within the BeEF application directory and user's home directory.
Ideally, BeEF should never write to the application directory.
BeEF writes to the user's home directory in only three instances:
```
# grep -rn "\$home_dir" core/ extensions/ modules/
core/logger.rb:15: @logger ||= Logger.new("#{$home_dir}/beef.log").tap do |log|
modules/host/get_wireless_keys/module.rb:15: filename = "#{$home_dir}/exported_wlan_profiles_#{ip}_-_#{timestamp}_#{@datastore['cid']}.xml"
modules/browser/spyder_eye/module.rb:28: filename = "#{$home_dir}/screenshot_#{ip}_-_#{timestamp}_#{@datastore['cid']}.png"
```
Review whether some data, if any, should instead be stored in the database.
Investigate a consistent approach and standard practice guidelines for future development.
Contributor guide
Research direction
Start by reviewing the three paths identified by the grep output: core/logger.rb, modules/host/get_wireless_keys/module.rb, and modules/browser/spyder_eye/module.rb. Trace each file write and compare it with the database storage options, then define a consistent policy for application and home-directory data and document the standard for future development.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100