-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect All Traffic to Rails #224
base: master
Are you sure you want to change the base?
Conversation
Not that standardization is strong in the project, but I noticed tab indentation is off a bit. |
0c1d622
to
92f7ae8
Compare
@@ -1,6 +1,7 @@ | |||
class Victim < ActiveRecord::Base | |||
belongs_to :campaign | |||
has_many :visits, dependent: :destroy | |||
has_many :credentials, through: :visits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent this guy
@@ -193,7 +146,7 @@ def apache_logs | |||
def passwords | |||
# display all password harvested within campaign | |||
@campaign = Campaign.find(params[:id]) | |||
@visits = @campaign.visits.where('extra LIKE ?', "%password%") | |||
@visits = Visit.includes(:victim, :credential).joins(:victim, :credential).where(victims: { campaign_id: params[:id] }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really should consider moving this up into the Visit model with a scope
Conflicts: app/controllers/reports_controller.rb
Current POC at the moment.
TODO:
I would imagine this constitutes a major version change as there will be backwards incompat with previous templates and a different methodology.