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

Your SQLite3 library does not support FTS4 #3

Closed
py4h0n opened this issue Jun 17, 2017 · 5 comments
Closed

Your SQLite3 library does not support FTS4 #3

py4h0n opened this issue Jun 17, 2017 · 5 comments
Labels

Comments

@py4h0n
Copy link

py4h0n commented Jun 17, 2017

python script on mac , full text search sqlite database, tips:Your SQLite3 library does not support FTS4., recompile sqlite, command "pragma compile_options" shows ENABLED_ FTS4,but python script still shows not support FTS4. Any solution?
system & program version
macos Sierra develop beta3
python 2.7.13
sqlite3 3.19.3

@vulnersCom
Copy link
Owner

Fixed in the last commit.
Please, check.

@vulnersCom vulnersCom added the bug label Jun 19, 2017
@py4h0n
Copy link
Author

py4h0n commented Jun 20, 2017

Still have the problem.
python 2.7.* in-bulit sqlite3 module, not have enabled FTS4 feature
MY TEST:

Python 2.7.10 (default, Feb 7 2017, 00:08:15)
Type "copyright", "credits" or "license" for more information.

IPython 4.2.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: import sqlite3

In [2]: con = sqlite3.connect('getsploit.db')

In [3]: cur = con.cursor()

In [4]: for (v, ) in cur.execute('pragma compile_options'):
...: print v
...:
COMPILER=clang-8.0.0
ENABLE_API_ARMOR
ENABLE_FTS3
ENABLE_FTS3_PARENTHESIS
ENABLE_JSON1
ENABLE_LOCKING_STYLE=1
ENABLE_RTREE
ENABLE_UPDATE_DELETE_LIMIT
HAS_CODEC
HAVE_ISNAN
MAX_MMAP_SIZE=1073741824
OMIT_AUTORESET
OMIT_BUILTIN_TEST
OMIT_LOAD_EXTENSION
SYSTEM_MALLOC
THREADSAFE=2

maybe for python 2.7.*, you should change you code like this:
for (val,) in cursor.execute('pragma compile_options'):
if 'FTS4' in val:
==>
for (val,) in cursor.execute('pragma compile_options'):
if 'FTS3' in val:

It works for me~

@vulnersCom
Copy link
Owner

Wow.
It looks like back-compatibility from FTS4 to FTS3?
So with
if 'FTS3' in val
fix everything worked correctly with -l option?
./getsploit.py -l wordpress

@py4h0n
Copy link
Author

py4h0n commented Jun 20, 2017

http://www.sqlite.org/fts3.html
FTS3 and FTS4 are nearly identical. They share most of their code in common, and their interfaces are the same.

yes, for me it's ok
getsploit git:(master) ✗ ./getsploit.py -l wordpress
Total found exploits: 5711
Web-search URL: https://vulners.com/search?query=wordpress
...
...

@vulnersCom
Copy link
Owner

Got it.
Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants