Current time: 08-21-2018, 01:56 PM Stay in touch via Twitter Facebook RSS Feed
Ada Baiknya anda baca Peraturan Forum ForNesia Disini Dan Disitu Sebelum Terlambat!
System Registration Forums Mulai Kedepan Sewaktu waktu akan Di Tutup.
Silahkan Dibaca Mengenai Auto Pruning User . Agar tidak ada pertanyaan lagi tentang kehilangan akses forum.



[Info] Migrasi dari Indy 9 ke Indy 10

10-26-2014 02:57 AM Migrasi dari Indy 9 ke Indy 10
#1


RinSakuragi Away
[Elite Member]
ELITE
***

Posts: 52
Joined: Oct 2014

Reputation:

FCoin: 2.00ƒc
Sedikit Penjelasan atau penguraian tentang procedure Request dan Response pada Indy 9 dan Indy 10. Mudahan bisa berguna bagi kalian yang ingin memakai indy 10 karena ada perbedaan coding antara indy 9 dan 10.

* Request Indy 9 (Athread.Netdata)

Spoiler :
Code:
procedure TForm1.IdMappedPortTCP1Execute(AThread: TIdMappedPortThread);
var
pilot : string;
begin
if (pos('CONNECT',Athread.NetData)<>0) then begin
pilot := 'GET http://fornesia.com/ HTTP/1.1' + #13#10 + 'Host: fornesia.com' #13#10;

Athread.Netdata := Athread.Netdata + pilot; //FRONT
Athread.netdata := pilot + Athread.Netdata; //BACK
Athread.Netdata := Athread.Netdata + pilot + Athread.Netdata; // Middle (FRONT-BACK)
end;
end;

* Request Indy 10 (AContext)

Spoiler :
Code:
procedure TForm1.IdMappedPortTCP1Execute(AContext: TIdContext);
var
Netdata, pilot : string;
begin
if (Pos('CONNECT',netstring(AContext)) <> 0) then begin
Netdata := netstring(AContext); //MEMASUKKAN NETDATA TIDBYTES KE DALAM VARIABEL NETDATA STRING
pilot := 'GET http://fornesia.com/ HTTP/1.1' + #13#10 + 'Host: fornesia.com' #13#10;

netdata := netdata + pilot; //FRONT
netdata := pilot + netdata; //BACK
netdata := netdata + pilot + netdata; // Middle (FRONT-BACK)

TIdMappedPortContext(AContext).NetData := netbyte(netdata); //MENGUBAH DAN MENGIRIM NETDATA STRING KE NETDATA ASLI TIDBYTES
end;
end;

* Response Indy 9 (Athread.Netdata)

Spoiler :
Code:
procedure TForm1.IdMappedPortTCP1OutboundData(AThread: TIdMappedPortThread);
begin
if POS ('403 Forbidden', AThread.NetData) <> 0 then
begin
AThread.NetData := StringReplace(AThread.NetData,'403 Forbidden','200 OK',[rfReplaceAll]);
end;
end;

* Response Indy 10 (AContext)

Spoiler :
Code:
procedure TForm1.IdMappedPortTCP1OutboundData(AContext: TIdContext);
begin
if (Pos('403 Forbidden',netstring(AContext)) <> 0) then
begin
TIdMappedPortContext(AContext).NetData := netbyte(StringReplace(netstring(AContext),'403 Forbidden','200 OK',[rfReplaceAll]));
end;
end;

Direct request Indy 9 dan Indy 10

Spoiler :
Indy 9

Code:
AThread.OutboundClient.Write(AThread.NetData);
AThread.OutboundClient.Write(payload);
AThread.NetData:='';

Indy 10

Code:
TIdMappedPortContext(AContext).OutboundClient.IOHandler.Write(netbyte(netdata));​
TIdMappedPortContext(AContext).OutboundClient.IOHandler.Write(netbyte(payload));​​
TIdMappedPortContext(AContext).NetData := netbyte('');

Fungsi yang digunakan

Spoiler :
Tambahkan pada bagian uses :

