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
- freebsd
- elastic stack
- Elasticsearch
- Proxy
- 보안양파
- ssh key 배포
- x-pack
- macos
- centos 8
- PlayBook
- 한글가이드
- pfsense
- endpoint security
- docker
- Windows
- hardening
- GitLab
- 로그인불가
- xe guest utilities
- XCP-ng
- bash
- ELASTIC
- proxycfg
- application security
- miniconda
- G-suite
- Kibana server is not ready yet
- Kibana
- ansible
Archives
- Today
- Total
선 밖에 선 자유인
간단한 python Banner Grabbing 스크립트 본문
#!/usr/bin/python import sys import socket target = str(sys.argv[1]) port = 80 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((target, port)) s.send("OPTIONS / HTTP/1.1\r\nHost: www.google.com\r\n\r\n") response = s.recv(4096) print response혹은
#!/usr/bin/python import socket import sys # Building Socket af,type,proto,name,conn = socket.getaddrinfo(sys.argv[1], sys.argv[2], 0, 0, socket.SOL_TCP)[0] s = socket.socket(af,type,proto) s.connect(conn) s.send("OPTIONS / HTTP/1.1\n\n") page = "" while 1: data = s.recv(1024) if data == "": break page = page + data s.close() print page
Comments