Re: MIME(?)-decoding in QT
Hello Alexander, On Thursday, February 26, 2004 at 20:30 GMT +0500, authorities charged Alexander Leschinsky [AL] for writing: AL The Bat evaluate all before final state Really? Can you give me an example where that happens? I didn't think you could dynamically generate templates. Isn't that something of a security risk? -- Thanks for writing, Januk Aggarwal http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Alexander, On Wednesday, February 25, 2004 at 07:04 GMT +0500, special agents were informed that Alexander Leschinsky [AL] leaked: AL As solution can be used trick with creating 128+ macros (one macro for AL each encoded char), but I'm not _so_ crazy Why not just escape the %? %% inserts the character % instead of evaluating a macro. -- Thanks for writing, Januk Aggarwal http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Januk, on Wed, 25. Feb 2004 at 09:38:19 -0800 you wrote: AL As solution can be used trick with creating 128+ macros (one macro for AL each encoded char), but I'm not _so_ crazy Why not just escape the %? %% inserts the character % instead of evaluating a macro. You then would have to use sth like PHP's addslashes(), like %addescapes() which would escape all %s in the string you want to decode - but passing that string to the %addescapes()-function would not work either. TB itself would have to provide a special macro for that. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342). http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello dAniel, Chemists convened on Wednesday, February 25, 2004 at 22:54 GMT +0100 to watch Daniel Hahler [DH] synthesize: DH You then would have to use sth like PHP's addslashes(), like DH %addescapes() which would escape all %s in the string you want to DH decode - but passing that string to the %addescapes()-function would DH not work either. Wait, how is this macro supposedly running? If you're using text from the clipboard, TB shouldn't evaluate the text. If the text is coming from the output of a macro, again TB shouldn't evaluate it. So unless you're hard coding the % symbol in your QT, this should be a non-issue... -- Thanks for writing, Januk Aggarwal http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Alexander, on Wed, 25. Feb 2004 at 07:04:01 +0500 you wrote: dh So this is a problem of the plugin API? Is it not API bug, it's back side of power - any parameter will be interpreted before passing to internal function, and % is prefix for TB macroses, thus - in case of paramater value (for example) [...] Peter%20Palmreuther [...] As solution can be used trick with creating 128+ macros (one macro for each encoded char), but I'm not _so_ crazy And it wouldn't help, AFAICS, as TB tries to express the macro %20Palmreuther in the above case, not just %20. Glad we have Python.. *g -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342). http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Alexander, On Friday, February 20, 2004 at 7:16:29 PM you [AL] wrote (at least in part): dh do you mean %StrReplace? AL Yes OK, I thought you maybe meant a more serious solution, not only directed to replace '%20' :-) dh That would probably be bad to setup.. AL Not in case of one replacement, full URL-encode will _be_ big headache without a regexp engine capable of executing code in replacement code plus 'hex()' and 'chr()' functions: definitely yes. ,- [ ] | $name = '[EMAIL PROTECTED]'; | $name =~ s/%([0-9a-fA-F]{2})/chr(hex($1))/ge; `- Does the trick quite good ... sadly yet only in Perl :-/ -- Regards Peter Palmreuther (The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1) Reliable software must kill people reliably. -- Andy Mickel http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello dAniel, on Fri, 20. Feb 2004 at 23:52:31 +0100 I wrote: d Installed Python now, but having a last issue.. the %Py macro seems to d make up a new line. It's print, as I just read in the tutorial. Adding a trailing comma should avoid a newline.. says the tutorial.. JFI. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342). http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello dAniel, On Fri, 20 Feb 2004 01:08:13 +0100 (20.02.2004 05:08 my local time) you wrote about MIME(?)-decoding in QT at least in part: dh Any suggestions please? :) Macro from MyMacros -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Alexander, On Friday, February 20, 2004 at 2:24:04 PM you [AL] wrote (at least in part): dh Any suggestions please? :) AL Macro from MyMacros But which one? I've not seen a 'URLDecode' macro there ... Which one would be a replacement then? -- Regards Peter Palmreuther (The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1) Ummm U Ug... I rule and you don't. http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
* dAniel hAhler [EMAIL PROTECTED] writes: The problem is, that the Name is MIME(?) encoded, like this: Peter%20Palmreuther Is it possible to convert %20 back to space or any other special chars to its real value? Python. --8---cut here---start-8--- %_tbvar=Peter%%20Palmreuther %Py( import urllib quoted_string = tb.macro(r'%%_tbvar') print urllib.unquote(quoted_string) ) --8---cut here---end---8--- Carsten -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Carsten Carsten Python. Python!!!??? I've clearly not been paying attention. When did TB! become scriptable in Python??. Its its an extension - where do I get it. Can other languages be used too? Regards Graham -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
* Foster, Graham [EMAIL PROTECTED] writes: Python!!!??? I've clearly not been paying attention. When did TB! become scriptable in Python??. Its its an extension - where do I get it. See http://kaishaku.org/software/tbpyxie/ and take a look at the thread around , | From: [EMAIL PROTECTED] | Subject: Re: TBPyxie (was: SmartBat's Evaluate Function and Order of Operations) | To: [EMAIL PROTECTED] | Date: Thu Feb 05 19:47:14 2004 +0100 | Message-ID: [EMAIL PROTECTED] ` Can other languages be used too? Not with that plug-in. Any why should they? Python is a wonderful language. Carsten -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Carsten Can other languages be used too? Carsten Not with that plug-in. Any why should they? Python is a wonderful Carsten language. So is Ruby ;) Regards Graham -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote: Is it possible to convert %20 back to space or any other special chars to its real value? C Python. I was sure you would come up with that.. :) Now I'm just installing Python. I hope it works with the cygwin version?! We'll see.. C --8---cut here---start-8--- C %_tbvar=Peter%%20Palmreuther C %Py( C import urllib C quoted_string = tb.macro(r'%%_tbvar') what's the 'r' for? C print urllib.unquote(quoted_string) simple.. :) -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 18:24:04 +0500 Alexander Leschinsky wrote: dh Any suggestions please? :) A Macro from MyMacros do you mean %StrReplace? That would probably be bad to setup.. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
* dAniel hAhler [EMAIL PROTECTED] writes: on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote: Is it possible to convert %20 back to space or any other special chars to its real value? Python. I was sure you would come up with that.. :) Now I'm just installing Python. I hope it works with the cygwin version?! We'll see.. I bet it won't work. But the native Windows version is OK. You should also look for a good editor as the provided editor »Idle« is not very good (SPE, Boa Constructor, Emacs, ...) quoted_string = tb.macro(r'%%_tbvar') what's the 'r' for? It declares the string as a »raw string« (you don't need it, it's rather superfluous in this case). Carsten -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 18:16:07 +0100 I wrote: d Now I'm just installing Python. I hope it works with the cygwin d version?! We'll see.. It does not.. the plugin requires python23.dll and shuts TB down if it's not found. So I will have to install windows binaries, but that can wait. Thanks anyway. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 22:17:00 +0500 Alexander Leschinsky wrote: CT Python. A And plugin for executing Python scripts (mentioned in KB) What's KB? Knowledge Base? which? -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 18:55:01 +0100 Carsten Thönges wrote: Now I'm just installing Python. I hope it works with the cygwin version?! We'll see.. C I bet it won't work. You won.. :) C But the native Windows version is OK. You should also look for a C good editor as the provided editor »Idle« is not very good (SPE, C Boa Constructor, Emacs, ...) I'll use my beloved JEdit for that.. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote: Is it possible to convert %20 back to space or any other special chars to its real value? C Python. C --8---cut here---start-8--- C %_tbvar=Peter%%20Palmreuther C %Py( C import urllib C quoted_string = tb.macro(r'%%_tbvar') C print urllib.unquote(quoted_string) C ) C --8---cut here---end---8--- Installed Python now, but having a last issue.. the %Py macro seems to make up a new line. I have this: -8 %SETPATTREGEXP=(?:msgid:|Message-ID:\s+)?(?:?)([EMAIL PROTECTED])(?:(?:\?\w)||$)(?:.*from=(.*?))?%- %REGEXPBLINDMATCH=%ClipBoard%- %IF:%SUBPATT=2'':#%- %Py(%- import urllib quoted_string = tb.macro(r'%%SUBPATT=2') print urllib.unquote(quoted_string) )%- %__%IF:'%_lang'='deutsch': schrieb in:%- %__ wrote in# %- mid:%SUBPATT=1; -8 and btw: how would I give a TB macro the result of urllib.unquote? As Python should be straight forward I tried tb.macro(r'%%_author') = urllib.unquote(quoted_string) but no luck.. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html