diff --git a/asn1util.pas b/asn1util.pas index e98ef5d..ca71913 100644 --- a/asn1util.pas +++ b/asn1util.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Delphree - Synapse | 001.003.001 | +| Project : Delphree - Synapse | 001.003.002 | |==============================================================================| | Content: support for ASN.1 coding and decoding | |==============================================================================| @@ -25,6 +25,8 @@ | (Found at URL: http://www.ararat.cz/synapse/) | |==============================================================================} +{$Q-} + unit ASN1Util; interface diff --git a/dnssend.pas b/dnssend.pas index 8d47b3d..72faae4 100644 --- a/dnssend.pas +++ b/dnssend.pas @@ -25,6 +25,8 @@ //RFC-1035, RFC-1183, RFC1706, RFC1712, RFC2163, RFC2230 +{$Q-} + unit DNSsend; interface @@ -63,7 +65,7 @@ const Qtype_AAAA =28; //IP6 Address [Susan Thomson] Qtype_LOC =29; //RFC-1876 Qtype_NXT =30; //RFC-2065 - + Qtype_SRV =33; //RFC-2052 Qtype_NAPTR =35; //RFC-2168 Qtype_KX =36; diff --git a/httpsend.pas b/httpsend.pas index 67683dc..2f9e0ed 100644 --- a/httpsend.pas +++ b/httpsend.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Delphree - Synapse | 002.000.000 | +| Project : Delphree - Synapse | 002.001.000 | |==============================================================================| | Content: HTTP client | |==============================================================================| @@ -71,6 +71,7 @@ type function HttpGetText(URL:string;Response:TStrings):Boolean; function HttpGetBinary(URL:string;Response:TStream):Boolean; function HttpPostBinary(URL:string;Data:TStream):Boolean; +function HttpPostURL(URL:string;URLData:string;Data:TStream):Boolean; implementation @@ -422,5 +423,23 @@ begin end; end; +{HttpPostURL} +function HttpPostURL(URL:string;URLData:string;Data:TStream):Boolean; +var + HTTP:THTTPSend; +begin + Result:=False; + HTTP:=THTTPSend.Create; + try + HTTP.Document.Write(pointer(URLData)^,Length(URLData)); + HTTP.MimeType:='application/x-url-encoded'; + Result:=HTTP.HTTPmethod('POST',URL); + data.Seek(0,soFromBeginning); + data.CopyFrom(HTTP.document,0); + finally + HTTP.Free; + end; +end; + end. diff --git a/mimechar.pas b/mimechar.pas index cd744f3..e8a7c78 100644 --- a/mimechar.pas +++ b/mimechar.pas @@ -23,6 +23,8 @@ | (Found at URL: http://www.ararat.cz/synapse/) | |==============================================================================} +{$Q-} + unit MIMEchar; interface diff --git a/mimemess.pas b/mimemess.pas index 505a364..804e8b9 100644 --- a/mimemess.pas +++ b/mimemess.pas @@ -29,7 +29,7 @@ unit MIMEmess; interface uses - classes, Sysutils, MimePart, MimeChar, SynaUtil, MIMEInLn; + classes, Sysutils, MIMEpart, MimeChar, SynaUtil, MIMEInLn; type diff --git a/pingsend.pas b/pingsend.pas index 4841941..c6c5e78 100644 --- a/pingsend.pas +++ b/pingsend.pas @@ -45,6 +45,8 @@ After you change the registry, you need to restart your computer! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! } +{$Q-} + unit PINGsend; interface diff --git a/snmpsend.pas b/snmpsend.pas index 478d9bc..a32d2d9 100644 --- a/snmpsend.pas +++ b/snmpsend.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Delphree - Synapse | 002.003.000 | +| Project : Delphree - Synapse | 002.003.001 | |==============================================================================| | Content: SNMP client | |==============================================================================| @@ -24,12 +24,14 @@ | (Found at URL: http://www.ararat.cz/synapse/) | |==============================================================================} +{$Q-} + unit SNMPSend; interface uses - BlckSock, synautil, classes, sysutils, ASN1util; + BlckSock, synautil, classes, sysutils, ASN1Util; const @@ -190,11 +192,11 @@ begin data := data + ASNObject(s, ASN1_SEQ); end; data:=ASNObject(data,ASN1_SEQ); - data:=ASNObject(char(Self.ID),ASN1_INT) - +ASNObject(char(Self.ErrorStatus),ASN1_INT) - +ASNObject(char(Self.ErrorIndex),ASN1_INT) + data:=ASNObject(ASNEncInt(Self.ID),ASN1_INT) + +ASNObject(ASNEncInt(Self.ErrorStatus),ASN1_INT) + +ASNObject(ASNEncInt(Self.ErrorIndex),ASN1_INT) +data; - data:=ASNObject(char(Self.Version),ASN1_INT) + data:=ASNObject(ASNEncInt(Self.Version),ASN1_INT) +ASNObject(Self.community,ASN1_OCTSTR) +ASNObject(data,Self.PDUType); data:=ASNObject(data,ASN1_SEQ); diff --git a/snmptrap.pas b/snmptrap.pas index 826e5be..57a97c4 100644 --- a/snmptrap.pas +++ b/snmptrap.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Delphree - Synapse | 002.002.000 | +| Project : Delphree - Synapse | 002.002.001 | |==============================================================================| | Content: SNMP traps | |==============================================================================| @@ -24,6 +24,8 @@ | (Found at URL: http://www.ararat.cz/synapse/) | |==============================================================================} +{$Q-} + unit SNMPTrap; interface @@ -197,12 +199,12 @@ begin Buffer := ASNObject(Buffer, ASN1_SEQ); Buffer := ASNObject(ASNEncInt(GenTrap), ASN1_INT) + ASNObject(ASNEncInt(SpecTrap), ASN1_INT) - + ASNObject(ASNEncInt(TimeTicks), ASN1_TIMETICKS) + + ASNObject(ASNEncUInt(TimeTicks), ASN1_TIMETICKS) + Buffer; Buffer := ASNObject(MibToID(Enterprise), ASN1_OBJID) + ASNObject(IPToID(TrapHost), ASN1_IPADDR) + Buffer; - Buffer := ASNObject(Char(Version), ASN1_INT) + Buffer := ASNObject(ASNEncInt(Version), ASN1_INT) + ASNObject(Community, ASN1_OCTSTR) + ASNObject(Buffer, Self.PDUType); Buffer := ASNObject(Buffer, ASN1_SEQ); diff --git a/sntpsend.pas b/sntpsend.pas index d17e485..744d230 100644 --- a/sntpsend.pas +++ b/sntpsend.pas @@ -23,6 +23,7 @@ | (Found at URL: http://www.ararat.cz/synapse/) | |==============================================================================} +{$Q-} unit SNTPsend; diff --git a/synacode.pas b/synacode.pas index 1967b67..19b28d1 100644 --- a/synacode.pas +++ b/synacode.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Delphree - Synapse | 001.003.003 | +| Project : Delphree - Synapse | 001.004.000 | |==============================================================================| | Content: Coding and decoding support | |==============================================================================| @@ -23,6 +23,8 @@ | (Found at URL: http://www.ararat.cz/synapse/) | |==============================================================================} +{$Q-} + unit SynaCode; interface @@ -30,10 +32,18 @@ interface uses sysutils; +type + TSpecials=set of char; + const - SpecialChar:set of char + SpecialChar:TSpecials =['=','(',')','[',']','<','>',':',';','.',',','@','/','?','\','"','_']; + URLFullSpecialChar:TSpecials + =[';','/','?',':','@','=','&','#']; + URLSpecialChar:TSpecials + =[#$00..#$1f,'_','<','>','"','%','{','}','|','\','^','~','[',']','`',#$7f..#$ff]; + TableBase64= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; TableUU= @@ -153,8 +163,13 @@ type 1: (BufLong: array[0..15] of integer); end; +function DecodeTriplet(Value:string;limiter:char):string; function DecodeQuotedPrintable(value:string):string; +function DecodeURL(value:string):string; +function EncodeTriplet(value:string;limiter:char;specials:TSpecials):string; function EncodeQuotedPrintable(value:string):string; +function EncodeURLElement(value:string):string; +function EncodeURL(value:string):string; function Decode4to3(value,table:string):string; function DecodeBase64(value:string):string; function EncodeBase64(value:string):string; @@ -170,8 +185,8 @@ function HMAC_MD5(text,key:string):string; implementation {==============================================================================} -{DecodeQuotedPrintable} -function DecodeQuotedPrintable(value:string):string; +{DecodeTriplet} +function DecodeTriplet(Value:string;limiter:char):string; var x:integer; c:char; @@ -183,7 +198,7 @@ begin begin c:=value[x]; inc(x); - if c<>'=' + if c<>limiter then result:=result+c else if x