Skip to content
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

Added Comments #340

Merged
merged 3 commits into from
Jul 22, 2019
Merged

Added Comments #340

merged 3 commits into from
Jul 22, 2019

Conversation

rjt-gupta
Copy link
Collaborator

No description provided.

@coveralls
Copy link

coveralls commented Jul 12, 2019

Pull Request Test Coverage Report for Build 1057

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 76.729%

Totals Coverage Status
Change from base Build 1040: 0.0%
Covered Lines: 1309
Relevant Lines: 1706

💛 - Coveralls

"""
Handler of emulator
:param attack_params (list): contains dicts as elements with id and value (payload from attacker) as keys
:return: dict: value (result of emulator), page (if set to true the payload will be injected to index.html
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(dict)
for consistency with your style of naming types :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 😅

"""
Handler of emulator
:param attack_params (list): contains dicts as elements with id and value (payload from attacker) as keys
:return: dict: value (result of emulator), page (if set to true the payload will be injected to index.html
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(dict)

"""
Checks if DB exists or not
:param db_name (str): mysql db name
:return: result (integer): 0 if no such database exists else 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(int)

@@ -58,6 +68,11 @@ def __init__(self):
conn.close()

async def delete_db(self, db):
"""
Deletes the database
:param db: db name to be deleted
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type?

"""
Injects the code from attacker to vulnerable code and get emulation results from php sandbox.
:param code (str): Input payload from attacker
:return: object_injection_result (dict): Keys - file_md5 (md5 hash), stdout (injection result)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please choose one style for describing keys of the dict or do not name them at all

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

Creates a aiomysql connection
:return: connection object
"""

conn = await aiomysql.connect(host=TannerConfig.get('SQLI', 'host'),
user=TannerConfig.get('SQLI', 'user'),
password=TannerConfig.get('SQLI', 'password')
)
return conn

async def check_db_exists(self, db_name, ):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please remove additional comma in function parameters? :) I don't know why it is here :D

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe its mainly for multiline code?
#315 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say it's a typo

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

@afeena afeena merged commit b5fcde7 into mushorg:master Jul 22, 2019
@rjt-gupta rjt-gupta deleted the commenst branch July 23, 2019 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants