Skip to content

Instantly share code, notes, and snippets.

@4ft35t
Created August 19, 2024 08:41
Show Gist options
  • Select an option

  • Save 4ft35t/925c2b44335fbd554f7435c1a6deb936 to your computer and use it in GitHub Desktop.

Select an option

Save 4ft35t/925c2b44335fbd554f7435c1a6deb936 to your computer and use it in GitHub Desktop.

Revisions

  1. 4ft35t created this gist Aug 19, 2024.
    21 changes: 21 additions & 0 deletions simyo-esim.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    #!/bin/bash

    # get eSim LPA profile
    # https://blog.ugoearn.com/simyo_5ber/
    # https://shuzijumin.com/thread-479-1-1.html

    phone_number="06..."
    password="..."

    simyo_curl() {
    curl \
    -H 'X-Client-Token: e77b7e2f43db41bb95b17a2a11581a38' \
    -H 'X-Client-Platform: android' \
    -H 'X-Client-Version: 4.8.1' \
    -H 'User-Agent: MijnSimyo/3.64.4 (Linux; Android 13; Scale/2.75)' \
    -H 'Content-Type: application/json; charset=UTF-8' \
    "$@"
    }

    esim_code=$(simyo_curl https://appapi.simyo.nl/simyoapi/api/v1/sessions -d '{"password":"'"$password"'","phoneNumber":"'$phone_number'"}' | tee /tmp/.simyo-esim | jq -r '.result.esimCode')
    echo -e "eSim code:\nLPA:$esim_code"