如果所謂訂票程式只是替代人工手動來進行訂票作業,
沒有入侵行為,造成網路壅塞,這能算是駭客行為而被拘捕、調查嗎?
台鐵(或中華電信)把主機效能太低及頻寬管理不當的責任踢給使用訂票程式的民眾,
這也太不像話了。
錢他們要賺,至少也提供像樣的服務品質吧,
上網(或語音)訂票服務又不是今天才開始的。
更氣憤的是取票天數今年縮減成3天內取票,有沒有搞錯?
服務真是越走越回去了。
這是定票機的部分程式碼...
其實只是不斷的嘗試定票罷了
台鐵的理由實在是有夠....

5 private static String url="http://railway.hinet.net/trw24/order_kind1.jsp?";
6 public static void add(String attribute, String value) {
7 if(url.endsWith("&") || url.endsWith("?")) {
8 url+= attribute + "=" + value;
9
}
10 else {
11
url+= "&" + attribute + "=" + value;
12
}
13 }
14 public static void order() throws IOException {
15 URL website = new URL(url);
16
int count=1;
17
while(true) {
18
System.out.println("開始第" + count + "次嚐試訂票...");
19
count++;
20
URLConnection connection = website.openConnection();
21
BufferedReader in = new BufferedReader(
22
new InputStreamReader(connection.getInputStream()));
23
String line=null;
24
String content="";
25
while( (line=in.readLine())!=null) {
26
content+=line;
27
}
28
in.close();
29
if(content.indexOf("您的車票已訂到")!=-1) {
30
BufferedWriter bw = new BufferedWriter(new FileWriter("result.html"));
31
bw.write(content);
32
bw.close();
33
System.out.println("票己成功訂到,請讀取result.html檔。");
34
System.exit(0);
35
}
36
else {
37
System.out.println("票尚未定到,一分鐘之後將會再次嚐試...");
38
try {
39
Thread.sleep(60000); //sleep 1 minute, and try it again later.
40
}
41
catch(InterruptedException e) {
42
e.printStackTrace();
43
其實... 訂票程式早就有各語言版本了!
上次看到的好像是 perl 和 php 版兩種!
至於算不算是駭客行為嘛....
連用 Firefox 操作小額付款網站都被稱為駭客了,還有啥是不算駭客行為呢?

內文搜尋

X