Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- vbscript
- 파이썬
- Hover Action
- Universal ShellCode
- c# 외부 프로그램 실행
- c# 파일 읽기쓰기
- pdf 악성코드
- 악성코드
- VMware
- c# 디렉토리 파일 조회
- TCP Server/Client
- Python GetProcAddress
- FTP Server/Client
- UDP Server/Client
- c# 프로그램 종료
- anti vm
- 파워쉘
- 최순실 악성코드
- Python LoadLibrary
- c# 파일명 변경
- 한글 악성코드
- 파이썬 외부프로그램 실행
- TCP Socket
- c# 파일 IO
- Mouse Over
- c# xml 파싱
- Python Win32 API
- hex2bin
- PPT Malware
- PowerShell
Archives
- Today
- Total
그냥저냥
VirusTotal 조회 자동화 (Used API) 본문
예전에 업무상 잠깐 만들어서 썼었던 바이러스 토탈 조회용 코드이며, 바이러스토탈 회원가입 후 API 키를 따로 받아야함
(참고로 조회 속도가 너무 빠르면 에러(?)가 발생한다고 해서 일부러 Sleep 함수를 추가함)
1234567891011121314151617181920212223242526272829 import simplejsonimport urllibimport urllib2import timevtkey = "" # API Keymd5str = ""url = "https://www.virustotal.com/vtapi/v2/file/report"txtf = open("list.txt", "r") # 파일로 저장while True:line = txtf.readline()md5str = line.strip('\n')if not md5str: breakparameters = {"resource": md5str,"apikey": vtkey}data = urllib.urlencode(parameters)req = urllib2.Request(url, data)response = urllib2.urlopen(req)json = response.read()print (json)f = open(md5str+".txt","w")f.write(json)f.close()time.sleep(20)txtf.close()print ("Clear!!!")cs
'Dev. > Python' 카테고리의 다른 글
외부 프로그램 실행 + 파라미터 전달 (0) | 2017.01.10 |
---|---|
Win32 라이브러리 API 주소 (0) | 2017.01.04 |
HTTP 웹 Request 코드 (임시) (0) | 2016.12.28 |
Socket 통신 예제 (Server / Client) (0) | 2016.07.31 |
MD5 Hash (0) | 2016.07.31 |
Comments