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

[Easy] Added MS Office <= 2003, Blake2b-512, Telegram Mobile App Passcode #91

Closed
bee-san opened this issue Apr 26, 2021 · 6 comments
Closed
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bee-san
Copy link
Member

bee-san commented Apr 26, 2021

#69 (comment)

^^ That PR already contains the stuff. Make a new PR (or fix the merge conflicts + tests) to contribute && finish this issue :)

@bee-san bee-san added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 26, 2021
@amadejpapez
Copy link
Member

Hi @bee-san! I just saw that the tests from my PR #92 that was aimed to solve this issue are actually failing and I cannot figure out why. The error is in the test_main.py in the latest Office hash test.

Hash name in tests is the same as name in the database and the regex matches the hash so the test should be successful. This is the error message:

tests/test_main.py:226: AssertionError
=========================== short test summary info ============================
FAILED tests/test_main.py::test_office - assert 'MS Office ⇐ 2003 $0/$1, MD5 ...
========================= 1 failed, 35 passed in 0.28s =========================
Command poetry run pytest failed with exit code 1
Session tests failed.
Error: Process completed with exit code 1.

@bee-san
Copy link
Member Author

bee-san commented Apr 28, 2021

It's probably string matching, it's quite hard to match entire strings like that. Specifically might be breaking it? I would assert using regex here :)

@amadejpapez
Copy link
Member

I also thought that maybe some character in the name is causing this error. So asserting regex like this
assert "\$oldoffice\$[a-f0-9*]{100}:[a-f0-9]{10}" in x instead of the name should make the test work?

@bee-san
Copy link
Member Author

bee-san commented Apr 29, 2021

That's so advanced! I would do:

assert re.find("MS Office", x)

I think that'd work?

@amadejpapez
Copy link
Member

True that would cause even more errors hahah. Will open a new PR now with what you suggested. :D

@bee-san
Copy link
Member Author

bee-san commented Apr 29, 2021

Make sure to run pytest to test it! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants