본문 바로가기
Python/0x15-immunity-debugger1.85

immunity debugger library 분석 ][ mysql 사용하기

by SpeeDr00t 2019. 9. 20.
반응형

immunity debugger library 분석 ][ mysql 사용하기

■ 사용법

#-*- coding:utf-8 -*-
#
# test by kyoung chip , jang
#
from immlib import *
import pymysql
def main(args):
imm = Debugger()
imm.log(" ------------------- start -----------------------")
imm.log("")
imm.log("")
imm.log("")
imm.log("")
imm.log("")
imm.log("")
imm.log("")
# MySQL Connection
conn = pymysql.connect(host='xx.xx.xx.xx', user='xx', password='xx', db='xx', charset='utf8' , port =111)
try :
with conn.cursor(pymysql.cursors.DictCursor) as cursor :
sql = "select * from area"
cursor.execute( sql )
raws = cursor.fetchall()
for r in raws :
imm.log( " areaid = %d , area = %s " % ( r["areaid"] , r["areaname"] ) )
finally :
conn.close()
return "[*] check the Log window."
view raw mysql.py hosted with ❤ by GitHub

반응형