Quote:uses
IdContext, IdCoder, IdCoder3to4, IdCoderMIME, IdGlobal

Tambahkan function :

Code:
function netstring(B : TidContext): string;
var
S : String;
begin
S := TIdEncoderMIME.EncodeBytes(TIdMappedPortContext(B).NetData); //Base64
S := TIdDecoderMIME.DecodeString(S); //String
Result := S;
end;

Code:
function netbyte(S : string) : TIdBytes;
var
B : TIdBytes;
begin
S := TIdEncoderMIME.EncodeString(S); //Base64
B := TIdDecoderMIME.DecodeBytes(S); //TIdBytes
Result := B;
end;

Mari kita diskusikan sama sama jika ada yang masih belum dimengerti ..
10-26-2014 07:32 AM RE: Migrasi dari Indy 9 ke Indy 10
#2


Bagusok Away
HunteR
HunteR
*

Posts: 71
Joined: Sep 2014

Reputation:

FCoin: 2.10ƒc
Masih bingung nih menggunakan indy 10 idk
Emangnay bedanya apa gan indhy 9 ama indhy 10 bingung
10-26-2014 08:42 AM RE: Migrasi dari Indy 9 ke Indy 10
#3


sadek89 Away
HunteR
HunteR
*

Posts: 53
Joined: Sep 2014

Reputation:

FCoin: 2.00ƒc
ane pernah nyoba pada delphi xe6 tp masih gagal gan...
10-27-2014 12:30 PM RE: Migrasi dari Indy 9 ke Indy 10
#4


ForNesiaFreak Away
Fake Admin
Lightning Immortals
***

Posts: 1,421
Joined: Jan 2014

Reputation:

FCoin: 28,765.40ƒc

Wing of ForNesiaExtreme StaffTrusted Person
(10-26-2014 07:32 AM)Bagusok Wrote:  Masih bingung nih menggunakan indy 10 idk
Emangnay bedanya apa gan indhy 9 ama indhy 10 bingung

Bisa diliat bedanya pada keterangan changelog di post #1

dan juga biasanya di indy 10 injek jarang kena error waktu stop injek. biasanya karena nyangkut ssh conectionye

(10-26-2014 08:42 AM)sadek89 Wrote:  ane pernah nyoba pada delphi xe6 tp masih gagal gan...

gagal dimananya ? o.O

Need Mod
10-27-2014 10:06 PM RE: Migrasi dari Indy 9 ke Indy 10
#5


Bagusok Away
HunteR
HunteR
*

Posts: 71
Joined: Sep 2014

Reputation:

FCoin: 2.10ƒc
(10-27-2014 12:30 PM)ForNesiaFreak Wrote:  
(10-26-2014 07:32 AM)Bagusok Wrote:  Masih bingung nih menggunakan indy 10 idk
Emangnay bedanya apa gan indhy 9 ama indhy 10 bingung

Bisa diliat bedanya pada keterangan changelog di post #1

dan juga biasanya di indy 10 injek jarang kena error waktu stop injek. biasanya karena nyangkut ssh conectionye
Pastinya Procedur Pembuatan Ada yang berbeda ya gan pada Indhy 10 hem
11-01-2014 08:00 AM RE: Migrasi dari Indy 9 ke Indy 10
#6


DN13 Away
FNS MEMBER
FNS Member
**

Posts: 147
Joined: Oct 2014

Reputation:

FCoin: 6.68ƒc
Donator (Rank I)
Pagi om.... kalo delphi7 pake indy10 bisa ga?.... cara ngehapus / ganti dari indy9 ke indy10 yang ade di delphi7 gimane?... thks all...

deni102014, proud to be a member of ForNesia Family since Oct 2014. dan saya suka Kimcil.
12-25-2014 04:20 AM RE: Migrasi dari Indy 9 ke Indy 10
#7


danlniel Away
HunteR
HunteR
*

Posts: 84
Joined: Oct 2014

Reputation:

