
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
A ruby client and CLI for mvg-live.de the real-time interface for Munich's public transportation service.
docker pull rmoriz/mvg-live:latest
docker run -it --rm rmoriz/mvg-live Marienplatz
gem install mvg-live
Please use Ruby 2.2.x or greater.
require 'mvg/live'
result = MVG::Live.fetch 'Sendlinger Tor'
=> [{:line=>"U7", :destination=>"Westfriedhof", :minutes=>0}, {:line=>"U3", :destination=>"Olympiazentrum", :minutes=>0}, {:line=>"17", :destination=>"Schwanseestraße", :minutes=>0}, {:line=>"U3", :destination=>"Fürstenried West", :minutes=>0}, {:line=>"16", :destination=>"Romanplatz", :minutes=>0}, {:line=>"27", :destination=>"Petuelring", :minutes=>0}, {:line=>"152", :destination=>"Landshuter Allee", :minutes=>1}, {:line=>"U2", :destination=>"Feldmoching", :minutes=>1}, {:line=>"18", :destination=>"Effnerplatz", :minutes=>1}, {:line=>"U1", :destination=>"Olympia-Einkaufsz.", :minutes=>2}, {:line=>"U7", :destination=>"Neuperlach Zentrum", :minutes=>2}, {:line=>"U6", :destination=>"Klinikum Großhadern", :minutes=>2}, {:line=>"U6", :destination=>"Garching-Forschungs.", :minutes=>3}, {:line=>"18", :destination=>"Gondrellplatz", :minutes=>3}, {:line=>"16", :destination=>"St. Emmeram", :minutes=>4}, {:line=>"17", :destination=>"Amalienburgstraße", :minutes=>4}, {:line=>"U3", :destination=>"Moosach", :minutes=>4}, {:line=>"U3", :destination=>"Fürstenried West", :minutes=>5}, {:line=>"U2", :destination=>"Messestadt Ost", :minutes=>5}, {:line=>"U1", :destination=>"Mangfallplatz", :minutes=>6}]
result = MVG::Live.fetch 'Sendlinger Tor', :transports => [ :tram ]
=> [{:line=>"17", :destination=>"Schwanseestraße", :minutes=>0}, {:line=>"16", :destination=>"Romanplatz", :minutes=>1}, {:line=>"27", :destination=>"Petuelring", :minutes=>1}, {:line=>"18", :destination=>"Effnerplatz", :minutes=>2}, {:line=>"18", :destination=>"Gondrellplatz", :minutes=>3}, {:line=>"16", :destination=>"St. Emmeram", :minutes=>4}, {:line=>"17", :destination=>"Amalienburgstraße", :minutes=>5}, {:line=>"16", :destination=>"Romanplatz", :minutes=>8}, {:line=>"17", :destination=>"Schwanseestraße", :minutes=>9}, {:line=>"27", :destination=>"Petuelring", :minutes=>9}, {:line=>"18", :destination=>"Effnerplatz", :minutes=>9}, {:line=>"18", :destination=>"Gondrellplatz", :minutes=>12}, {:line=>"16", :destination=>"St. Emmeram", :minutes=>13}, {:line=>"17", :destination=>"Amalienburgstraße", :minutes=>16}, {:line=>"27", :destination=>"Petuelring", :minutes=>16}, {:line=>"16", :destination=>"Romanplatz", :minutes=>17}, {:line=>"18", :destination=>"Effnerplatz", :minutes=>17}, {:line=>"17", :destination=>"Schwanseestraße", :minutes=>19}, {:line=>"18", :destination=>"Gondrellplatz", :minutes=>22}, {:line=>"16", :destination=>"St. Emmeram", :minutes=>23}]
This gem provides two scripts:
Returns a human readable listing of the next depatures
$ mvg Hauptbahnhof
$ mvg Marienplatz
$ mvg Moosach Bf.
example output:
================================================
Hauptbahnhof: U, Bus, Tram, S
======================================[ 09:03 ]=
19 | Pasing | 0 Minuten
16 | Romanplatz | 1 Minuten
U2 | Feldmoching | 1 Minuten
U1 | Mangfallplatz | 1 Minuten
S8 | Herrsching | 2 Minuten
U2 | Messestadt Ost | 3 Minuten
17 | Schwanseestraße | 3 Minuten
S7 | Aying | 4 Minuten
U4 | Arabellapark | 4 Minuten
U4 | Theresienwiese | 5 Minuten
S6 | Ostbahnhof | 5 Minuten
U2 | Messestadt Ost | 6 Minuten
S2 | Petershausen | 6 Minuten
20 | Moosach Bf. | 6 Minuten
U1 | Olympia - Einkaufszentrum | 6 Minuten
19 | Pasing | 8 Minuten
U5 | Neuperlach Süd | 8 Minuten
16 | Romanplatz | 8 Minuten
U5 | Laimer Platz | 9 Minuten
U1 | Mangfallplatz | 11 Minuten
displays alternates/suggestions in case of unclear/invalid station name:
$ mvg Tor
================================================
/!\ Station unknown! Did you mean...? /!\
================================================
- Am Münchner Tor
- Sendlinger Tor
Returns JSON
$ mvg_json Hauptbahnhof
$ mvg_json Marienplatz
$ mvg_json Moosach Bf.
You can specify a default station or a default transports list (e.g. only specific transport systems) in a JSON file. This only affects the CLI version! The first available file will be loaded:
MVG_FILE
PWD
)HOME
)Example .mvg file:
{"default_transports":["u"],"default_station":"Hauptbahnhof"}
This limits the transports to U-Bahn and uses "Hauptbahnhof" as default station:
$ mvg
=[ /Users/rmoriz/.mvg ]=
Hauptbahnhof: U
======================================[ 13:34 ]=
U1 | Mangfallplatz | 0 Minuten
U2 | Feldmoching | 0 Minuten
U4 | Arabellapark | 3 Minuten
U4 | Theresienwiese | 4 Minuten
...
You can overwrite the station as mentioned above but the transport limitation is currently global!
$ mvg Ostbahnhof
=[ /Users/rmoriz/.mvg ]=
Ostbahnhof: U
======================================[ 13:37 ]=
U5 | Neuperlach Süd | 2 Minuten
U5 | Laimer Platz | 8 Minuten
U5 | Neuperlach Süd | 12 Minuten
...
The default transports list (= all available) is:
Ruby:
[ :u, :bus, :tram, :s ]
JSON:
["u", "bus", "tram", "s"]
see "specs/"-directory
This project is not related, acknowledged, sponsored... by MVG or SWM. Use at your own risk.
see LICENSE file (MIT)
Copyright © 2016 Roland Moriz, Moriz GmbH
FAQs
Unknown package
We found that mvg-live demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.