super_hacker 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/super_hacker.rb +10 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f14a02dc5bdd7308353b2fa0c40ceea55139df8b88b453027f0dbc88b9dc3d28
|
4
|
+
data.tar.gz: 7127fdb4e0ce55fd1fd21e8b8f28a437ee5d9ba7a2f391188a443a1e22f9c27f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cfa333303bbd397b04ced2eb639a3346e669c36c979aef52259384499bac2c43b7e57920ad13652130dca9470823903d46c5fc8fa85af89659a392e02f23bb3
|
7
|
+
data.tar.gz: 44f8957c9c7b2db87066911a538bccefb0b2a107a04f726d01a1af81eb6c69d3a8e0a08f2baa2152f26035a1d256dc13296bd2be0e22bc6a86221525c55180af
|
data/lib/super_hacker.rb
CHANGED
@@ -4,18 +4,19 @@ require 'securerandom'
|
|
4
4
|
#SUPER_HACKER
|
5
5
|
module SuperHacker
|
6
6
|
|
7
|
-
VERSION = "1.0.
|
7
|
+
VERSION = "1.0.6"
|
8
8
|
|
9
9
|
class Hacker
|
10
10
|
def initialize
|
11
|
+
#codegeneratorを作成
|
11
12
|
@cg = CodeGenerator.new()
|
12
13
|
end
|
13
14
|
|
14
15
|
#IPアドレスを入力するまでのシーン
|
15
16
|
def scene_input_ip
|
16
17
|
ip = "192.168.#{rand(1..99)}.#{rand(1..99)}"
|
17
|
-
@cg.type_word_code("You are
|
18
|
-
@cg.type_word_code("Plz
|
18
|
+
@cg.type_word_code("You are get ip address #{ip}")
|
19
|
+
@cg.type_word_code("Plz input ip address")
|
19
20
|
print "[IP]> "
|
20
21
|
user_input_ip = gets.chomp()
|
21
22
|
#比較結果を返す
|
@@ -32,9 +33,9 @@ module SuperHacker
|
|
32
33
|
|
33
34
|
#パスワードを入力させる
|
34
35
|
create_password = SecureRandom.base64(4)
|
35
|
-
@cg.type_word_code("You are get
|
36
|
-
@cg.type_word_code("Plz
|
37
|
-
print "[
|
36
|
+
@cg.type_word_code("You are get password: #{create_password}")
|
37
|
+
@cg.type_word_code("Plz input password")
|
38
|
+
print "[Password]> "
|
38
39
|
password = gets.chomp()
|
39
40
|
|
40
41
|
#比較結果を返す
|
@@ -70,7 +71,7 @@ module SuperHacker
|
|
70
71
|
|
71
72
|
#IPアドレスを入力させる
|
72
73
|
if scene_input_ip == false
|
73
|
-
@cg.type_word_code("You
|
74
|
+
@cg.type_word_code("You are input mistakes..")
|
74
75
|
scene_faild
|
75
76
|
next
|
76
77
|
end
|
@@ -82,6 +83,7 @@ module SuperHacker
|
|
82
83
|
next
|
83
84
|
end
|
84
85
|
|
86
|
+
#クリア
|
85
87
|
@cg.type_word_code("Infiltration succeeded")
|
86
88
|
|
87
89
|
#成功
|
@@ -93,7 +95,7 @@ module SuperHacker
|
|
93
95
|
break
|
94
96
|
else
|
95
97
|
#入力ミス
|
96
|
-
@cg.type_word_code("
|
98
|
+
@cg.type_word_code("!!INPUT ERROR!!")
|
97
99
|
end
|
98
100
|
end
|
99
101
|
end
|