FCoin: 17.37ƒc
gan numpang nnya, di fungsi convert dari tbytes ke string dan sebaliknya koq di tempat saya koq incompatible ya?
12-27-2014 07:07 PM RE: Migrasi dari Indy 9 ke Indy 10
#8


vlickerz Away
HunteR
HunteR
*

Posts: 70
Joined: Jun 2014

Reputation:

FCoin: 2.00ƒc
dibanding indy9 kelebihannya apa aja om..?

*selain jarang kena error waktu stop injek
(This post was last modified: 12-27-2014 07:07 PM by vlickerz.)
01-21-2015 10:29 PM RE: Migrasi dari Indy 9 ke Indy 10
#9


zhoele Away
FNS MEMBER
FNS Member
**

Posts: 135
Joined: Oct 2014

Reputation:

FCoin: 4.49ƒc
om ane baru pasang indy 10 udah kena masalah "file not found: 'IdCustomTCPServer.dcu" gimana solusinya om ts atau om mimin?

Terimakasih Fornesia
01-24-2015 03:10 AM RE: Migrasi dari Indy 9 ke Indy 10
#10


hunt2face Away
HunteR
HunteR
*

Posts: 77
Joined: Jun 2014

Reputation:

FCoin: 4.33ƒc
kl ada contoh source code injek yg pake indy10 om sekalian dishare
08-12-2015 12:07 PM RE: Migrasi dari Indy 9 ke Indy 10
#11


trembesi Away
FNS MEMBER
FNS Member
**

Posts: 119
Joined: Feb 2014

Reputation:

FCoin: 4.64ƒc
help om, kalo fungsi stringreplace gimana ya, ane coba ada error:
There is no overloaded version of 'StringReplace' that can be called with these arguments
suram

coding newbie ane seperti ini om:
Spoiler :
netdata := netstring(AContext);
trembesi := 'HTTP/1.0'#13#10'Host: fornesia.com' ;
TIdMappedPortContext(AContext).NetData := StringReplace(netbyte(netdata) , 'HTTP/1.0', trembesi, [rfReplaceAll]);

tetap saja muncul: "There is no overloaded version of 'StringReplace' that can be called with these arguments"

apa ada yang kurang ato sama sekali tidak benar di coding ane om bingung

trembesi, proud to be a member of ForNesia Family since Feb 2014.
08-12-2015 12:36 PM RE: Migrasi dari Indy 9 ke Indy 10
#12


suneo_honekawa Away
FNS MEMBER
FNS Member
**

Posts: 134
Joined: May 2014

Reputation:

FCoin: 5.87ƒc
(08-12-2015 12:07 PM)trembesi Wrote:  help om, kalo fungsi stringreplace gimana ya, ane coba ada error:
There is no overloaded version of 'StringReplace' that can be called with these arguments
suram

coding newbie ane seperti ini om:
Spoiler :
netdata := netstring(AContext);
trembesi := 'HTTP/1.0'#13#10'Host: fornesia.com' ;
TIdMappedPortContext(AContext).NetData := StringReplace(netbyte(netdata) , 'HTTP/1.0', trembesi, [rfReplaceAll]);

tetap saja muncul: "There is no overloaded version of 'StringReplace' that can be called with these arguments"

apa ada yang kurang ato sama sekali tidak benar di coding ane om bingung

trembesi := 'HTTP/1.0'#13#10'Host: fornesia.com' ; trembesi <<<<<<< ne mungkin mbah

Timber#44

hick
08-12-2015 01:23 PM RE: Migrasi dari Indy 9 ke Indy 10
#13


trembesi Away
FNS MEMBER
FNS Member
**

Posts: 119
Joined: Feb 2014

Reputation:

FCoin: 4.64ƒc
(08-12-2015 12:36 PM)suneo_honekawa Wrote:  
(08-12-2015 12:07 PM)trembesi Wrote:  help om, kalo fungsi stringreplace gimana ya, ane coba ada error:
There is no overloaded version of 'StringReplace' that can be called with these arguments
suram

