pindo 4.7.3 → 4.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c21050abb1c90a03a0692aac01e408ff0bbce3968b89677358bec75c1e903c7e
4
- data.tar.gz: '0235831d8df25e4c7227a4980339a858aa8d271f72480ac6f9afc727d1898cae'
3
+ metadata.gz: e8159df0872fa738e51e47c58871fd774599288933ad5b0abb06a1f75d034576
4
+ data.tar.gz: 7092870505178a36f55cc54d5eaa8248314a0f5c0af5188f446dab6e42bb65d0
5
5
  SHA512:
6
- metadata.gz: 3b2b2a2a3e7efdcfe0882510269d7bb8b10ab49a571c15f01f5a6538f64a909fd90b91d246d100b1f9883462adec0f25ae0fda3f5c8640cba235009bd94bbbe0
7
- data.tar.gz: 2fa34d8dd3cc0f7c4d0ab76354b63a5bde85307990f33cb08fa7a8fc7654a0eff88b7a2faf882325ba61431ee6b211e3fccdffcca062fe9556b2344300e1fc87
6
+ metadata.gz: bb1cf7c60caf44e8d92ee0d0cab2118c63fd842c4d0a27a3d4e0a0b33ac03d01a3a4b59b29c7589f30476f957dcd5011c4b0753bb155aa1efe2762fa19730ee3
7
+ data.tar.gz: b734c08d987650edd74d00b63a1c7bd9eec5dd7ba5ba947691f5a82a539b04e09fb3d96d76d5fde205f6fbca1bab6ec23137afc5503ad0cd42a9d8edc6b0a8d7
@@ -1,7 +1,7 @@
1
1
  require 'openssl'
2
2
 
3
3
  module Pindo
4
-
4
+
5
5
 
6
6
  module AESHelper
7
7
 
@@ -17,7 +17,7 @@ module Pindo
17
17
 
18
18
  unless password
19
19
  password = FastlaneCore::Helper.ask_password(message: "请输入证书仓库的加密密码: ", confirm: true)
20
- Security::InternetPassword.add(server_name, "", password)
20
+ Security::InternetPassword.add(server_name, "", password)
21
21
  end
22
22
  return password
23
23
  end
@@ -54,17 +54,9 @@ module Pindo
54
54
  def self.encrypt_specific_file(src_file: nil, password: nil, output_dir: nil)
55
55
  UI.user_error!("No password supplied") if password.to_s.strip.length == 0
56
56
 
57
- data_to_encrypt = File.binread(path)
58
- salt = SecureRandom.random_bytes(8)
59
-
60
- # The :: is important, as there is a name clash
61
- cipher = ::OpenSSL::Cipher.new('AES-256-CBC')
62
- cipher.encrypt
63
- cipher.pkcs5_keyivgen(password, salt, 1, "MD5")
64
- encrypted_data = "Salted__" + salt + cipher.update(data_to_encrypt) + cipher.final
65
-
66
57
  destfile = File.join(output_dir, File.basename(src_file))
67
- File.write(destfile, Base64.encode64(encrypted_data))
58
+ e = Match::Encryption::MatchFileEncryption.new
59
+ e.encrypt(file_path: src_file, password: password, output_path:destfile)
68
60
  return destfile
69
61
  rescue error
70
62
  puts path
@@ -74,32 +66,20 @@ module Pindo
74
66
  # The encryption parameters in this implementations reflect the old behavior which depended on the users' local OpenSSL version
75
67
  # 1.0.x OpenSSL and earlier versions use MD5, 1.1.0c and newer uses SHA256, we try both before giving an error
76
68
  def self.decrypt_specific_file(src_file: nil, password: nil, output_dir: nil, hash_algorithm: "MD5")
77
-
78
- begin
79
- stored_data = Base64.decode64(File.read(src_file))
80
- salt = stored_data[8..15]
81
- data_to_decrypt = stored_data[16..-1]
82
69
 
83
- decipher = ::OpenSSL::Cipher.new('AES-256-CBC')
84
- decipher.decrypt
85
- decipher.pkcs5_keyivgen(password, salt, 1, hash_algorithm)
86
-
87
- decrypted_data = decipher.update(data_to_decrypt) + decipher.final
70
+ begin
88
71
  destfile = File.join(output_dir, File.basename(src_file))
89
- File.binwrite(destfile, decrypted_data)
72
+ e = Match::Encryption::MatchFileEncryption.new
73
+ e.decrypt(file_path: src_file, password: password, output_path:destfile)
90
74
  return destfile
