Skip to content

Commit

Permalink
Added basic database dump analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
Sedaboni committed Oct 1, 2019
1 parent 4777489 commit 0aa63ad
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pastepwn/analyzers/databasedumpanalyzer.py
Expand Up @@ -3,16 +3,15 @@


class DatabaseDumpAnalyzer(BasicAnalyzer):
"""Analyzer which always matches a paste to perform actions on every paste"""
"""Analyzer to match database dump"""
name = "DatabaseDumpAnalyzer"

def __init__(self, actions):
"""
Analyzer which always matches a paste to perform actions on every paste
Analyzer to match database dump
:param actions: A single action or a list of actions to be executed on every paste
"""
super().__init__(actions)

def match(self, paste):
"""Always returns True to match every paste available"""
return True
# This regex match the columns of a database
regex = r"[(]((`\w+`|\d), )+(`\w+`|\d)[)]"

super().__init__(actions, regex)

0 comments on commit 0aa63ad

Please sign in to comment.