cURL이란?

min·2022년 1월 27일
0

출처
http://dry-kiss.blogspot.com/2012/04/curl.html
https://stackoverflow.com/questions/12399087/curl-to-access-a-page-that-requires-a-login-from-a-different-page
https://okky.kr/article/389113

cURL이란?

  • 클라이언트에서 커맨드 라인이나 소스 코드로 손 쉽게 웹 브라우저처럼 활동할 수 있도록 해주는 기술
  • 서버와 통신할 수 있는 커맨드 명령어 툴
  • 수 많은 프로토콜을 지원(DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, Telnet, TFTP)
  • 하나의 서버에서 다른 서버로 데이터를 전송하는 데 사용되는 명령어 도구
  • 커맨드 라인이나 소스 코드로 웹 페이자와 통신 할 수 있게 하는 툴

cURL을 이용한 로그인이 필요한 페이지 접근

쿠키를 이용해서 로그인 해야지 접근 할 수 있는 페이지에 접근이 가능 함

curl --user user:pass --cookie-jar ./somefile https://xyz.com/a
curl -c cookie.txt -d "LoginName=someuser" -d "password=somepass" https://oursite/a
curl -b cookie.txt https://oursite/b
profile
발등에 불이 따뜻하다..

0개의 댓글