반응형
immunity debugger library 분석 ][ mysql 사용하기
■ 사용법
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- 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." |

반응형
'Python > 0x15-immunity-debugger1.85' 카테고리의 다른 글
immunity debugger library 분석 ][ mona 사용하기 (0) | 2019.09.23 |
---|---|
immunity debugger library 분석 ][ command pattern 사용하기 (0) | 2019.09.19 |
immunity debugger library 분석 ][ auto debugging (0) | 2019.09.16 |
immunity debugger library 분석 ][ getModule 실행해보기 (0) | 2019.09.16 |
immunity debugger ][ python shell 사용하기 (0) | 2019.09.12 |