Skip to content

Instantly share code, notes, and snippets.

@Y7n05h
Last active November 29, 2021 03:51
Show Gist options
  • Select an option

  • Save Y7n05h/a0e366e95587dbf7e92535e41ceb67e4 to your computer and use it in GitHub Desktop.

Select an option

Save Y7n05h/a0e366e95587dbf7e92535e41ceb67e4 to your computer and use it in GitHub Desktop.

Revisions

  1. Y7n05h revised this gist Nov 29, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions getGlibcVersion.zsh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    #!/usr/bin/zsh
    # Depends on: strings grep sha1sum curl jq

    # Powered by the libc-database search API
    # https://github.com/niklasb/libc-database/tree/master/searchengine

    strings $1 |grep 'GNU C Library'
    sha1str=$(sha1sum $1)
  2. Y7n05h revised this gist Nov 29, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions getGlibcVersion.zsh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    #!/usr/bin/zsh
    # Depends on: strings grep sha1sum curl jq
    # Powered by the libc-database search API

    strings $1 |grep 'GNU C Library'
    sha1str=$(sha1sum $1)
  3. Y7n05h created this gist Nov 29, 2021.
    6 changes: 6 additions & 0 deletions getGlibcVersion.zsh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/usr/bin/zsh
    # Depends on: strings grep sha1sum curl jq

    strings $1 |grep 'GNU C Library'
    sha1str=$(sha1sum $1)
    curl -s -X POST -H 'Content-Type: application/json' --data "{\"sha1\": \"${sha1str// */}\"}" 'https://libc.rip/api/find'|jq -r '.[]'