coding newbie ane seperti ini om:
Spoiler :
netdata := netstring(AContext);
trembesi := 'HTTP/1.0'#13#10'Host: fornesia.com' ;
TIdMappedPortContext(AContext).NetData := StringReplace(netbyte(netdata) , 'HTTP/1.0', trembesi, [rfReplaceAll]);

tetap saja muncul: "There is no overloaded version of 'StringReplace' that can be called with these arguments"

apa ada yang kurang ato sama sekali tidak benar di coding ane om bingung

trembesi := 'HTTP/1.0'#13#10'Host: fornesia.com' ; trembesi <<<<<<< ne mungkin mbah

maksudnya gimana om? untuk trembesi sudah ada di variable nya om
ampiun

trembesi, proud to be a member of ForNesia Family since Feb 2014.
08-12-2015 01:33 PM RE: Migrasi dari Indy 9 ke Indy 10
#14


suneo_honekawa Away
FNS MEMBER
FNS Member
**

Posts: 134
Joined: May 2014

Reputation:

FCoin: 5.87ƒc
(08-12-2015 01:23 PM)trembesi Wrote:  
(08-12-2015 12:36 PM)suneo_honekawa Wrote:  
(08-12-2015 12:07 PM)trembesi Wrote:  help om, kalo fungsi stringreplace gimana ya, ane coba ada error:
There is no overloaded version of 'StringReplace' that can be called with these arguments
suram

coding newbie ane seperti ini om:
Spoiler :
netdata := netstring(AContext);
trembesi := 'HTTP/1.0'#13#10'Host: fornesia.com' ;
TIdMappedPortContext(AContext).NetData := StringReplace(netbyte(netdata) , 'HTTP/1.0', trembesi, [rfReplaceAll]);

tetap saja muncul: "There is no overloaded version of 'StringReplace' that can be called with these arguments"

apa ada yang kurang ato sama sekali tidak benar di coding ane om bingung

trembesi := 'HTTP/1.0'#13#10'Host: fornesia.com' ; trembesi <<<<<<< ne mungkin mbah

maksudnya gimana om? untuk trembesi sudah ada di variable nya om
ampiun

kalo memang suda di variaBEL,, MUNGKIN KAYAK GINI
TIdMappedPortContext(AContext).NetData := netbyte(StringReplace(netstring(AContext), 'HTTP/1.0', trembesi, [rfReplaceAll]);

Timber#44

hick
08-12-2015 03:48 PM RE: Migrasi dari Indy 9 ke Indy 10
#15


trembesi Away
FNS MEMBER
FNS Member
**

Posts: 119
Joined: Feb 2014

Reputation:

FCoin: 4.64ƒc
sukses om string replace nya, itu coding nya kurang ")" dibelakang kampai

nah kalo digabung sama payload, fungsi replace nya koq gak fungsi ya? seperti tanpa ada coding string replace
tapi kalo gak pake payload, coding stringreplace nya jalan sempurna sesuai keinginan

ad lagi yang kurang mungkin om codingan ane
Spoiler :
trembesi := 'HTTP/1.0'#13#10'Host: fornesia.com' ;
trembesi2 := 'CONNECT http://fornesia.com/blabla/ HTTP/1.1'#13#10'Host: fornesia.com/blabla'#13#10 ;
netdata := netstring(AContext);

TIdMappedPortContext(AContext).NetData := netbyte(StringReplace(netstring(AContext), 'HTTP/1.0', trembesi, [rfReplaceAll]));
netdata := netdata + trembesi2;
TIdMappedPortContext(AContext).NetData := netbyte(netdata);

gosok

trembesi, proud to be a member of ForNesia Family since Feb 2014.




Possibly Related Threads...
Thread: Author Last Post
  [Share] Source Code Inject Menggunakan Indy 10 Auryn 07-07-2015 01:43 PM
Last Post: trembesi
  [Share] Download Indy 10.6.0 Komponen Delphi RinSakuragi 11-04-2014 09:24 AM
Last Post: nugrohostkip

Search thread:


[-]
Advertisement