mushorg / tanner

He who flays the hide
GNU General Public License v3.0
222 stars 103 forks source link

Add support for postgres client. #388

Closed mzfr closed 4 years ago

mzfr commented 4 years ago

I have also formatted some code in the server.py file.

@afeena @glaslos Can you please take a look at the table schema and let me know if any changes is needed in this. If not then I'll continue the work.

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 1283


Changes Missing Coverage Covered Lines Changed/Added Lines %
tanner/server.py 20 30 66.67%
tanner/create_tables.py 3 14 21.43%
tanner/postgres_client.py 8 24 33.33%
<!-- Total: 31 68 45.59% -->
Files with Coverage Reduction New Missed Lines %
tanner/server.py 1 69.72%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 1273: -1.04%
Covered Lines: 1416
Relevant Lines: 1868

💛 - Coveralls
afeena commented 4 years ago

@glaslos We want to use both redis and pg in tanner: redis as a cache for sessions before analysis (since we delete them afterwards, redis indeed the cache) and pg for storing analysed sessions. In such a case we might separate analysis process into separate background task. Also we thought about keeping dorks in redis, because for each request we need access to them, and it would be faster.

What do you think?

glaslos commented 4 years ago

This makes a lot of sense. You could even use a TTL to close, push to pg and then delete sessions. You can subscribe to TTL events.

mzfr commented 4 years ago

@glaslos I've made the requested changes. Can you please review the table schema now?

afeena commented 4 years ago

Great job!

Things to be considered for the future: -- Splitting the analysis part and core tanner part -- Tests