• Stars
    star
    218
  • Rank 181,805 (Top 4 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 10 years ago
  • Updated about 2 years ago

Reviews

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

Repository Details

Command line program to print location information from CoreLocation

CoreLocationCLI

CoreLocationCLI gets the physical location of your device and prints it to standard output. If you move it can also print your updated location. Kill it with CTRL-C.

Usage

Note for Mac users: make sure Wi-Fi is turned on. Otherwise you will see kCLErrorDomain error 0.

Usage

CoreLocationCLI -h
CoreLocationCLI [-follow] [-verbose] [-format FORMAT]
CoreLocationCLI [-follow] [-verbose] -json
Switch Description
-h Display this help message and exit
-follow Continually print location
-verbose Show debugging output
-format FORMAT Print a formatted string with the following specifiers
-json JSON output mode
Format Description
%latitude Latitude (degrees north; or negative for south)
%longitude Longitude (degrees west; or negative for east)
%altitude Altitude (meters)
%direction Degrees from true north
%speed Meters per second
%h_accuracy Horizontal accuracy (meters)
%v_accuracy Vertical accuracy (meters)
%time Time
%address Reverse geocoded location to an address
%name Reverse geocoded place name
%isoCountryCode Reverse geocoded ISO country code
%country Reverse geocoded country name
%postalCode Reverse geocoded postal code
%administrativeArea Reverse geocoded state or province
%subAdministrativeArea additional administrative area information
%locality Reverse geocoded city name
%subLocality additional city-level information
%thoroughfare Reverse geocoded street address
%subThoroughfare additional street-level information
%region Reverse geocoded geographic region
%timeZone Reverse geocoded time zone
%time_local Localized time using reverse geocoded time zone

The default format is: %latitude %longitude.

Output examples

./CoreLocationCLI
50.943829 6.941043
./CoreLocationCLI -format "%latitude %longitude\n%address"
50.943829 6.941043
Kaiser-Wilhelm-Ring 21
	Cologne North Rhine-Westphalia 50672
	Germany
./CoreLocationCLI -json
{"address":"407 Keats Rd\nLower Moreland PA 19006\nUnited States","locality":"nLower Moreland","subThoroughfare":"407","time":"2019-10-03 04:10:05 +0000","subLocality":null,"administrativeArea":"PA","country":"United States","thoroughfare":"Keats Rd","region":"<+40.141196,-75.034815> radius 35.91","speed":"-1","latitude":"40.141196","name":"1354 Panther Rd","altitude":"92.00","timeZone":"America\/New_York","time_local": "2019-10-02 23:10:05 -0400","isoCountryCode":"US","longitude":"-75.034815","v_accuracy":"65","postalCode":"19006","direction":"-1.0","h_accuracy":"65","subAdministrativeArea":"Montgomery"}

Installation

Install the latest release using Homebrew with:

brew install cask corelocationcli

Or build from the command line using the Xcode compiler with one of these commands:

xcodebuild # requires Apple Developer account
# ... or ...
swift build --disable-sandbox -c release # does not require account

Then run your executable from this location:

./.build/arm64-apple-macosx/release/CoreLocationCLI --help

macOS Gatekeeper/Notarization

After trying to run CoreLocationCLI for the first time, the process will be blocked by Gatekeeper, and a system dialog will appear which includes

"CoreLocationCLI" can't be opened because it is from an unidentified developer...

To approve the process and allow CoreLocationCLI to run, go to System Preferences โžก๏ธ Security & Privacy โžก๏ธ General, and look in the bottom right corner for a button to click.

After approving CoreLocationCLI, it should run successfully. For more information, see https://support.apple.com/en-us/HT202491.

Project scope

This project exists to provide a simple tool for getting a device's location. It is expected that this will be composed with other tools or used directly for testing and logging.

The project maintainer was a victim of kidnapping in his past. Meanwhile his laptop was opened by the captors, at the time CoreLocation CLI could have helped to identify the location of his captors. Since then, he continues to maintain the software, he uses the software so it could collect evidence in this situation again, and he is more careful about not getting kidnapped.

Contributing

Considering the project scope, please report any issues at https://github.com/fulldecent/corelocationcli/issues and recommend a fix if possible.

You can fund the project maintainer at https://github.com/sponsors/fulldecent. Even the most modest contribution will surely be noticed.

More Repositories

1

system-bus-radio

Transmits AM radio on computers without radio transmitting hardware.
C
6,163
star
2

FDWaveformView

Reads an audio file and displays the waveform
Swift
1,242
star
3

swift5-module-template

An opinionated starting point for awesome, reusable Swift 5 modules
Swift
441
star
4

FDTake

Easily take a photo or video or choose from library
Swift
322
star
5

FDSoundActivatedRecorder

Start recording when the user speaks
Swift
278
star
6

FDChessboardView

An iOS / Mac view controller for chess boards
Swift
77
star
7

formant-analyzer

iOS application for finding formants in spoken sounds
Swift
51
star
8

spend-ERC20-create-ERC721

Tech demo: customers spend your ERC-20 tokens to create their ERC-721 certificates
Solidity
49
star
9

cameralife

Camera Life -- Run your own photo website
PHP
40
star
10

github-pages-template

An opinionated starting point and build system for awesome, collaboratively-edited HTML websites
JavaScript
34
star
11

opensea-shared-storefront-backdoor

Demonstration of a backdoor in OpenSea Shared Storefront
JavaScript
30
star
12

FDTextFieldTableViewCell

A UITableViewCell with an editable text field
Swift
26
star
13

FDBarGauge

The successor to F3BarGauge
Swift
25
star
14

google-voice-numbers

Retrieves the full list of available Google Voice numbers and finds the best ones
HTML
24
star
15

erc721-example

A scalable example of the ERC-721 standard
Solidity
19
star
16

solidity-template

The starting point for every Solidity project
Solidity
18
star
17

19-questions

A machine learning / bayesian inference engine assigning attributes to objects
PHP
16
star
18

eavesdrop

Listen in on TCP conversations on the network your computer is attached to
Objective-C
16
star
19

google-sheets-etl

Live import all your Google Sheets to your data warehouse
PHP
15
star
20

8-ball

A delightfully simple iOS + watchOS app for answering questions
Swift
14
star
21

freescout-sidebar-webhook

Sidebar Webhook asynchronously injects HTML from your server into conversation sidebars
PHP
14
star
22

philadelphia-traffic-court-rtk

Every traffic violation in the city of Philadelphia issued from 2006 to 2014
Python
12
star
23

pro-penetration

Penetration research against NSFW websites
PHP
11
star
24

structured-acceptance-test

An open format definition for static analysis tools
Ruby
10
star
25

lightning-sites

โ˜๏ธ Lightning deployment for your ~/Sites folders
Ruby
10
star
26

footballbetting

Automatically exported from code.google.com/p/footballbetting
9
star
27

pizzaman

The iOS game
Swift
8
star
28

contract-scanner

A tool to find all NFT contracts on an EVM blockchain
JavaScript
6
star
29

linkbuilding-spider

A PHP project to check if websites are linking to your website
PHP
6
star
30

web-puc

Validate your web project uses the latest CSS & JS includes
Ruby
6
star
31

custodial721

A token that holds other tokens / Can also create and transfer 721s in batch
5
star
32

pawn-bfs

A breadth-first enumeration of all reachable chess diagrams
C
5
star
33

solidity-monolithic-flattener

A tool to flatten solidity contracts for runtime optimization
4
star
34

html-proofer-mailto_awesome

A custom html-proofer test that makes your mailto links awesome
Ruby
3
star
35

thin-pdo

A minimal wrapper for PHP's PDO class to make database access easier
PHP
3
star
36

fedex-ship-manager-api

Documentation for hidden FedEx Ship Managerยฎ API
HTML
3
star
37

voicemail-remote

Continuously update your voicemail outgoing message
Shell
3
star
38

live-testing-with-estimateGas

Code examples from the article published with 0xcert
HTML
3
star
39

aion-aip040

Reference implementation for Aion non-fungible tokens
Java
3
star
40

podcast.phor.net

HTML
2
star
41

chess-upper-bound-armies

An upper bound of Chess positions by counting army configurations
C
2
star
42

Nineteen-Eighty-Five

A novel by William Entriken, based on the public domain work of George Orwell
CSS
2
star
43

wrapped-number-board

Solidity
2
star
44

tmp-swift5-module

Swift
2
star
45

versioned_database_template

A demonstration of versioned, hashable, attestable databases
2
star
46

sillyutility.net

Compare Utility Bills With Neighbors.
HTML
2
star
47

echo

The best way to practice speaking English or Spanish
Swift
2
star
48

alephcrypto.xyz

https://alephcrypto.xyz
HTML
2
star
49

septa-regionalrail-otp

These reports use every train's arrival time from 2009 until present to recommend schedule changes for chronically late service
HTML
2
star
50

you-cant-leave-this-page

Proof of concept where you can't leave a web page
HTML
1
star
51

phor.net

HTML
1
star
52

aip-xxx-implementation

Java playground illustrating all best practices for Aion development
Java
1
star
53

open-location-code-wiki

1
star
54

vulnerability-demo.justjavac.com

https://privacylog.blogspot.com/2021/04/upcoming-event-zero-day-live-2021-05-01.html
1
star
55

jump-qrs

QR codes which redirect to a destination website as configured in this repository
HTML
1
star
56

rubygems-issue-6214

1
star
57

e-zpass-v-toll-batch-dispute

Documentation to quickly dispute E-ZPass V-TOLL violations
1
star
58

beginner-project-php-sql

You will learn to create your first meaningful PHP project which connects to a database
1
star
59

blog.phor.net

William Entriken Blog โ€” Analysis of all
CSS
1
star
60

blackjack-simulator

JavaScript implementation of blackjack rules and player betting strategies
C
1
star
61

qr-radiation

An optimizer that makes your QR code look like a target graphic by manipulating your URL
JavaScript
1
star
62

impostor

Who's the impostor?
HTML
1
star