• Stars
    star
    705
  • Rank 64,230 (Top 2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ” A CLI tool to extract server certificates

Actions Status Security Rating Coverage Apache2 license GitHub stars chart

SonarCloud

Certificate Ripper ๐Ÿ”

A CLI tool to extract server certificates

Demo

alt text

Advantages

  • It is fast
  • Easy to use
  • No openssl required
  • Runs on any Operating System
  • Can be used with or without Java, native executables are present in the releases
  • Extracts all the sub-fields of the certificate
  • Certificates can be formatted to PEM format
  • Bulk extraction of multiple different urls with a single command is possible
  • Extracted certificates can be stored automatically into a p12 truststore
  • Works also behind a proxy

Installing & Usage

Mac OS X - Homebrew ๐Ÿบ

brew tap hakky54/crip
brew install crip
crip print --url=https://stackoverflow.com/

Windows

  1. Download the latest binary here: Releases
  2. Extract the compressed file
  3. Start cmd and cd to the extracted file
  4. Run start /b "" "crip.exe" print --url=https://stackoverflow.com/

Linux

From Source

  1. Download the latest binary here: Releases
  2. Extract the compressed file
  3. Add the reference to your environment variables: export CRIP_HOME=/path/to/crip/binary
  4. Run crip print --url=https://stackoverflow.com/

Contributed/Unofficial Installation Methods

Arch-Linux (AUR)
  1. Install the certificate-ripper-bin AUR package
  2. Run crip print --url=https://stackoverflow.com/

Using Executable JAR

Minimum requirements:

  1. Java 8
  2. A terminal

Setup

  1. Download the latest JAR here: Releases
  2. Run it with java -jar crip.jar print --url=https://youtube.com/

CLI Options

Usage: crip [COMMAND]
Commands:
  print             Prints the extracted certificates to the console
  export pkcs12     Export the extracted certificate to a PKCS12/p12 type truststore
  export der        Export the extracted certificate to a binary form also known as DER
  export pem        Export the extracted certificate to a base64 encoded string also known as PEM
  
Usage: crip print
Prints the extracted certificates to the console
  -f, --format              To be printed certificate format. This option is not required. Default is human-readable.
  -u, --url                 Url of the target server to extract the certificates. Can be provided multiple times.

Usage: crip export pkcs12
Export the extracted certificate to a PKCS12/p12 type truststore
  -p, --password            TrustStore password. This option is not required. Default is changeit.
  -u, --url                 Url of the target server to extract the certificates. Can be provided multiple times.
  -d, --destination         Destination of the to be stored file. Default is current directory if none is provided.
      
Usage: crip export der
Export the extracted certificate to a binary form also known as DER
  -u, --url                 Url of the target server to extract the certificates. Can be provided multiple times.
  -c, --combined            Indicator to either combine all of the certificate into one file for a given url or export into individual files.
  -d, --destination         Destination of the to be stored file. Default is current directory if none is provided.

Usage: crip export pem
Export the extracted certificate to a base64 encoded string also known as PEM
  -u, --url                 Url of the target server to extract the certificates. Can be provided multiple times.
  -c, --combined            Indicator to either combine all of the certificate into one file for a given url or export into individual files.
  -d, --destination         Destination of the to be stored file. Default is current directory if none is provided.
      --include-header      Indicator to either omit or include additional information above the BEGIN statement.
      
Proxy options applicable for all commands
      --proxy-host          Proxy host
      --proxy-port          Proxy port
      --proxy-password      Password for authenticating the user for the given proxy
      --proxy-user          User for authenticating the user for the given proxy

Example usages

Single export

crip export pkcs12 -u=https://github.com

Bulk export

crip export pkcs12 \
-u=https://youtube.com \
-u=https://github.com \
-u=https://stackoverflow.com \
-u=https://facebook.com

Specify custom truststore destination path

crip export pkcs12 -u=https://github.com -d=/path/to/directory

Print in human-readable format

crip print -u=https://github.com

Print in PEM format

crip print -u=https://github.com -f=pem

Batch print in PEM format

crip print -f=pem \
-u=https://youtube.com \
-u=https://github.com \
-u=https://stackoverflow.com \
-u=https://facebook.com

Extracting behind a proxy

crip print -u=https://stackoverflow.com --proxy-host=my-host.com --proxy-port=1234 --proxy-user=foo --proxy-password

Combining certificates

crip export pem -u=https://github.com --combined=true

Defining custom file name

Works only with the combined option while only specifying a single url.

crip export pem -u=https://github.com --combined=true --destionation=/path/to/export/github-chain.crt

Contributing

There are plenty of ways to contribute to this project:

  • Give it a star
  • Share it with a Tweet
  • Submit a PR

More Repositories

1

mutual-tls-ssl

๐Ÿ” Tutorial of setting up Security for your API with one way authentication with TLS/SSL and mutual authentication for a java based web server and a client with both Spring Boot. Different clients are provided such as Apache HttpClient, OkHttp, Spring RestTemplate, Spring WebFlux WebClient Jetty and Netty, the old and the new JDK HttpClient, the old and the new Jersey Client, Google HttpClient, Unirest, Retrofit, Feign, Methanol, vertx, Scala client Finagle, Featherbed, Dispatch Reboot, AsyncHttpClient, Sttp, Akka, Requests Scala, Http4s Blaze, Kotlin client Fuel, http4k, Kohttp and ktor. Also other server examples are available such as jersey with grizzly. Also gRPC, WebSocket and ElasticSearch examples are included
Java
567
star
2

sslcontext-kickstart

๐Ÿ” A lightweight high level library for configuring a http client or server based on SSLContext or other properties such as TrustManager, KeyManager or Trusted Certificates to communicate over SSL TLS for one way authentication or two way authentication provided by the SSLFactory. Support for Java, Scala and Kotlin based clients with examples. Available client examples are: Apache HttpClient, OkHttp, Spring RestTemplate, Spring WebFlux WebClient Jetty and Netty, the old and the new JDK HttpClient, the old and the new Jersey Client, Google HttpClient, Unirest, Retrofit, Feign, Methanol, Vertx, Scala client Finagle, Featherbed, Dispatch Reboot, AsyncHttpClient, Sttp, Akka, Requests Scala, Http4s Blaze, Kotlin client Fuel, http4k Kohttp and Ktor. Also gRPC, WebSocket and ElasticSearch examples are included
Java
499
star
3

log-captor

๐ŸŽฏ LogCaptor captures log entries for unit and integration testing purposes
Java
366
star
4

java-tutorials

๐Ÿ“ A repository containing different java tutorials
Java
36
star
5

console-captor

๐ŸŽฏ ConsoleCaptor captures console output for unit and integration testing purposes
Java
30
star
6

stream-deck-profile

Elgato Stream Deck Profile
20
star
7

gatekeeper

๐Ÿ” A lightweight java library which guards your publicly accessible internal implementations.
Java
7
star
8

resize-me

An image-resizer app in Java 17, JavaFx and with afterburner framework
Java
5
star
9

jiggler

๐Ÿช„ Mouse Jiggler for you!
Java
4
star
10

ssl-server

Easily setup a SSL Server for testing purposes
Java
2
star
11

homebrew-crip

Ruby
2
star
12

welk-lidwoord

Een app die je helpt met kiezen van het juiste lidwoord
Java
1
star
13

Hakky54

1
star
14

hakky54.github.io

HTML
1
star
15

trust-me

Demo GUI for prompting to trust a server certificate
Java
1
star
16

yaslf4j

yet another simple logging facade for java
Java
1
star
17

random-number

Simple JavaFx app in Java 11 with Spring boot as dependency injection framwork
Java
1
star
18

product-status-checker

Tired of manually checking if a product is available? This lightweight application will take care of that.
Java
1
star