beefproject / beefproject/beef

Review file read/write operations

Open
#2,284 0 comments 0 reactions 0 assignees View on GitHub
Code Quality Maintainability
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.