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