-
SQLite 테이블, 컬럼 정보 가져오기HACK/WEB 2018. 8. 9. 13:59
sqlite_master Table
mysql 에서 테이블 정보나 컬럼 정보를 가져올때 information_schema 테이블을 많이 이용하는데 sqlite 에는 sqlite_master 테이블을 이용해서 테이블, 컬럼 정보를 가져온다.CREATE TABLE sqlite_master(type text,name text,tbl_name text,rootpage integer,sql text);테이블 정보 가져오기
sqlite_master 에서 테이블 정보를 가져올때 name 또는 tbl_name 필드를 이용하면 된다.mysql => SELECT table_name FROM information_schema.tables
sqlite => SELECT tbl_name FROM sqlite_master
컬럼 정보 가져오기
sqlite_master 에서 컬럼 정보를 가져올때 mysql 처럼 별도의 컬럼 필드가 없기 때문에 생성할 때 만든 쿼리를 담고 있는 sql 필드를 이용하면 된다.mysql => SELECT column_name FROM information_schema.columns WHERE table_name='myTable'
sqlite => SELECT sql FROM sqlite_master WHERE tbl_name='myTable'
'HACK > WEB' 카테고리의 다른 글
Oracle SQLi with XXE (0) 2019.04.18 Thread Requests Example (0) 2018.11.07 PROCEDURE ANALYSE - SQLi (0) 2018.08.03 JavaScript - CSRF (0) 2018.07.18 Only 특수문자 웹쉘(WebShell) (0) 2018.07.17