Skip to content

Commit

Permalink
fix: [website] print and css
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCruciani committed Feb 27, 2024
1 parent ee02bb1 commit 2b94f73
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion website/app/static/css/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body {

main
{
overflow-x: auto;
overflow-x: hidden;
}
span#goTop{
position: fixed;
Expand Down
62 changes: 32 additions & 30 deletions website/app/utils/init_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,39 @@

def create_modules_db():
modules = query_get_module()
if not "message" in modules:
for module in modules:
m = Module.query.filter_by(name=module["name"]).first()
input_attr = ""
if "input" in module["mispattributes"]:
input_attr = json.dumps(module["mispattributes"]["input"])
if not m:
m = Module(
name=module["name"],
description=module["meta"]["description"],
is_active=True,
request_on_query=False,
input_attr=input_attr
)
db.session.add(m)
db.session.commit()

for module in modules:
m = Module.query.filter_by(name=module["name"]).first()
input_attr = ""
if "input" in module["mispattributes"]:
input_attr = json.dumps(module["mispattributes"]["input"])
if not m:
m = Module(
name=module["name"],
description=module["meta"]["description"],
is_active=True,
request_on_query=False,
input_attr=input_attr
)
db.session.add(m)
db.session.commit()


if "config" in module["meta"]:
for conf in module["meta"]["config"]:
c = Config.query.filter_by(name=conf).first()
if not c:
c = Config(
name = conf
if "config" in module["meta"]:
for conf in module["meta"]["config"]:
c = Config.query.filter_by(name=conf).first()
if not c:
c = Config(
name = conf
)
db.session.add(c)
db.session.commit()

mc = Module_Config(
module_id=m.id,
config_id=c.id
)
db.session.add(c)
db.session.add(mc)
db.session.commit()

mc = Module_Config(
module_id=m.id,
config_id=c.id
)
db.session.add(mc)
db.session.commit()
else:
print("[-] Error in misp-modules. It might not running.")

0 comments on commit 2b94f73

Please sign in to comment.