본문 바로가기 메뉴 바로가기

ba0bab

프로필사진

ba0bab

ba0bab
검색하기 폼 Mountain View
  • About me

  • 분류 전체보기 (165)
    • pwnable (127)
      • bandit (8)
      • FTZ (19)
      • LOB (11)
      • pwnable.kr (6)
      • pwnable.tw (16)
      • HackCTF (1)
      • CTF write-up (22)
      • windows (4)
      • 정리 (39)
    • reversing (0)
      • CTF write-up (0)
    • web hacking (0)
      • CTF write-up (0)
    • programming (30)
      • c, c++ (10)
      • python (20)
    • cs (5)
      • network (1)
      • etc (4)
    • CTF write-up (3)
  • GUESTBOOK
  • TAG
  • RSS

programming
python sqlite3 심플 예제

https://soooprmx.com/archives/4056

programming/python 2018. 8. 31. 13:36
db 기본 문법

https://opentutorials.org/module/2086/12091

programming/python 2018. 8. 31. 09:55
[python sqlite3]? Placeholder / Named Placeholder

import sqlite3 conn = sqlite3.connect("test.db") cur = conn.cursor()sql = "select * from customer where category=? and region=?"cur.execute(sql, (1, 'SEA'))rows = cur.fetchall()for row in rows: print(row) conn.close() #Namedsql = "select * from customer where id = :Id"cur.execute(sql, {"Id": 1})

programming/python 2018. 8. 26. 12:47
python sqlite3

import sqlite3 conn = sqlite3.connect("asdf.db") cur = conn.cursor()cur.execute("SELECT * FROM general") rows = cur.fetchall()for row in rows: print(row) conn.close() hyomin@ubuntu:~/flask_project$ python sql.py (1, u'\uc655\uac74', 89)(2, u'\ubc15\uc220\ud76c', 97)(3, u'\uc655\uc2dd\ub834', 84)(4, u'\uc2e0\uc22d\uacb8', 98)(5, u'\uad81\uc608', 77)(6, u'\uc720\uae08\ud544', 99)(7, u'\ub2a5\ud658..

programming/python 2018. 8. 26. 12:35
[Flask] sqlite3 사용예제

>> sql_test.py import sqlite3 as liteimport time database_filename = 'test.db'conn = lite.connect(database_filename)cs = conn.cursor() #drop tablequery = "DROP TABLE IF EXISTS t1"cs.execute(query) #create tablequery = "CREATE TABLE IF NOT EXISTS t1 (id INTEGER PRIMARY_KEY NOT_NULL, name VARCHAR(255), at DATETIME)"cs.execute(query) #insert tablechars = "abcdefghijklmnopqrstuvwxyz"for a in range(l..

programming/python 2018. 8. 26. 03:50
[Flask] url_for

from flask import Flask, url_for app = Flask(__name__) @app.route('/') def index(): return 'index' @app.route('/login') def login(): return 'login' @app.route('/user/') def profile(username): return '{}\'s profile'.format(username) with app.test_request_context(): print(url_for('index')) print(url_for('login')) print(url_for('login', next='/')) print(url_for('profile', username='John Doe')) / /l..

programming/python 2018. 8. 25. 09:13
[Flask] debug mode

$ export FLASK_ENV=development $ flask run

programming/python 2018. 8. 25. 09:10
[Flask] app.py 구동

$ export FLASK_APP=app.py $ flask run * Running on http://127.0.0.1:5000/ app.run()이 소스코드에 없어도 되는듯

programming/python 2018. 8. 25. 08:54
이전 1 2 3 4 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글
TAG
  • exit
  • pwnable.tw
  • fastbin
  • tcache
  • pwable
  • SQLi
  • ebp change
  • codegate
  • hacking
  • TLS
  • stack reusing
  • heap
  • oob
  • HackCTF
  • srop
  • pwnable
  • glibc
  • overflow
  • fsop
  • rt_sigreturn
  • 본선가고싶다
  • shellcoding
  • fastbindup
  • FSB
  • 해킹
more
Total
Today
Yesterday

Powered by Tistory / Designed by INJE

티스토리툴바