Comments (4)
ok, I was able to reproduce this, looking at what the bug is and then I'll submit a fix
from l2tscaffolder.
OK, debugging this shows:
SyntaxError('invalid syntax', ('<unknown>', 30, 10, ' self.* = None\n'))
So line 30 in the sqlite_plugin.jinja2
....
{% for attr in query_columns[query_name]|sort(false) %}self.{{ attr }} = None
So looking at the query columns here... I get:
{'Messages': ['*']}
If you would do something different than select * then this will work.... since now the generator tries to add the attribute "self.*" which is not valid.
I will add a check to see whether a select * is selected, and advise against it....
You should be able to create the plugin if you change from "SELECT *" to "SELECT column_a, column_b, ...."
from l2tscaffolder.
Now when you try to run the generate this way you get:
Callback function name [#1]: Messages
SQL Statement [#1]: SELECT * FROM messages
More entries? [Y/n]: n
Unable to configure, with error: UnableToConfigure('Unable to generate parser while using * to select columns. Please adjust your SELECT statements to include explicit column names.',)
Want to try again? [Y/n]:
That is you'll need to redo the SQL statement.
And if you redo the statement:
Callback function name [#1]: Messages
SQL Statement [#1]: SELECT Message,Timestamp,Foobar FROM messages
More entries? [Y/n]: n
IT will be accepted and the parser will be generated...
from l2tscaffolder.
Thanks
from l2tscaffolder.
Related Issues (20)
- Disable AppVeyor HOT 2
- Update CLI to work with new updates. HOT 4
- Create a new definition for timesketch and add a timesketch analysis scaffolder HOT 4
- Remove old code from the project HOT 3
- Update the documentation for the tool HOT 3
- Rename the github project l2t_scaffolder HOT 3
- first run of timesketch scaffolder HOT 3
- Migrate codebase to l2tdevtools
- Add a turbinia job scaffolder HOT 2
- The timesketch scaffolder formats code using two spaces instead of 4 HOT 2
- Additions to init files is not sorted, with a TODO in there and no newline character appended. HOT 2
- Add text parser template for plaso
- Add end-to-end tests
- assertIsEqual doesn't exist
- add support for plaso dsv parser generation HOT 1
- timesketch project root not identified correctly
- pip3 install of l2tscaffolder is missing the ".style.ts.yapf" file HOT 4
- Timesketch crashes with current "ts_sketch_analyzer.jinja2" template
- ImportError: cannot import name 'eventdata' from 'plaso.lib'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from l2tscaffolder.