pindo 4.7.3 → 4.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pindo/base/aeshelper.rb +9 -29
- data/lib/pindo/command/deploy/itcapp.rb +2 -2
- data/lib/pindo/module/appstore/appstore_in_app_purchase.rb +22 -24
- data/lib/pindo/version.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8159df0872fa738e51e47c58871fd774599288933ad5b0abb06a1f75d034576
|
4
|
+
data.tar.gz: 7092870505178a36f55cc54d5eaa8248314a0f5c0af5188f446dab6e42bb65d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb1cf7c60caf44e8d92ee0d0cab2118c63fd842c4d0a27a3d4e0a0b33ac03d01a3a4b59b29c7589f30476f957dcd5011c4b0753bb155aa1efe2762fa19730ee3
|
7
|
+
data.tar.gz: b734c08d987650edd74d00b63a1c7bd9eec5dd7ba5ba947691f5a82a539b04e09fb3d96d76d5fde205f6fbca1bab6ec23137afc5503ad0cd42a9d8edc6b0a8d7
|
data/lib/pindo/base/aeshelper.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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? &&
|
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:
|
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
|
-
|
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
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
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
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
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
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.
|
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-
|
11
|
+
date: 2024-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|