overlook-csgo 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4315287d2d511f86432769b0502b8c577f01f224
4
- data.tar.gz: d01328bc2470a355e6518211c3edb7b44b9517a8
3
+ metadata.gz: 2c589e51df4df33aa3df5fd0567e68f3523d3fa2
4
+ data.tar.gz: 42af28212e75f9dd36803373850d30ac978ae64b
5
5
  SHA512:
6
- metadata.gz: 96719088e5dee74f35585db2972f95909004a068eaf351b5db4399f6985b3f2d6d3adfc7301eb326cabeb0d6575871032cc8a4ca0d5cb28549fec83d123cf9e2
7
- data.tar.gz: ed622e5f5992827ddc2c2473a8183f2dcd5b55b5224c08c297fc5b97d6ae955e148ffbfb3639a248294e78f964c246afff232750d3f015a761026560e352a04b
6
+ metadata.gz: feb1c94c5bad6ea0394c3af67271dc99c82c7083413aac67eba859ad9d00182bc33e7f7fffd4faaee9db73d64186ca0dceb631c3efe33a00061a1f318f93a31b
7
+ data.tar.gz: ff4e2db1be562e5ed52e5eb10c661b25db4c79e70f1964b128bf7fa586fc725903003f4dd34a5bc8d6db172e5c671edd2fcb8d57e10fbd0cb4f3abd9b39be76d
data/.gitignore CHANGED
@@ -1,5 +1,5 @@
1
1
  pkg/*
2
2
  tmp/*
3
- lib/proto/downloaded/*
3
+ lib/proto/proto/*
4
4
  .DS_Store
5
- spec/.DS_Store
5
+ spec/.DS_Store
@@ -10,12 +10,12 @@ GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  addressable (2.4.0)
13
- ast (2.2.0)
13
+ ast (2.3.0)
14
14
  axiom-types (0.1.1)
15
15
  descendants_tracker (~> 0.0.4)
16
16
  ice_nine (~> 0.11.0)
17
17
  thread_safe (~> 0.3, >= 0.3.1)
18
- beefcake (1.1.0)
18
+ beefcake (1.2.0)
19
19
  codeclimate-engine-rb (0.3.1)
20
20
  virtus (~> 1.0)
21
21
  coderay (1.1.1)
@@ -42,7 +42,7 @@ GEM
42
42
  addressable (~> 2.3)
43
43
  spoon (~> 0.0.1)
44
44
  method_source (0.8.2)
45
- parser (2.3.0.6)
45
+ parser (2.3.1.0)
46
46
  ast (~> 2.2)
47
47
  pry (0.10.3)
48
48
  coderay (~> 1.1.0)
@@ -55,7 +55,7 @@ GEM
55
55
  spoon (~> 0.0)
56
56
  rainbow (2.1.0)
57
57
  rake (10.5.0)
58
- reek (3.11)
58
+ reek (4.0.2)
59
59
  codeclimate-engine-rb (~> 0.3.1)
60
60
  parser (~> 2.3, >= 2.3.0.6)
61
61
  rainbow (~> 2.0)
@@ -63,7 +63,7 @@ GEM
63
63
  rspec-core (~> 3.4.0)
64
64
  rspec-expectations (~> 3.4.0)
65
65
  rspec-mocks (~> 3.4.0)
66
- rspec-core (3.4.3)
66
+ rspec-core (3.4.4)
67
67
  rspec-support (~> 3.4.0)
68
68
  rspec-expectations (3.4.0)
69
69
  diff-lcs (>= 1.2.0, < 2.0)
@@ -72,15 +72,15 @@ GEM
72
72
  diff-lcs (>= 1.2.0, < 2.0)
73
73
  rspec-support (~> 3.4.0)
74
74
  rspec-support (3.4.1)
75
- ruby_parser (3.8.1)
75
+ ruby_parser (3.8.2)
76
76
  sexp_processor (~> 4.1)
77
- rubycritic (2.8.0)
77
+ rubycritic (2.9.1)
78
78
  colorize
79
79
  flay (= 2.7.0)
80
80
  flog (= 4.3.2)
81
81
  launchy (= 2.4.3)
82
- parser (~> 2.3)
83
- reek (= 3.11)
82
+ parser (= 2.3.1.0)
83
+ reek (= 4.0.2)
84
84
  ruby_parser (~> 3.8)
85
85
  virtus (~> 1.0)
86
86
  sexp_processor (4.7.0)
data/Rakefile CHANGED
@@ -4,3 +4,41 @@ require 'rspec/core/rake_task'
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
6
  task default: :spec
7
+
8
+ namespace :proto do
9
+ desc 'Update the generated proto'
10
+ task :update do
11
+ proto_version = '2.6.0'
12
+
13
+ FileUtils.mkdir_p('./lib/proto/proto')
14
+ FileUtils.mkdir_p('./lib/proto/compiled')
15
+
16
+ base_url = "https://raw.githubusercontent.com/SteamRE/SteamKit/master/Resources/Protobufs/csgo/"
17
+ protos = %w(cstrike15_gcmessages.proto cstrike15_usermessages.proto netmessages.proto steammessages.proto)
18
+
19
+ Dir.chdir('./lib/proto/proto') do
20
+ protos.each do |file|
21
+ `curl -O #{base_url}/#{file}`
22
+ end
23
+
24
+ `curl -L https://github.com/google/protobuf/archive/v#{proto_version}.tar.gz -o protobuf.tar.gz`
25
+ `rm -f protobuf.tar`
26
+ `gunzip protobuf.tar.gz`
27
+ `tar -xvzf protobuf.tar`
28
+
29
+ protos.each do |file|
30
+ `protoc --beefcake_out ../compiled -I . -I protobuf-#{proto_version}/src #{file}`
31
+
32
+ %w(key_t class_t sendprop_t descriptor_t sounddata_t).each do |broken|
33
+ fixed = broken
34
+ fixed[0] = fixed[0].capitalize
35
+
36
+ `sed 's/#{broken}/#{fixed}/g' #{file}`
37
+ end
38
+ end
39
+ end
40
+
41
+
42
+ puts "**** Beefcake generates some invalid Ruby, the generated files may need small hand corrections ****"
43
+ end
44
+ end
@@ -7,8 +7,8 @@ require 'overlook/byte_reader'
7
7
 
8
8
  require 'proto/compiled/descriptor.pb'
9
9
  require 'proto/compiled/netmessages.pb'
10
- require 'proto/compiled/cstrike15_usermessages.pb'
11
10
  require 'proto/compiled/cstrike15_gcmessages.pb'
11
+ require 'proto/compiled/cstrike15_usermessages.pb'
12
12
 
13
13
  require 'steamidlib'
14
14
 
@@ -6,8 +6,9 @@ module Overlook
6
6
  class UserMessageMessageHandler
7
7
  include SteamIDs
8
8
 
9
- SERVER_RANK_UPDATE_MESSAGE_TYPE = 52
10
- XP_UPDATE_MESSAGE_TYPE = 65
9
+ SERVER_RANK_UPDATE_MESSAGE_TYPE = 52
10
+ XP_UPDATE_MESSAGE_TYPE = 65
11
+ SEND_PLAYER_ITEM_DROP_MESSAGE_TYPE = 61
11
12
 
12
13
  def initialize(parser)
13
14
  @parser = parser
@@ -17,13 +18,23 @@ module Overlook
17
18
  user_message = CSVCMsg_UserMessage.decode(message)
18
19
 
19
20
  case user_message.msg_type
21
+ when SEND_PLAYER_ITEM_DROP_MESSAGE_TYPE
22
+ # nop
20
23
  when XP_UPDATE_MESSAGE_TYPE
21
24
  xp_update_message = CCSUsrMsg_XpUpdate.decode(user_message.msg_data)
22
-
23
25
  community_id = SteamID32.parse("[U:1:#{xp_update_message.data.account_id}]").to_steamID64.to_s
24
- xp_update_message.data.xp_progress_data.each do |update|
25
- # wip
26
- end
26
+
27
+ xp_update = {
28
+ community_id => {
29
+ xp: xp_update_message.data.current_xp,
30
+ lvl: xp_update_message.data.current_level,
31
+ progress: xp_update_message.data.xp_progress_data.map do |item|
32
+ { category: item.xp_category, xp: item.xp_points }
33
+ end
34
+ }
35
+ }
36
+
37
+ @parser.emit(:xp_update, xp_update)
27
38
  when SERVER_RANK_UPDATE_MESSAGE_TYPE
28
39
  server_rank_update_message = CCSUsrMsg_ServerRankUpdate.decode(user_message.msg_data)
29
40
 
@@ -32,7 +43,7 @@ module Overlook
32
43
  # [U:1:account_id]
33
44
  community_id = SteamID32.parse("[U:1:#{update.account_id}]").to_steamID64.to_s
34
45
 
35
- @parser.emit(:rank_update,
46
+ @parser.emit(:rank_update,
36
47
  { community_id: community_id, rank: update.rank_new })
37
48
  end
38
49
  end
@@ -1,3 +1,3 @@
1
1
  module Overlook
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
@@ -151,6 +151,18 @@ class MatchEndItemUpdates
151
151
  include Beefcake::Message
152
152
  end
153
153
 
154
+ class ScoreLeaderboardData
155
+ include Beefcake::Message
156
+
157
+ class Entry
158
+ include Beefcake::Message
159
+ end
160
+
161
+ class AccountEntries
162
+ include Beefcake::Message
163
+ end
164
+ end
165
+
154
166
  class PlayerQuestData
155
167
  include Beefcake::Message
156
168
 
@@ -259,10 +271,6 @@ class CMsgGCCStrike15_v2_MatchmakingServer2GCKick
259
271
  include Beefcake::Message
260
272
  end
261
273
 
262
- class CDataGCCStrike15_v2_MatchmakingLockedInMatch
263
- include Beefcake::Message
264
- end
265
-
266
274
  class CMsgGCCStrike15_v2_MatchmakingGC2ServerRankUpdate
267
275
  include Beefcake::Message
268
276
  end
@@ -689,6 +697,23 @@ class MatchEndItemUpdates
689
697
  optional :item_attr_delta_value, :uint32, 3
690
698
  end
691
699
 
700
+ class ScoreLeaderboardData
701
+
702
+ class Entry
703
+ optional :tag, :uint32, 1
704
+ optional :val, :uint32, 2
705
+ end
706
+
707
+ class AccountEntries
708
+ optional :accountid, :uint32, 1
709
+ repeated :entries, ScoreLeaderboardData::Entry, 2
710
+ end
711
+ optional :quest_id, :uint64, 1
712
+ optional :score, :uint32, 2
713
+ repeated :accountentries, ScoreLeaderboardData::AccountEntries, 3
714
+ repeated :matchentries, ScoreLeaderboardData::Entry, 5
715
+ end
716
+
692
717
  class PlayerQuestData
693
718
 
694
719
  class QuestItemData
@@ -706,6 +731,9 @@ end
706
731
 
707
732
  class CMsgGC_ServerQuestUpdateData
708
733
  repeated :player_quest_data, PlayerQuestData, 1
734
+ optional :binary_data, :bytes, 2
735
+ optional :mm_game_mode, :uint32, 3
736
+ optional :missionlbsdata, ScoreLeaderboardData, 4
709
737
  end
710
738
 
711
739
  class CMsgGCCStrike15_v2_MatchmakingGCOperationalStats
@@ -828,12 +856,14 @@ class CMsgGCCStrike15_v2_MatchmakingServerReservationResponse
828
856
  optional :reward_item_attr_reward_idx, :uint32, 11
829
857
  optional :reward_drop_list, :uint32, 12
830
858
  optional :tournament_tag, :string, 13
859
+ optional :steamdatagram_port, :uint32, 14
831
860
  end
832
861
 
833
862
  class CMsgGCCStrike15_v2_MatchmakingGC2ClientReserve
834
863
  optional :serverid, :uint64, 1
835
- optional :serverip, :uint32, 2
836
- optional :serverport, :uint32, 3
864
+ optional :server_address, :string, 7
865
+ optional :legacy_serverip, :uint32, 2
866
+ optional :legacy_serverport, :uint32, 3
837
867
  optional :reservationid, :uint64, 4
838
868
  optional :reservation, CMsgGCCStrike15_v2_MatchmakingGC2ServerReserve, 5
839
869
  optional :map, :string, 6
@@ -880,6 +910,7 @@ class CMsgGCCStrike15_v2_MatchmakingServerMatchEnd
880
910
  optional :replay_cluster_id, :uint32, 6
881
911
  optional :aborted_match, :bool, 7
882
912
  optional :match_end_quest_data, CMsgGC_ServerQuestUpdateData, 8
913
+ optional :server_version, :uint32, 9
883
914
  end
884
915
 
885
916
  class CMsgGCCStrike15_v2_MatchmakingClient2GCHello
@@ -928,13 +959,6 @@ class CMsgGCCStrike15_v2_MatchmakingServer2GCKick
928
959
  optional :reason, :uint32, 3
929
960
  end
930
961
 
931
- class CDataGCCStrike15_v2_MatchmakingLockedInMatch
932
- optional :client_reservation, CMsgGCCStrike15_v2_MatchmakingGC2ClientReserve, 1
933
- optional :server_stats, CMsgGCCStrike15_v2_MatchmakingServerRoundStats, 2
934
- optional :rtime32_server_info, :uint32, 3
935
- optional :last_round_stats_temp, CMsgGCCStrike15_v2_MatchmakingServerRoundStats, 4
936
- end
937
-
938
962
  class CMsgGCCStrike15_v2_MatchmakingGC2ServerRankUpdate
939
963
  repeated :rankings, PlayerRankingInfo, 1
940
964
  optional :match_id, :uint64, 2
@@ -973,6 +997,7 @@ class CMsgGCCStrike15_v2_ClientReportServer
973
997
  optional :rpt_abusivemodels, :uint32, 2
974
998
  optional :rpt_badmotd, :uint32, 3
975
999
  optional :rpt_listingabuse, :uint32, 4
1000
+ optional :rpt_inventoryabuse, :uint32, 5
976
1001
  optional :match_id, :uint64, 8
977
1002
  end
978
1003
 
@@ -65,6 +65,7 @@ module ECstrike15UserMessages
65
65
  CS_UM_ReportHit = 64
66
66
  CS_UM_XpUpdate = 65
67
67
  CS_UM_QuestProgress = 66
68
+ CS_UM_ScoreLeaderboardData = 67
68
69
  end
69
70
 
70
71
  class CCSUsrMsg_VGUIMenu
@@ -219,6 +220,10 @@ class CCSUsrMsg_QuestProgress
219
220
  include Beefcake::Message
220
221
  end
221
222
 
223
+ class CCSUsrMsg_ScoreLeaderboardData
224
+ include Beefcake::Message
225
+ end
226
+
222
227
  class CCSUsrMsg_XRankGet
223
228
  include Beefcake::Message
224
229
  end
@@ -443,6 +448,7 @@ end
443
448
  class CCSUsrMsg_Damage
444
449
  optional :amount, :int32, 1
445
450
  optional :inflictor_world_pos, CMsgVector, 2
451
+ optional :victim_entindex, :int32, 3
446
452
  end
447
453
 
448
454
  class CCSUsrMsg_RadioText
@@ -478,11 +484,11 @@ class CCSUsrMsg_ProcessSpottedEntityUpdate
478
484
  end
479
485
 
480
486
  class CCSUsrMsg_SendPlayerItemDrops
481
- # repeated :entity_updates, CEconItemPreviewDataBlock, 1
487
+ repeated :entity_updates, CEconItemPreviewDataBlock, 1
482
488
  end
483
489
 
484
490
  class CCSUsrMsg_SendPlayerItemFound
485
- # optional :iteminfo, CEconItemPreviewDataBlock, 1
491
+ optional :iteminfo, CEconItemPreviewDataBlock, 1
486
492
  optional :entindex, :int32, 2
487
493
  end
488
494
 
@@ -556,6 +562,11 @@ class CCSUsrMsg_QuestProgress
556
562
  optional :quest_id, :uint32, 1
557
563
  optional :normal_points, :uint32, 2
558
564
  optional :bonus_points, :uint32, 3
565
+ optional :is_event_quest, :bool, 4
566
+ end
567
+
568
+ class CCSUsrMsg_ScoreLeaderboardData
569
+ optional :data, ScoreLeaderboardData, 1
559
570
  end
560
571
 
561
572
  class CCSUsrMsg_XRankGet
@@ -619,10 +630,6 @@ class CCSUsrMsg_ServerRankUpdate
619
630
  repeated :rank_update, CCSUsrMsg_ServerRankUpdate::RankUpdate, 1
620
631
  end
621
632
 
622
- class CMsgGCCstrike15_v2_GC2ServerNotifyXPRewarded
623
- include Beefcake::Message
624
- end
625
-
626
633
  class CCSUsrMsg_XpUpdate
627
634
  optional :data, CMsgGCCstrike15_v2_GC2ServerNotifyXPRewarded, 1
628
635
  end
@@ -26,6 +26,7 @@ module CLC_Messages
26
26
  clc_SplitPlayerConnect = 16
27
27
  clc_ClientMessage = 17
28
28
  clc_CmdKeyValues = 18
29
+ clc_HltvReplay = 20
29
30
  end
30
31
 
31
32
  module VoiceDataFormat_t
@@ -67,6 +68,14 @@ module SVC_Messages
67
68
  svc_PaintmapData = 33
68
69
  svc_CmdKeyValues = 34
69
70
  svc_EncryptedData = 35
71
+ svc_HltvReplay = 36
72
+ end
73
+
74
+ module ReplayEventType_t
75
+ REPLAY_EVENT_CANCEL = 0
76
+ REPLAY_EVENT_DEATH = 1
77
+ REPLAY_EVENT_GENERIC = 2
78
+ REPLAY_EVENT_STUCK_NEED_FULL_UPDATE = 3
70
79
  end
71
80
 
72
81
  class CMsgVector
@@ -268,7 +277,7 @@ class CSVCMsg_GameEventList
268
277
  include Beefcake::Message
269
278
  end
270
279
 
271
- class Descriptor
280
+ class Descriptor_t
272
281
  include Beefcake::Message
273
282
  end
274
283
  end
@@ -301,6 +310,14 @@ class CSVCMsg_EncryptedData
301
310
  include Beefcake::Message
302
311
  end
303
312
 
313
+ class CSVCMsg_HltvReplay
314
+ include Beefcake::Message
315
+ end
316
+
317
+ class CCLCMsg_HltvReplay
318
+ include Beefcake::Message
319
+ end
320
+
304
321
  class CMsgVector
305
322
  optional :x, :float, 1
306
323
  optional :y, :float, 2
@@ -330,6 +347,7 @@ class CNETMsg_Tick
330
347
  optional :host_computationtime, :uint32, 4
331
348
  optional :host_computationtime_std_deviation, :uint32, 5
332
349
  optional :host_framestarttime_std_deviation, :uint32, 6
350
+ optional :hltv_replay_flags, :uint32, 7
333
351
  end
334
352
 
335
353
  class CNETMsg_StringCmd
@@ -591,6 +609,7 @@ end
591
609
  class CSVCMsg_UserMessage
592
610
  optional :msg_type, :int32, 1
593
611
  optional :msg_data, :bytes, 2
612
+ optional :passthrough, :int32, 3
594
613
  end
595
614
 
596
615
  class CSVCMsg_PaintmapData
@@ -613,6 +632,7 @@ class CSVCMsg_GameEvent
613
632
  optional :event_name, :string, 1
614
633
  optional :eventid, :int32, 2
615
634
  repeated :keys, CSVCMsg_GameEvent::Key_t, 3
635
+ optional :passthrough, :int32, 4
616
636
  end
617
637
 
618
638
  class CSVCMsg_GameEventList
@@ -622,12 +642,12 @@ class CSVCMsg_GameEventList
622
642
  optional :name, :string, 2
623
643
  end
624
644
 
625
- class Descriptor
645
+ class Descriptor_t
626
646
  optional :eventid, :int32, 1
627
647
  optional :name, :string, 2
628
648
  repeated :keys, CSVCMsg_GameEventList::Key_t, 3
629
649
  end
630
- repeated :descriptors, CSVCMsg_GameEventList::Descriptor, 1
650
+ repeated :descriptors, CSVCMsg_GameEventList::Descriptor_t, 1
631
651
  end
632
652
 
633
653
  class CSVCMsg_TempEntities
@@ -685,3 +705,21 @@ class CSVCMsg_EncryptedData
685
705
  optional :encrypted, :bytes, 1
686
706
  optional :key_type, :int32, 2
687
707
  end
708
+
709
+ class CSVCMsg_HltvReplay
710
+ optional :delay, :int32, 1
711
+ optional :primary_target, :int32, 2
712
+ optional :replay_stop_at, :int32, 3
713
+ optional :replay_start_at, :int32, 4
714
+ optional :replay_slowdown_begin, :int32, 5
715
+ optional :replay_slowdown_end, :int32, 6
716
+ optional :replay_slowdown_rate, :float, 7
717
+ end
718
+
719
+ class CCLCMsg_HltvReplay
720
+ optional :request, :int32, 1
721
+ optional :slowdown_length, :float, 2
722
+ optional :slowdown_rate, :float, 3
723
+ optional :primary_target_ent_index, :int32, 4
724
+ optional :event_time, :float, 5
725
+ end
@@ -649,6 +649,15 @@ class CGCSystemMsg_GetAccountDetails_Response
649
649
  optional :suspension_end_time, :uint32, 21
650
650
  optional :currency, :string, 22
651
651
  optional :steam_level, :uint32, 23
652
+ optional :friend_count, :uint32, 24
653
+ optional :account_creation_time, :uint32, 25
654
+ optional :is_steamguard_enabled, :bool, 27
655
+ optional :is_phone_verified, :bool, 28
656
+ optional :is_two_factor_auth_enabled, :bool, 29
657
+ optional :two_factor_enabled_time, :uint32, 30
658
+ optional :phone_verification_time, :uint32, 31
659
+ optional :phone_id, :uint64, 33
660
+ optional :is_phone_identifying, :bool, 34
652
661
  end
653
662
 
654
663
  class CMsgGCGetPersonaNames
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overlook-csgo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Finnell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-03 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beefcake