meshtastic 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +27 -0
  3. data/.gitignore +29 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +10 -0
  6. data/.rubocop_todo.yml +107 -0
  7. data/.ruby-gemset +1 -0
  8. data/.ruby-version +1 -0
  9. data/AUTOGEN_meshtastic_protobufs.sh +25 -0
  10. data/CODE_OF_CONDUCT.md +84 -0
  11. data/Gemfile +23 -0
  12. data/LICENSE +21 -0
  13. data/README.md +31 -0
  14. data/Rakefile +17 -0
  15. data/bin/console +11 -0
  16. data/bin/meshtastic_autoinc_version +38 -0
  17. data/bin/setup +8 -0
  18. data/build_meshtastic_gem.sh +58 -0
  19. data/git_commit.sh +23 -0
  20. data/lib/meshtastic/admin_pb.rb +100 -0
  21. data/lib/meshtastic/apponly_pb.rb +20 -0
  22. data/lib/meshtastic/atak_pb.rb +80 -0
  23. data/lib/meshtastic/cannedmessages_pb.rb +16 -0
  24. data/lib/meshtastic/channel_pb.rb +38 -0
  25. data/lib/meshtastic/clientonly_pb.rb +22 -0
  26. data/lib/meshtastic/config_pb.rb +235 -0
  27. data/lib/meshtastic/connection_status_pb.rb +47 -0
  28. data/lib/meshtastic/deviceonly_pb.rb +75 -0
  29. data/lib/meshtastic/localonly_pb.rb +43 -0
  30. data/lib/meshtastic/mesh_pb.rb +359 -0
  31. data/lib/meshtastic/module_config_pb.rb +227 -0
  32. data/lib/meshtastic/mqtt.rb +271 -0
  33. data/lib/meshtastic/mqtt.rb.BAKq! +214 -0
  34. data/lib/meshtastic/mqtt_pb.rb +37 -0
  35. data/lib/meshtastic/paxcount_pb.rb +18 -0
  36. data/lib/meshtastic/portnums_pb.rb +42 -0
  37. data/lib/meshtastic/remote_hardware_pb.rb +27 -0
  38. data/lib/meshtastic/rtttl_pb.rb +16 -0
  39. data/lib/meshtastic/storeforward_pb.rb +64 -0
  40. data/lib/meshtastic/telemetry_pb.rb +85 -0
  41. data/lib/meshtastic/version.rb +5 -0
  42. data/lib/meshtastic/xmodem_pb.rb +30 -0
  43. data/lib/meshtastic.rb +34 -0
  44. data/meshtastic.gemspec +73 -0
  45. data/sig/meshtastic.rbs +4 -0
  46. data/spec/lib/meshtastic/admin_pb_spec.rb +6 -0
  47. data/spec/lib/meshtastic/apponly_pb_spec.rb +6 -0
  48. data/spec/lib/meshtastic/atak_pb_spec.rb +6 -0
  49. data/spec/lib/meshtastic/cannedmessages_pb_spec.rb +6 -0
  50. data/spec/lib/meshtastic/channel_pb_spec.rb +6 -0
  51. data/spec/lib/meshtastic/clientonly_pb_spec.rb +6 -0
  52. data/spec/lib/meshtastic/config_pb_spec.rb +6 -0
  53. data/spec/lib/meshtastic/connection_status_pb_spec.rb +6 -0
  54. data/spec/lib/meshtastic/deviceonly_pb_spec.rb +6 -0
  55. data/spec/lib/meshtastic/localonly_pb_spec.rb +6 -0
  56. data/spec/lib/meshtastic/mesh_pb_spec.rb +6 -0
  57. data/spec/lib/meshtastic/module_config_pb_spec.rb +6 -0
  58. data/spec/lib/meshtastic/mqtt_pb_spec.rb +6 -0
  59. data/spec/lib/meshtastic/mqtt_spec.rb +6 -0
  60. data/spec/lib/meshtastic/paxcount_pb_spec.rb +6 -0
  61. data/spec/lib/meshtastic/portnums_pb_spec.rb +6 -0
  62. data/spec/lib/meshtastic/remote_hardware_pb_spec.rb +6 -0
  63. data/spec/lib/meshtastic/rtttl_pb_spec.rb +6 -0
  64. data/spec/lib/meshtastic/storeforward_pb_spec.rb +6 -0
  65. data/spec/lib/meshtastic/telemetry_pb_spec.rb +6 -0
  66. data/spec/lib/meshtastic/version_spec.rb +17 -0
  67. data/spec/lib/meshtastic/xmodem_pb_spec.rb +6 -0
  68. data/spec/lib/meshtastic_spec.rb +6 -0
  69. data/spec/spec_helper.rb +15 -0
  70. data/upgrade_Gemfile_gems.sh +20 -0
  71. data/upgrade_gem.sh +4 -0
  72. data/upgrade_meshtastic.sh +13 -0
  73. data/upgrade_ruby.sh +45 -0
  74. metadata +106 -3
