
DirBuster, Dirsearch, cansina, 御剑보다 더 강력한 고급 웹 디렉토리 및 파일 스캐닝 도구입니다.一个高级web目录、文件扫描工具,功能将会强于DirBuster、Dirsearch、cansina、御剑。
고급 웹 디렉토리 스캐닝 도구로, DirBuster, Dirsearch, cansina, Yujian보다 강력한 기능을 제공합니다.

광범위한 조사 결과, 훌륭한 웹 디렉토리 스캐닝 도구는 최소한 다음 기능을 갖추어야 합니다:
이제 Dirmap의 특징을 살펴보겠습니다.
git clone https://github.com/H4ckForJob/dirmap.git && cd dirmap && python3 -m pip install -r requirement.txt
단일 대상, 기본값 http
python3 dirmap.py -i https://target.com -lcf
python3 dirmap.py -i 192.168.1.1 -lcf
서브넷 (CIDR 형식)
python3 dirmap.py -i 192.168.1.0/24 -lcf
네트워크 범위
python3 dirmap.py -i 192.168.1.1-192.168.1.100 -lcf
python3 dirmap.py -iF targets.txt -lcf
targets.txt에서 위 형식을 지원합니다.
output 폴더에 자동 저장됩니다.대상 도메인.txt입니다.dirmap 구성을 사용자 정의하고 dirmap의 고급 기능을 탐색해 보세요.
현재는 구성 파일을 로드하여 세부 구성을 수행합니다. 명령줄 인수를 사용한 세부 구성은 지원되지 않습니다!
프로젝트 루트 디렉토리의 dirmap.conf를 편집하여 구성합니다.
dirmap.conf 구성 상세 설명
#재귀 스캔 처리 구성
[RecursiveScan]
#재귀 스캔 활성화 여부: 비활성화:0; 활성화:1
conf.recursive_scan = 0
#이러한 상태 코드를 만나면 재귀 스캔 시작. 기본값 [301,403]
conf.recursive_status_code = [301,403]
#URL이 이 길이를 초과하면 스캔 종료
conf.recursive_scan_max_url_length = 60
#이 확장자는 재귀 스캔하지 않음
conf.recursive_blacklist_exts = ["html",'htm','shtml','png','jpg','webp','bmp','js','css','pdf','ini','mp3','mp4']
#스캔에서 제외할 디렉토리 설정. 기본값은 비어 있음. 다른 예시: e.g:['/test1','/test2']
#conf.exclude_subdirs = ['/test1','/test2']
conf.exclude_subdirs = ""
#스캔 모드 처리 구성 (4가지 모드, 한 번에 1개만 선택 가능)
[ScanModeHandler]
#사전 모드: 비활성화:0; 단일 사전:1; 다중 사전:2
conf.dict_mode = 1
#단일 사전 모드 경로
conf.dict_mode_load_single_dict = "dict_mode_dict.txt"
#다중 사전 모드 경로, 기본값 dictmult
conf.dict_mode_load_mult_dict = "dictmult"
#브루트포스 모드: 비활성화:0; 활성화:1
conf.blast_mode = 0
#사전 생성 최소 길이. 기본값 3
conf.blast_mode_min = 3
#사전 생성 최대 길이. 기본값 3
conf.blast_mode_max = 3
#기본 문자 집합: a-z. 아직 사용되지 않음.
conf.blast_mode_az = "abcdefghijklmnopqrstuvwxyz"
#기본 문자 집합: 0-9. 아직 사용되지 않음.
conf.blast_mode_num = "0123456789"
#사용자 정의 문자 집합. 기본값 "abc". abc를 사용하여 사전 생성
conf.blast_mode_custom_charset = "abc"
#사용자 정의 재개 문자 집합. 기본값 비어 있음.
conf.blast_mode_resume_charset = ""
#크롤러 모드: 비활성화:0; 활성화:1
conf.crawl_mode = 0
#동적 민감 파일 payload 생성을 위한 접미사 사전
conf.crawl_mode_dynamic_fuzz_suffix = "crawl_mode_suffix.txt"
#robots.txt 파일 파싱. 아직 구현되지 않음.
conf.crawl_mode_parse_robots = 0
#HTML 페이지 파싱을 위한 xpath 표현식
conf.crawl_mode_parse_html = "//*/@href | //*/@src | //form/@action"
#동적 크롤러 사전 생성 활성화 여부. 기본값 1, 크롤러 동적 사전 생성 활성화. 다른 예시: e.g: 비활성화:0; 활성화:1
conf.crawl_mode_dynamic_fuzz = 1
#Fuzz 모드: 비활성화:0; 단일 사전:1; 다중 사전:2
conf.fuzz_mode = 0
#단일 사전 모드 경로.
conf.fuzz_mode_load_single_dict = "fuzz_mode_dir.txt"
#다중 사전 모드 경로. 기본값: fuzzmult
conf.fuzz_mode_load_mult_dict = "fuzzmult"
#Fuzz 태그 설정. 기본값 {dir}. {dir} 태그를 사전 삽입 지점으로 사용하여 http://target.com/{dir}.php를 http://target.com/사전의 각 행.php로 바꿉니다. 다른 예시: e.g:{dir};{ext}
#conf.fuzz_mode_label = "{ext}"
conf.fuzz_mode_label = "{dir}"
#payload 처리 구성. 아직 구현되지 않음.
[PayloadHandler]
#요청 처리 구성
[RequestHandler]
#사용자 정의 요청 헤더. 기본값 비어 있음. 다른 예시: e.g:test1=test1,test2=test2
#conf.request_headers = "test1=test1,test2=test2"
conf.request_headers = ""
#사용자 정의 요청 User-Agent. 기본값 chrome의 UA.
conf.request_header_ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
#사용자 정의 요청 쿠키. 기본값 비어 있음, 쿠키 설정 안 함. 다른 예시 e.g:cookie1=cookie1; cookie2=cookie2;
#conf.request_header_cookie = "cookie1=cookie1; cookie2=cookie2"
conf.request_header_cookie = ""
#사용자 정의 401 인증. 아직 구현되지 않음. 사용자 정의 요청 헤더 기능으로 충족 가능(귀찮아서XD)
conf.request_header_401_auth = ""
#사용자 정의 요청 메서드. 기본값 get 메서드. 다른 예시: e.g:get;head
#conf.request_method = "head"
conf.request_method = "get"
#각 요청 시간 초과 사용자 정의. 기본값 3초.
conf.request_timeout = 3
#(0-x)초 랜덤 지연 후 요청 전송. 매개변수는 정수여야 합니다. 기본값 0초, 지연 없음.
conf.request_delay = 0
#단일 대상에 대한 요청 코루틴 스레드 수 사용자 정의. 기본값 30 스레드
conf.request_limit = 30
#최대 재시도 횟수 사용자 정의. 아직 구현되지 않음.
conf.request_max_retries = 1
#지속적 연결 설정. session() 사용 여부. 아직 구현되지 않음.
conf.request_persistent_connect = 0
#302 리디렉션. 기본값 False, 리디렉션 안 함. 다른 예시: e.g:True;False
conf.redirection_302 = False
#payload 뒤에 접미사 추가. 기본값 비어 있음, 스캔 시 접미사 추가 안 함. 다른 예시: e.g:txt;php;asp;jsp
#conf.file_extension = "txt"
conf.file_extension = ""
#응답 처리 구성
[ResponseHandler]
#기록할 응답 상태 설정. 기본값 [200], 200 상태 코드 기록. 다른 예시: e.g:[200,403,301]
#conf.response_status_code = [200,403,301]
conf.response_status_code = [200]
#content-type 응답 헤더 기록 여부. 기본값 1 기록
#conf.response_header_content_type = 0
conf.response_header_content_type = 1
#페이지 크기 기록 여부. 기본값 1 기록
#conf.response_size = 0
conf.response_size = 1
#404 페이지 자동 감지 여부. 기본값 True, 자동 404 감지 활성화. 다른 예시 참조 e.g:True;False
#conf.auto_check_404_page = False
conf.auto_check_404_page = True
#503 페이지 일치 사용자 정의 정규 표현식. 아직 구현되지 않음. 필요 없을 것 같아 폐기 예정.
#conf.custom_503_page = "page 503"
conf.custom_503_page = ""
#사용자 정의 정규 표현식으로 페이지 내용 일치
#conf.custom_response_page = "([0-9]){3}([a-z]){3}test"
conf.custom_response_page = ""
#크기가 x인 페이지 건너뛰고 표시, 설정하지 않으면 "None"으로 구성, 기본값 "None". 다른 크기 구성 참조 e.g:None;0b;1k;1m
#conf.skip_size = "0b"
conf.skip_size = "None"
#프록시 옵션
[ProxyHandler]
#프록시 구성. 기본값 "None", 프록시 비활성화. 다른 예시 e.g:{"http":"http://127.0.0.1:8080","https":"https://127.0.0.1:8080"}
#conf.proxy_server = {"http":"http://127.0.0.1:8080","https":"https://127.0.0.1:8080"}
conf.proxy_server = None
#Debug 옵션
[DebugMode]
#payload 출력 후 종료
conf.debug = 0
#update 옵션
[CheckUpdate]
#github에서 업데이트 확인. 아직 구현되지 않음.
conf.update = 0
사전 파일은 프로젝트 루트 디렉토리의 data 폴더에 저장됩니다.
bar.log.start() 오류 발생 해결 방법: progressbar2를 설치하세요. progressbar를 제거하세요. 동일한 이름의 모듈이 임포트되는 것을 방지합니다. 한 분의 도움에 감사드립니다.실행 명령어:
python3 -m pip uninstall progressbar
python3 -m pip install progressbar2
dirmap 개발 과정에서 많은 훌륭한 오픈소스 프로젝트의 패턴과 아이디어를 참고했습니다. 이에 감사드립니다.
mail: [email protected]
