Skip to content

Commit

Permalink
Fixed BC-SECURITY#454 can't change listerner values bug
Browse files Browse the repository at this point in the history
  • Loading branch information
janit0rjoe committed May 10, 2021
1 parent 5b6ad74 commit 0e66b6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/common/listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from lib.database.base import Session
from lib.database import models
from sqlalchemy import or_, and_
from sqlalchemy.orm.attributes import flag_modified
from pydispatch import dispatcher

from . import helpers
Expand Down Expand Up @@ -484,7 +485,7 @@ def disable_listener(self, listener_name):
listener.enabled = False

self.shutdown_listener(listener_name)
Session.commit()
Session().commit()

# dispatch this event
message = "[*] Listener {} killed".format(listener_name)
Expand Down Expand Up @@ -564,4 +565,5 @@ def update_listener_options(self, listener_name, option_name, option_value):
print(helpers.color("[!] Listener %s does not have the option %s" % (listener_name, option_name)))
return
listener.options[option_name]['Value'] = option_value
flag_modified(listener,'options')
Session().commit()

0 comments on commit 0e66b6c

Please sign in to comment.