@@ -0,0 +1,85 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: meshtastic/telemetry.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("meshtastic/telemetry.proto", :syntax => :proto3) do
8
+ add_message "meshtastic.DeviceMetrics" do
9
+ optional :battery_level, :uint32, 1
10
+ optional :voltage, :float, 2
11
+ optional :channel_utilization, :float, 3
12
+ optional :air_util_tx, :float, 4
13
+ optional :uptime_seconds, :uint32, 5
14
+ end
15
+ add_message "meshtastic.EnvironmentMetrics" do
16
+ optional :temperature, :float, 1
17
+ optional :relative_humidity, :float, 2
18
+ optional :barometric_pressure, :float, 3
19
+ optional :gas_resistance, :float, 4
20
+ optional :voltage, :float, 5
21
+ optional :current, :float, 6
22
+ optional :iaq, :uint32, 7
23
+ optional :distance, :float, 8
24
+ end
25
+ add_message "meshtastic.PowerMetrics" do
26
+ optional :ch1_voltage, :float, 1
27
+ optional :ch1_current, :float, 2
28
+ optional :ch2_voltage, :float, 3
29
+ optional :ch2_current, :float, 4
30
+ optional :ch3_voltage, :float, 5
31
+ optional :ch3_current, :float, 6
32
+ end
33
+ add_message "meshtastic.AirQualityMetrics" do
34
+ optional :pm10_standard, :uint32, 1
35
+ optional :pm25_standard, :uint32, 2
36
+ optional :pm100_standard, :uint32, 3
37
+ optional :pm10_environmental, :uint32, 4
38
+ optional :pm25_environmental, :uint32, 5
39
+ optional :pm100_environmental, :uint32, 6
40
+ optional :particles_03um, :uint32, 7
41
+ optional :particles_05um, :uint32, 8
42
+ optional :particles_10um, :uint32, 9
43
+ optional :particles_25um, :uint32, 10
44
+ optional :particles_50um, :uint32, 11
45
+ optional :particles_100um, :uint32, 12
46
+ end
47
+ add_message "meshtastic.Telemetry" do
48
+ optional :time, :fixed32, 1
49
+ oneof :variant do
50
+ optional :device_metrics, :message, 2, "meshtastic.DeviceMetrics"
51
+ optional :environment_metrics, :message, 3, "meshtastic.EnvironmentMetrics"
52
+ optional :air_quality_metrics, :message, 4, "meshtastic.AirQualityMetrics"
53
+ optional :power_metrics, :message, 5, "meshtastic.PowerMetrics"
54
+ end
55
+ end
56
+ add_enum "meshtastic.TelemetrySensorType" do
57
+ value :SENSOR_UNSET, 0
58
+ value :BME280, 1
59
+ value :BME680, 2
60
+ value :MCP9808, 3
61
+ value :INA260, 4
62
+ value :INA219, 5
63
+ value :BMP280, 6
64
+ value :SHTC3, 7
65
+ value :LPS22, 8
66
+ value :QMC6310, 9
67
+ value :QMI8658, 10
68
+ value :QMC5883L, 11
69
+ value :SHT31, 12
70
+ value :PMSA003I, 13
71
+ value :INA3221, 14
72
+ value :BMP085, 15
73
+ value :RCWL9620, 16
74
+ end
75
+ end
76
+ end
77
+
78
+ module Meshtastic
79
+ DeviceMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.DeviceMetrics").msgclass
80
+ EnvironmentMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.EnvironmentMetrics").msgclass
81
+ PowerMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.PowerMetrics").msgclass
82
+ AirQualityMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.AirQualityMetrics").msgclass
83
+ Telemetry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.Telemetry").msgclass
84
+ TelemetrySensorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.TelemetrySensorType").enummodule
85
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Meshtastic
4
+ VERSION = '0.0.3'
5
+ end
@@ -0,0 +1,30 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: meshtastic/xmodem.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("meshtastic/xmodem.proto", :syntax => :proto3) do
8
+ add_message "meshtastic.XModem" do
9
+ optional :control, :enum, 1, "meshtastic.XModem.Control"
10
+ optional :seq, :uint32, 2
11
+ optional :crc16, :uint32, 3
12
+ optional :buffer, :bytes, 4
13
+ end
14
+ add_enum "meshtastic.XModem.Control" do
15
+ value :NUL, 0
16
+ value :SOH, 1
17
+ value :STX, 2
18
+ value :EOT, 4
19
+ value :ACK, 6
20
+ value :NAK, 21
21
+ value :CAN, 24
22
+ value :CTRLZ, 26
23
+ end
24
+ end
25
+ end
26
+
27
+ module Meshtastic
28
+ XModem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.XModem").msgclass
29
+ XModem::Control = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.XModem.Control").enummodule
30
+ end
data/lib/meshtastic.rb ADDED
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'meshtastic/version'
4
+
5
+ # Plugin used to interact with Meshtastic nodes
6
+ module Meshtastic
7
+ # Protocol Buffers for Meshtastic
8
+ autoload :Admin, 'meshtastic/admin'
9
+ autoload :Apponly, 'meshtastic/apponly'
10
+ autoload :ATAK, 'meshtastic/atak'
11
+ autoload :Cannedmessages, 'meshtastic/cannedmessages'
12
+ autoload :Channel, 'meshtastic/channel'
13
+ autoload :Clientonly, 'meshtastic/clientonly'
14
+ autoload :Config, 'meshtastic/config'
15
+ autoload :ConnectionStatus, 'meshtastic/connection_status'
16
+ autoload :Deviceonly, 'meshtastic/deviceonly'
17
+ autoload :Localonly, 'meshtastic/localonly'
18
+ autoload :Mesh, 'meshtastic/mesh'
19
+ autoload :ModuleConfig, 'meshtastic/module_config'
20
+ autoload :MQTT, 'meshtastic/mqtt'
21
+ autoload :Paxcount, 'meshtastic/paxcount'
22
+ autoload :Portnums, 'meshtastic/portnums'
23
+ autoload :RemoteHardware, 'meshtastic/remote_hardware'
24
+ autoload :Rtttl, 'meshtastic/rtttl'
25
+ autoload :Storeforward, 'meshtastic/storeforward'
26
+ autoload :Telemetry, 'meshtastic/telemetry'
27
+ autoload :Xmodem, 'meshtastic/xmodem'
28
+
29
+ # Display a List of Every Meshtastic Module
30
+
31
+ public_class_method def self.help
32
+ constants.sort
33
+ end
34
+ end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+
6
+ require 'meshtastic/version'
7
+
8
+ Gem::Specification.new do |spec|
9
+ ruby_version = ">= #{File.read('.ruby-version').split('-').last.chomp}".freeze
10
+ # spec.required_ruby_version = ruby_version
11
+ spec.required_ruby_version = '>= 3.3.0'
12
+ spec.name = 'meshtastic'
13
+ spec.version = Meshtastic::VERSION
14
+ spec.authors = ['0day Inc.']
15
+ spec.email = ['request.pentest@0dayinc.com']
16
+ spec.summary = 'Automated Security Testing for CI/CD Pipelines & Beyond'
17
+ spec.description = 'https://github.com/0dayinc/meshtastic/README.md'
18
+ spec.homepage = 'https://github.com/0dayinc/meshtastic'
19
+ spec.license = 'MIT'
20
+ spec.metadata['rubygems_mfa_required'] = 'true'
21
+
22
+ spec.files = `git ls-files -z`.split("\x00")
23
+ spec.executables = spec.files.grep(%r{^bin/}) do |f|
24
+ File.basename(f)
25
+ end
26
+
27
+ spec_tests = spec.files.grep(%r{^spec/})
28
+ meshtastic_modules = spec.files.grep(%r{^lib/})
29
+
30
+ missing_rspec = false
31
+ meshtastic_modules.each do |mod_path|
32
+ spec_dirname_for_mod = "spec/#{File.dirname(mod_path)}"
33
+ spec_test_for_mod = "#{File.basename(mod_path).split('.').first}_spec.rb"
34
+ spec_path_for_mod = "#{spec_dirname_for_mod}/#{spec_test_for_mod}"
35
+ next unless spec_tests.grep(/#{spec_path_for_mod}/).empty?
36
+
37
+ missing_rspec = true
38
+ error_msg = "ERROR: No RSpec: #{spec_path_for_mod} for Meshtastic Module: #{mod_path}"
39
+ # Display error message in red (octal encoded ansi sequence)
40
+ puts "\001\e[1m\002\001\e[31m\002#{error_msg}\001\e[0m\002"
41
+ end
42
+
43
+ raise if missing_rspec
44
+
45
+ spec.require_paths = ['lib']
46
+
47
+ dev_dependency_arr = %i[
48
+ bundler
49
+ rake
50
+ rdoc
51
+ rspec
52
+ ]
53
+
54
+ File.readlines('./Gemfile').each do |line|
55
+ columns = line.chomp.split
56
+ next unless columns.first == 'gem'
57
+
58
+ gem_name = columns[1].delete("'").delete(',')
59
+ gem_version = columns.last.delete("'")
60
+
61
+ if dev_dependency_arr.include?(gem_name.to_sym)
62
+ spec.add_development_dependency(
63
+ gem_name,
64
+ gem_version
65
+ )
66
+ else
67
+ spec.add_runtime_dependency(
68
+ gem_name,
69
+ gem_version
70
+ )
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,4 @@
1
+ module Meshtastic
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::VERSION do
6
+ it 'is defined' do
7
+ expect(Meshtastic::VERSION).not_to be_nil
8
+ end
9
+
10
+ it 'is a string' do
11
+ expect(Meshtastic::VERSION).to be_a(String)
12
+ end
13
+
14
+ it 'matches the expected pattern' do
15
+ expect(Meshtastic::VERSION).to match(/\d+\.\d+\.\d+/)
16
+ end
17
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic::AdminPB do
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Meshtastic do
6
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "meshtastic"
4
+
5
+ RSpec.configure do |config|
6
+ # Enable flags like --only-failures and --next-failure
7
+ config.example_status_persistence_file_path = ".rspec_status"
8
+
9
+ # Disable RSpec exposing methods globally on `Module` and `main`
10
+ config.disable_monkey_patching!
11
+
12
+ config.expect_with :rspec do |c|
13
+ c.syntax = :expect
14
+ end
15
+ end
@@ -0,0 +1,20 @@
1
+ #!/bin/bash --login
2
+ cat Gemfile | awk '{print $2}' | grep -E "^'.+$" | grep -v -e rubygems.org | while read gem; do
3
+ this_gem=`echo $gem | sed "s/'//g" | sed 's/\,//g'`
4
+ latest_version=`gem search -r $this_gem | grep -E "^${this_gem}\s.+$" | awk '{print $2}' | sed 's/(//g' | sed 's/)//g' | sed 's/,//g'`
5
+ echo "${this_gem} => $latest_version"
6
+ os=`uname -s`
7
+ if [[ $os == 'Linux' ]]; then
8
+ if [[ $this_gem == 'bundler' ]]; then
9
+ sed -i "s/^gem '${this_gem}'.*$/gem '${this_gem}', '>=${latest_version}'/g" Gemfile
10
+ else
11
+ sed -i "s/^gem '${this_gem}'.*$/gem '${this_gem}', '${latest_version}'/g" Gemfile
12
+ fi
13
+ elif [[ $os == 'Darwin' ]]; then
14
+ if [[ $this_gem == 'bundler' ]]; then
15
+ sed -i '' "s/^gem '${this_gem}'.*$/gem '${this_gem}', '>=${latest_version}'/g" Gemfile
16
+ else
17
+ sed -i '' "s/^gem '${this_gem}'.*$/gem '${this_gem}', '${latest_version}'/g" Gemfile
18
+ fi
19
+ fi
20
+ done
data/upgrade_gem.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/bash --login
2
+ printf "Updating RubyGems (i.e. gem command)..."
3
+ gem update --system
4
+ echo "complete."
@@ -0,0 +1,13 @@
1
+ #!/bin/bash --login
2
+ if [[ $MESHTASTIC_ROOT == '' ]]; then
3
+ if [[ ! -d '/opt/meshtastic' ]]; then
4
+ mesh_root=$(pwd)
5
+ else
6
+ mesh_root='/opt/meshtastic'
7
+ fi
8
+ else
9
+ mesh_root="${MESHTASTIC_ROOT}"
10
+ fi
11
+
12
+ export rvmsudo_secure_path=1
13
+ rvmsudo /bin/bash --login -c "cd ${mesh_root} && ./build_meshtastic_gem.sh"
data/upgrade_ruby.sh ADDED
@@ -0,0 +1,45 @@
1
+ #!/bin/bash --login
2
+ # USE THIS SCRIPT WHEN UPGRADING RUBY
3
+ if [[ $MESHTASTIC_ROOT == '' ]]; then
4
+ if [[ ! -d '/opt/meshtastic' ]]; then
5
+ meshtastic_root=$(pwd)
6
+ else
7
+ meshtastic_root='/opt/meshtastic'
8
+ fi
9
+ else
10
+ meshtastic_root="${MESHTASTIC_ROOT}"
11
+ fi
12
+
13
+ function usage() {
14
+ echo $"Usage: $0 <new ruby version e.g. 2.4.4> <optional bool running from build_meshtastic_gem.sh>"
15
+ exit 1
16
+ }
17
+
18
+ if [[ -f '/etc/profile.d/rvm.sh' ]]; then
19
+ source /etc/profile.d/rvm.sh
20
+ fi
21
+
22
+ new_ruby_version=$1
23
+ if [[ $2 != '' ]]; then
24
+ old_ruby_version=$2
25
+ else
26
+ old_ruby_version=`cat ${meshtastic_root}/.ruby-version`
27
+ fi
28
+
29
+ ruby_gemset=`cat ${meshtastic_root}/.ruby-gemset`
30
+
31
+ if [[ $# < 1 ]]; then
32
+ usage
33
+ fi
34
+
35
+ # Upgrade RVM
36
+ export rvmsudo_secure_path=1
37
+ rvmsudo rvm get head
38
+ rvm reload
39
+
40
+ # Install New Version of RubyGems & Ruby
41
+ cd $meshtastic_root && ./upgrade_gem.sh
42
+ rvmsudo rvm install ruby-$new_ruby_version
43
+ echo $new_ruby_version > $meshtastic_root/.ruby-version
44
+
45
+ cd $meshtastic_root && rvm use $new_ruby_version@$ruby_gemset && ./build_meshtastic_gem.sh
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meshtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
@@ -10,6 +10,34 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2024-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.5.9
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.5.9
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundle-audit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.1.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.1.0
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: geocoder
15
43
  requirement: !ruby/object:Gem::Requirement
@@ -125,10 +153,85 @@ dependencies:
125
153
  description: https://github.com/0dayinc/meshtastic/README.md
126
154
  email:
127
155
  - request.pentest@0dayinc.com
128
- executables: []
156
+ executables:
157
+ - console
158
+ - meshtastic_autoinc_version
159
+ - setup
129
160
  extensions: []
130
161
  extra_rdoc_files: []
131
- files: []
162
+ files:
163
+ - ".github/workflows/main.yml"
164
+ - ".gitignore"
165
+ - ".rspec"
166
+ - ".rubocop.yml"
167
+ - ".rubocop_todo.yml"
168
+ - ".ruby-gemset"
169
+ - ".ruby-version"
170
+ - AUTOGEN_meshtastic_protobufs.sh
171
+ - CODE_OF_CONDUCT.md
172
+ - Gemfile
173
+ - LICENSE
174
+ - README.md
175
+ - Rakefile
176
+ - bin/console
177
+ - bin/meshtastic_autoinc_version
178
+ - bin/setup
179
+ - build_meshtastic_gem.sh
180
+ - git_commit.sh
181
+ - lib/meshtastic.rb
182
+ - lib/meshtastic/admin_pb.rb
183
+ - lib/meshtastic/apponly_pb.rb
184
+ - lib/meshtastic/atak_pb.rb
185
+ - lib/meshtastic/cannedmessages_pb.rb
186
+ - lib/meshtastic/channel_pb.rb
187
+ - lib/meshtastic/clientonly_pb.rb
188
+ - lib/meshtastic/config_pb.rb
189
+ - lib/meshtastic/connection_status_pb.rb
190
+ - lib/meshtastic/deviceonly_pb.rb
191
+ - lib/meshtastic/localonly_pb.rb
192
+ - lib/meshtastic/mesh_pb.rb
193
+ - lib/meshtastic/module_config_pb.rb
194
+ - lib/meshtastic/mqtt.rb
195
+ - lib/meshtastic/mqtt.rb.BAKq!
196
+ - lib/meshtastic/mqtt_pb.rb
197
+ - lib/meshtastic/paxcount_pb.rb
198
+ - lib/meshtastic/portnums_pb.rb
199
+ - lib/meshtastic/remote_hardware_pb.rb
200
+ - lib/meshtastic/rtttl_pb.rb
201
+ - lib/meshtastic/storeforward_pb.rb
202
+ - lib/meshtastic/telemetry_pb.rb
203
+ - lib/meshtastic/version.rb
204
+ - lib/meshtastic/xmodem_pb.rb
205
+ - meshtastic.gemspec
206
+ - sig/meshtastic.rbs
207
+ - spec/lib/meshtastic/admin_pb_spec.rb
208
+ - spec/lib/meshtastic/apponly_pb_spec.rb
209
+ - spec/lib/meshtastic/atak_pb_spec.rb
210
+ - spec/lib/meshtastic/cannedmessages_pb_spec.rb
211
+ - spec/lib/meshtastic/channel_pb_spec.rb
212
+ - spec/lib/meshtastic/clientonly_pb_spec.rb
213
+ - spec/lib/meshtastic/config_pb_spec.rb
214
+ - spec/lib/meshtastic/connection_status_pb_spec.rb
215
+ - spec/lib/meshtastic/deviceonly_pb_spec.rb
216
+ - spec/lib/meshtastic/localonly_pb_spec.rb
217
+ - spec/lib/meshtastic/mesh_pb_spec.rb
218
+ - spec/lib/meshtastic/module_config_pb_spec.rb
219
+ - spec/lib/meshtastic/mqtt_pb_spec.rb
220
+ - spec/lib/meshtastic/mqtt_spec.rb
221
+ - spec/lib/meshtastic/paxcount_pb_spec.rb
222
+ - spec/lib/meshtastic/portnums_pb_spec.rb
223
+ - spec/lib/meshtastic/remote_hardware_pb_spec.rb
224
+ - spec/lib/meshtastic/rtttl_pb_spec.rb
225
+ - spec/lib/meshtastic/storeforward_pb_spec.rb
226
+ - spec/lib/meshtastic/telemetry_pb_spec.rb
227
+ - spec/lib/meshtastic/version_spec.rb
228
+ - spec/lib/meshtastic/xmodem_pb_spec.rb
229
+ - spec/lib/meshtastic_spec.rb
230
+ - spec/spec_helper.rb
231
+ - upgrade_Gemfile_gems.sh
232
+ - upgrade_gem.sh
233
+ - upgrade_meshtastic.sh
234
+ - upgrade_ruby.sh
132
235
  homepage: https://github.com/0dayinc/meshtastic
133
236
  licenses:
134
237
  - MIT