91
75
  rescue => error
92
- fallback_hash_algorithm = "SHA256"
93
- if hash_algorithm != fallback_hash_algorithm
94
- decrypt_specific_file(src_file: src_file, password: password, hash_algorithm: fallback_hash_algorithm)
95
- else
96
76
  Funlog.instance.fancyinfo_error("解析文件失败: #{src_file}")
77
+ raise Informative, error
97
78
  return nil
98
- end
99
79
  end
100
80
  end
101
81
 
102
- end
103
82
 
104
83
 
84
+ end
105
85
  end
@@ -92,9 +92,9 @@ module Pindo
92
92
  temp_version = @config_json["app_info"]["app_version"]
93
93
  end
94
94
 
95
- if @com_name.nil? && @config_json.nil? && @config_json["account_info"] && @config_json["app_info"]["acount_company_name"]
95
+ if (@com_name.nil? || @com_name.empty?) && !@config_json.nil? && !@config_json["account_info"].nil? && !@config_json["account_info"]["acount_company_name"].nil?
96
96
  @com_name = @config_json["account_info"]["acount_company_name"].strip
97
- end
97
+ end
98
98
 
99
99
  app = nil
100
100
  if !temp_bundle_id.nil?
@@ -378,16 +378,13 @@ module Pindo
378
378
  include: 'territory',
379
379
  filter: {
380
380
  territory: 'USA',
381
- price_tier: purchase_item["price_tier"]
382
381
  },
383
- limit:100
382
+ limit:800
384
383
  )
385
384
  # puts JSON.pretty_generate(respose_price)
386
385
 
387
-
388
386
  price_id = nil
389
387
 
390
-
391
388
  respose_price[:data].each do |price_item|
392
389
  if price_item[:attributes][:customer_price].to_s.eql?(purchase_item["price"].to_s)
393
390
  price_id = price_item[:id]
@@ -395,8 +392,9 @@ module Pindo
395
392
  puts " 更新价格 :" + purchase_item["price"] +"$"
396
393
  end
397
394
  end
395
+
398
396
  if !price_id.nil?
399
- in_app_purchase = appstore_client.create_in_app_purchase_price_schedule(
397
+ purchase_response = appstore_client.create_in_app_purchase_price_schedule(
400
398
  relationships: {
401
399
  manual_prices: {
402
400
  data: [
@@ -411,32 +409,32 @@ module Pindo
411
409
  type: 'inAppPurchases',
412
410
  id: in_app_purchase_id
413
411
  }
412
+ },
413
+ baseTerritory: {
414
+ data: {
415
+ type: 'territories',
416
+ id: 'USA'
417
+ }
414
418
  }
415
419
  },
416
420
  included: [
417
421
  {
418
- type: 'inAppPurchasePrices',
419
- id: '${price1}',
420
- attributes: {
421
- startDate: nil
422
- },
423
- relationships: {
424
- inAppPurchaseV2: {
425
- data: {
426
- type: 'inAppPurchases',
427
- id: in_app_purchase_id
428
- }
422
+ type: 'inAppPurchasePrices',
423
+ id: '${price1}',
424
+ attributes: {
425
+ startDate: nil
429
426
  },
430
- inAppPurchasePricePoint: {
431
- data: {
432
- type: 'inAppPurchasePricePoints',
433
- id: price_id
434
- }
427
+ relationships: {
428
+ inAppPurchasePricePoint: {
429
+ data: {
430
+ type: 'inAppPurchasePricePoints',
431
+ id: price_id
432
+ }
433
+ }
435
434
  }
436
435
  }
437
- }
438
- ]
439
- )
436
+ ])
437
+ # puts JSON.pretty_generate(purchase_response)
440
438
  end
441
439
 
442
440
  rescue => err
data/lib/pindo/version.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  module Pindo
2
2
 
3
- VERSION = "4.7.3"
3
+ VERSION = "4.7.5"
4
4
 
5
5
  class VersionCheck
6
6
 
7
7
  def self.check_pindo_new_version
8
8
 
9
- puts
10
- puts "pindo #{Pindo::VERSION}"
9
+ # puts
10
+ # puts "pindo #{Pindo::VERSION}"
11
11
 
12
12
  begin
13
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pindo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.3
4
+ version: 4.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - wade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-02 00:00:00.000000000 Z
11
+ date: 2024-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide