View difference between Paste ID: mfiRtZQ2 and ZJ0v3Epa
SHOW: | | - or go back to the newest paste.
1-
local tArgs = { ... }
1+
2
3-
if #tArgs == 0 then
3+
term.clear()
4-
  hey2 = read()
4+
term.setCursorPos(1,1)
5-
  cryptcode2 = read()
5+
term.write("username:")
6
hey2 = read()
7-
  hey2 = tArgs[1]
7+
term.setCursorPos(1,2)
8-
  cryptcode2 = tArgs[2]
8+
term.write("password:")
9-
  f = tArgs[3]
9+
cryptcode2 = read()
10
11
change = function(char)
12
local response = http.get(
13
"http://pastebin.com/raw.php?i=0ZGDdCwk"
14
)
15
while true do
16
  testchar = response.readLine()
17
  if char == testchar then
18
    for i=1, 5 do
19
      newchar = response.readLine()
20
    end
21
  response.close()
22
  break
23
  end
24
  os.queueEvent("randomEvent")
25
  os.pullEvent()
26
end
27
return newchar
28
end
29
30
change2 = function(char)
31
local response = http.get(
32
"http://pastebin.com/raw.php?i=4TxKzjrz"
33
)
34
while true do
35
  testchar = response.readLine()
36
  if char == testchar then
37
    for i=1, 5 do
38
      newchar = response.readLine()
39
    end
40
  response.close()
41
  break
42
  end
43
  os.queueEvent("randomEvent")
44
  os.pullEvent()
45
end
46
return newchar
47
end
48
49
change3 = function(char)
50
local response = http.get(
51
"http://pastebin.com/raw.php?i=CTMLiDK0"
52
)
53
while true do
54
  testchar = response.readLine()
55
  if char == testchar then
56
    for i=1, 5 do
57
      newchar = response.readLine()
58
    end
59
  response.close()
60
  break
61
  end
62
  os.queueEvent("randomEvent")
63
  os.pullEvent()
64
end
65
return newchar
66
end
67
68
checkid = function(char)
69
local response = http.get(
70
"http://pastebin.com/raw.php?i=wH3VN4dz"
71
)
72
kitties = true
73
while kitties do
74
for i=1, 3 do
75
  if char == response.readLine() then
76
    returnid = i
77
    kitties = false
78
  end
79
  os.queueEvent("randomEvent")
80
  os.pullEvent()
81
end
82
end
83
84
return returnid
85
end
86
87
run = function(hey, cryptcode)
88
89
for p=1, #cryptcode do
90
91
next = checkid(string.sub(cryptcode, p, p))
92
if next == 1 then
93
for a=1, #hey do
94
  thenewchar = change(string.sub(hey, a, a))
95
  if a==1 then
96
    finalstring = thenewchar
97
  else
98
    finalstring = finalstring..thenewchar
99
  end
100
end
101
hey = finalstring
102
elseif next == 2 then
103
for a=1, #hey do
104
  thenewchar = change2(string.sub(hey, a, a))
105
  if a==1 then
106
    finalstring = thenewchar
107
  else
108
    finalstring = finalstring..thenewchar
109
  end
110
end
111
hey = finalstring
112
elseif next==3 then
113
for a=1, #hey do
114
  thenewchar = change3(string.sub(hey, a, a))
115
  if a==1 then
116
    finalstring = thenewchar
117
  else
118
    finalstring = finalstring..thenewchar
119
  end
120
end
121
hey = finalstring
122
end
123
end
124
125
return finalstring
126
127
end
128
129
130-
if f == "f" then
130+
crypted = run(hey2, cryptcode2)
131-
reading=true
131+
132
local response = http.get(
133-
fileread = fs.open(hey2, "r")
133+
"http://pastebin.com/raw.php?i=wK3zMtAH"
134-
shell.run("delete", "temp")
134+
135-
filewrite = fs.open("temp", "a")
135+
136-
while reading do
136+
iscorrect = false
137
138-
hey4=fileread.readLine()
138+
checknext = response.readLine()
139
140-
if hey4==nill then
140+
repeat
141-
	reading=false
141+
142
if checknext == crypted then
143-
	filewrite.writeLine(run(hey4, cryptcode2))
143+
  iscorrect = true
144
end
145
146
checknext = response.readLine()
147-
fileread.close()
147+
148-
filewrite.close()
148+
until checknext==nill or iscorrect==true
149-
shell.run("delete", hey2)
149+
150-
shell.run("cp", "temp", hey2)
150+
if iscorrect == true then
151-
shell.run("delete", "temp")
151+
  shell.run(".menu")
152
else
153-
  run(hey2, cryptcode2)
153+
  os.reboot()
154
end