Author: remi
Date: 2008-12-24 13:27:18 +0100 (Wed, 24 Dec 2008)
New Revision: 3306
Removed:
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.cfg
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.dof
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.dpr
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.res
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/Unit1.dfm
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/Unit1.pas
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTuxStart/
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTuxStop/
Log:
* removed some files.
Deleted:
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.cfg
===================================================================
---
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.cfg
2008-12-24 12:25:23 UTC (rev 3305)
+++
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.cfg
2008-12-24 12:27:18 UTC (rev 3306)
@@ -1,35 +0,0 @@
--$A8
--$B-
--$C+
--$D+
--$E-
--$F-
--$G+
--$H+
--$I+
--$J-
--$K-
--$L+
--$M-
--$N+
--$O+
--$P+
--$Q-
--$R-
--$S-
--$T-
--$U-
--$V+
--$W-
--$X+
--$YD
--$Z1
--cg
--AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
--H+
--W+
--M
--$M16384,1048576
--K$00400000
--LE"e:\programs\delphi6\Projects\Bpl"
--LN"e:\programs\delphi6\Projects\Bpl"
Deleted:
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.dof
===================================================================
---
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.dof
2008-12-24 12:25:23 UTC (rev 3305)
+++
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.dof
2008-12-24 12:27:18 UTC (rev 3306)
@@ -1,85 +0,0 @@
-[FileVersion]
-Version=6.0
-[Compiler]
-A=8
-B=0
-C=1
-D=1
-E=0
-F=0
-G=1
-H=1
-I=1
-J=0
-K=0
-L=1
-M=0
-N=1
-O=1
-P=1
-Q=0
-R=0
-S=0
-T=0
-U=0
-V=1
-W=0
-X=1
-Y=1
-Z=1
-ShowHints=1
-ShowWarnings=1
-UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-[Linker]
-MapFile=0
-OutputObjs=0
-ConsoleApp=1
-DebugInfo=0
-RemoteSymbols=0
-MinStackSize=16384
-MaxStackSize=1048576
-ImageBase=4194304
-ExeDescription=
-[Directories]
-OutputDir=
-UnitOutputDir=
-PackageDLLOutputDir=
-PackageDCPOutputDir=
-SearchPath=
-Packages=vcl;rtl;vclx;VclSmp;vclshlctrls;acntD6_R;IcsDel60
-Conditionals=
-DebugSourceDirs=
-UsePackages=0
-[Parameters]
-RunParams=
-HostApplication=
-Launcher=
-UseLauncher=0
-DebugCWD=
-[Version Info]
-IncludeVerInfo=0
-AutoIncBuild=0
-MajorVer=1
-MinorVer=0
-Release=0
-Build=0
-Debug=0
-PreRelease=0
-Special=0
-Private=0
-DLL=0
-Locale=2060
-CodePage=1252
-[Version Info Keys]
-CompanyName=
-FileDescription=
-FileVersion=1.0.0.0
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=
-ProductName=
-ProductVersion=1.0.0.0
-Comments=
-[Excluded Packages]
-E:\Programs\Delphi6\Indy\dclIndyCore60.bpl=Indy 10 Core Design Time
Deleted:
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.dpr
===================================================================
---
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.dpr
2008-12-24 12:25:23 UTC (rev 3305)
+++
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.dpr
2008-12-24 12:27:18 UTC (rev 3306)
@@ -1,36 +0,0 @@
-{*
- * Tuxdroid ChatterTux : network packet annalyser.
- *
- * Copyright (C) 2008 C2ME Sa <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- *}
-
-program ChatterTux;
-
-uses
- Forms,
- Unit1 in 'Unit1.pas' {Form1},
- Check in 'Check.pas';
-
-{$R *.res}
-
-begin
- Application.Initialize;
- Application.Title := 'ChatterTux';
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
Deleted:
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/ChatterTux.res
===================================================================
(Binary files differ)
Deleted:
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/Unit1.dfm
===================================================================
---
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/Unit1.dfm
2008-12-24 12:25:23 UTC (rev 3305)
+++
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/Unit1.dfm
2008-12-24 12:27:18 UTC (rev 3306)
@@ -1,45 +0,0 @@
-object Form1: TForm1
- Left = 331
- Top = 287
- Width = 569
- Height = 268
- AutoSize = True
- Caption = 'ChatterTux'
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- OnActivate = FormActivate
- OnCreate = FormCreate
- PixelsPerInch = 96
- TextHeight = 13
- object Memo1: TMemo
- Left = 0
- Top = 0
- Width = 561
- Height = 241
- ScrollBars = ssVertical
- TabOrder = 0
- end
- object HttpCli1: THttpCli
- LocalAddr = '0.0.0.0'
- ProxyPort = '80'
- Agent = 'Mozilla/4.0 (compatible; ICS)'
- Accept = 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*'
- NoCache = False
- ContentTypePost = 'application/x-www-form-urlencoded'
- MultiThreaded = False
- RequestVer = '1.0'
- FollowRelocation = True
- LocationChangeMaxCount = 5
- BandwidthLimit = 10000
- BandwidthSampling = 1000
- Options = []
- SocksAuthentication = socksNoAuthentication
- Left = 180
- Top = 432
- end
-end
Deleted:
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/Unit1.pas
===================================================================
---
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/Unit1.pas
2008-12-24 12:25:23 UTC (rev 3305)
+++
software_suite_v2/software/http_server_resources/chatter_tux/trunk/ChatterTux/Unit1.pas
2008-12-24 12:27:18 UTC (rev 3306)
@@ -1,264 +0,0 @@
-{*
- * Tuxdroid ChatterTux : network packet annalyser.
- *
- * Copyright (C) 2008 C2ME Sa <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- *}
-
-unit Unit1;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs,
- MagentaMonsock, MagentaPacket32,
- MagentaPackhdrs, MagClasses, StdCtrls,
- IdBaseComponent, IdComponent, IdHTTP, IdException, HttpProt;
-
-const
- MSN_MSG_REQ =
'http://127.0.0.1:270/0/status/send?name=chatter&value=MSN|MSG|Nickname|%s';
-
-type
- TForm1 = class(TForm)
- Memo1: TMemo;
- HttpCli1: THttpCli;
- procedure FormCreate(Sender: TObject);
- procedure FormActivate(Sender: TObject);
- private
- { D�clarations priv�es }
- procedure PacketEvent(Sender: TObject; PacketInfo: TPacketInfo);
- public
- { D�clarations publiques }
- end;
-
-var
- Form1: TForm1;
- myIP : String;
- MonitorSocket : TMonitorSocket;
- splitedFrame : TStringList;
-
-implementation
-
-{$R *.dfm}
-
-{**
- * Encode HTTP url.
- *}
-function HTTPUrlEncode(const AStr: string): string;
-const
- NoConversion = ['A'..'Z', 'a'..'z', '*', '@', '.', '_', '-'];
-var
- Sp, Rp: PChar;
-begin
- SetLength(Result, Length(AStr) * 3);
- Sp := PChar(AStr);
- Rp := PChar(Result);
- while Sp^ <> #0 do
- begin
- if Sp^ in NoConversion then
- Rp^ := Sp^
- else if Sp^ = ' ' then
- Rp^ := '+'
- else
- begin
- FormatBuf(Rp^, 3, '%%%.2x', 6, [Ord(Sp^)]);
- Inc(Rp, 2);
- end;
- Inc(Rp);
- Inc(Sp);
- end;
- SetLength(Result, Rp - PChar(Result));
-end;
-
-{*
- * \brief Check if the internet connection is available.
- * \return the working ip or None.
- *}
-function getInternetConnectionAvailable : string;
-var
- idHTTP : TIdHTTP;
-begin
- idHTTP := TIdHTTP.Create(nil);
- idHTTP.ConnectTimeout := 30000;
- idHTTP.Request.CacheControl := 'no-cache';
- idHTTP.Request.UserAgent:= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1)';
- idHTTP.HandleRedirects := true;
- idHTTP.RedirectMaximum := 100;
- result := 'None';
- try
- idHTTP.Head('http://www.google.com/');
- result := idHTTP.Socket.Binding.IP;
- except
- end;
- idHttp.Disconnect;
- idHttp.DisconnectSocket;
- idHTTP.Free;
-end;
-
-{**
- * Match the MSN messages.
- *}
-function parseMsnMessage(splitedFrame : TStrings) : string;
-begin
- result := '';
- // MSN messages matching
- if pos('MSG', splitedFrame[0]) <> 1 then exit;
- if length(splitedFrame[splitedFrame.Count - 2]) <> 0 then exit;
- // Return the message text
- result := splitedFrame[splitedFrame.Count - 1];
-end;
-
-{**
- * Event on network packet receiving.
- *}
-procedure TForm1.PacketEvent(Sender: TObject; PacketInfo: TPacketInfo);
-var
- frame, text: string ;
-begin
- with PacketInfo do
- begin
- // Get the buffer frame
- frame := String(DataBuf);
-
- // Only IP protocol
- if EtherProto = PROTO_IP then
- begin
- // Only messages for me
- if pos(myIP, IPToStr(AddrDest)) = 0 then exit;
-
- // Split the frame
- frame := StringReplace(frame, ' ', '*$*',
- [rfReplaceAll, rfIgnoreCase]);
- frame := StringReplace(frame, chr(13)+chr(10), '�',
- [rfReplaceAll, rfIgnoreCase]);
- splitedFrame.Clear;
- splitedFrame.Delimiter := '�';
- splitedFrame.DelimitedText := frame;
-
- // If MSN
- text := parseMsnMessage(splitedFrame);
- if text <> '' then
- begin
- text := StringReplace(text, '*$*', ' ',
- [rfReplaceAll, rfIgnoreCase]);
- //Memo1.Lines.Add(text);
- // Replace the chars ('|' , '&', '+') before to send the status
- // to the HTTP server.
- text := StringReplace(text, '|', '������',
- [rfReplaceAll, rfIgnoreCase]);
- text := StringReplace(text, '&', '�����',
- [rfReplaceAll, rfIgnoreCase]);
- text := StringReplace(text, '+', '����',
- [rfReplaceAll, rfIgnoreCase]);
- HttpCli1.URL := format(MSN_MSG_REQ, [HTTPUrlEncode(text)]);
- HttpCli1.GetASync;
- exit;
- end;
- end;
- end;
-end;
-
-{**
- * On frame creation.
- *}
-procedure TForm1.FormCreate(Sender: TObject);
-var
- isMonitored : boolean;
- retryCounter : integer;
-begin
- // Create the socket monitor
- MonitorSocket := TMonitorSocket.Create(self);
-
- // Create the splited frame TStringList
- splitedFrame := TStringList.Create;
-
- // Initialize the retry counter
- retryCounter := 10;
- isMonitored := false;
-
- // 10 attempts to monitoring the network cards
- while retryCounter > 0 do
- begin
-
- // Wait a valid IP address
- while true do
- begin
- // Check internet status
- myIP := getInternetConnectionAvailable;
- if myIP = 'None' then
- begin
- sleep(2000);
- continue;
- end else
- begin
- sleep(1000);
- break;
- end;
- end;
-
- // Configure the socket monitoring
- isMonitored := false;
- MonitorSocket.onPacketEvent := PacketEvent;
- MonitorSocket.Addr := myIP;
- MonitorSocket.AddrMask := '255.255.255.0';
- MonitorSocket.IgnoreData := false;
- MonitorSocket.IgnoreLAN := true;
- MonitorSocket.ClearIgnoreIP;
-
- // Attempts to start the monitoring
- try
- MonitorSocket.StartMonitor(true);
- isMonitored := true;
- except
- try
- MonitorSocket.StartMonitor(false);
- isMonitored := true;
- except
- // Can't monitoring the network card ...
- end;
- end;
-
- // The network card which is connected to internet is successfuly monitored
- if isMonitored then
- begin
- break;
- end;
-
- // Decrease the retry counter
- retryCounter := retryCounter - 1;
-
- end; // Retry loop end (10 attempts)
-
- // No monitoring found then exit the application
- if not isMonitored then
- begin
- application.Terminate;
- end;
-end;
-
-{**
- * On the frame is activated.
- *}
-procedure TForm1.FormActivate(Sender: TObject);
-begin
- ShowWindow(Application.Handle, SW_HIDE);
- ShowWindow(Handle, SW_HIDE);
-end;
-
-end.
-
\ No newline at end of file
------------------------------------------------------------------------------
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn