View difference between Paste ID: VEP17HWA and 6pPFNk2n
SHOW: | | - or go back to the newest paste.
1
local tArgs = { ... }
2
tLines = {}
3
if #tArgs == 0 then
4
  hey2 = read()
5
  cryptcode2 = read()
6
else
7
  hey2 = tArgs[1]
8
  cryptcode2 = tArgs[2]
9-
  f = tArgs[3]
9+
10
11
change = function(char)
12
local response = http.get(
13
"http://pastebin.com/raw.php?i=ZTZzqrze"
14-
"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=PhEctF8e"
33-
"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=WMcRLJtG"
52-
"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
reading=true
130-
if f == "f" then
130+
131
fileread = fs.open(hey2, "r")
132
shell.run("delete", "temp")
133
filewrite = fs.open("temp", "a")
134
while reading do
135
136
hey4=fileread.readLine()
137
138
if hey4==nill then
139
	reading=false
140
else
141
	filewrite.writeLine(run(hey4, cryptcode2))
142
end
143
144
end
145
fileread.close()
146
filewrite.close()
147
shell.run("delete", hey2)
148
shell.run("cp", "temp", hey2)
149
shell.run("delete", "temp")