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

Meaningful __repr__ for objects #95

Merged
merged 2 commits into from Jul 21, 2023
Merged

Meaningful __repr__ for objects #95

merged 2 commits into from Jul 21, 2023

Conversation

psrok1
Copy link
Member

@psrok1 psrok1 commented Jul 21, 2023

In [1]: from mwdblib import MWDB

In [2]: mwdb = MWDB()

In [3]: mwdb
Out[3]: MWDB(api_url='https://mwdb.cert.pl/api/', username='psrok1')

In [4]: next(mwdb.recent_files())
Out[4]: MWDBFile(sha256='16b83c892688e1869a75fcf88075e1a7a0983c284c41a7ff721e23cb6b9c9f86', name='1e6d0394a9335f03d83a7f498df12ec8.exe')

In [5]: next(mwdb.recent_configs())
Out[5]: MWDBConfig(id='41769caf7f92e5b280b18e9fa08647413eea2323afec8f517184294d3cad1ecb', family='mirai', type='static')

In [6]: config = next(mwdb.recent_configs())

In [7]: config.parents
Out[7]: [MWDBFile(sha256='d1382ae79bfca963d493ada55cdc759a2c809d66020c55722b0016f6c6522874', name='3063db1d8b9970df0c740e8c7d5b9bfa.elf')]

@psrok1 psrok1 merged commit 1a057be into master Jul 21, 2023
3 checks passed
@psrok1 psrok1 deleted the feature/meaningful-repr branch July 21, 2023 16:40
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.

None yet

2 participants