FTP Security -
Moderators: JRL, Dorian (MJT support)
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact:
FTP Security -
Hey Guys
I'm using MSChed 7.4.09
Is the FTP commands secure in any way? Meaning if I run a FTPGetDirList command is there a way to use the encrypt command to scramble the password info during FTP transmissions..??? Thanks in advance
I'm using MSChed 7.4.09
Is the FTP commands secure in any way? Meaning if I run a FTPGetDirList command is there a way to use the encrypt command to scramble the password info during FTP transmissions..??? Thanks in advance
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Macro Scheduler does not presently support SFTP, see this discussion:
http://www.mjtnet.com/forum/viewtopic.p ... light=sftp
That link mentions using command lines with Filezilla which supports SFTP and/or using MoveIt as an SFTP command line utility. Any command line utility can be run with Macro Scheduler so either of them may satisfy your needs.
I believe SFTP may handle the encryption for you, but the ftp site must be set up as an SFTP site also.
http://www.mjtnet.com/forum/viewtopic.p ... light=sftp
That link mentions using command lines with Filezilla which supports SFTP and/or using MoveIt as an SFTP command line utility. Any command line utility can be run with Macro Scheduler so either of them may satisfy your needs.
I believe SFTP may handle the encryption for you, but the ftp site must be set up as an SFTP site also.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Well, I tried to post something but this dumb phpbb insists on adding html into a code/textbox even with html turned off so I can't do it :(
Code: Select all
RunProgram>c:\Program Files\FileZilla\filezilla.exe -overwrite -u "c:\test\ftptest.txt" sftp://username:password@ftpserver:22/aaa/bbbbbb/www -close
Last edited by Me_again on Wed Feb 27, 2008 12:41 am, edited 2 times in total.
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Try again...
Thanks for bringing this popular subject back. Since the last posts in the thread that Bob referenced I have figured out how to use FileZilla for secure ftp in MacroScheduler.
MoveItFreely mentioned in that other thread is a great scriptable FTP client (I use it for all my automated FTP) but it only supports the FTP over SSL/TSL type of secure FTP. I have no doubt it will work for that purpose with MacroSheduler but I don't have access to a suitable server to test that mode.
FileZilla is a great general purpose FTP client, it supports both types of secure FTP but only has limited command line functionality that can be scripted. I was able to to get it working with MacroScheduler to transfer files by SFTP using this code:
RunProgram>c:\Program Files\FileZilla\filezilla.exe -overwrite -u "c:\test\ftptest.txt" sftp://username:password@ftpserver:22/aaa/bbbbbb/www -close
(That should be all on one line)
The parameters are:
-overwrite = overwrite the file if it exists on the server
-u = this is an upload
"c:\test\ftptest.txt" = the file to upload
sftp:// = protocol to be used
username:password@ftpserver = obvious
:22 = port number (according to the FileZilla doc this should default based on the protocol but I found it necessary to force it)
/aaa/bbbbbb/www = the target subdirectory. YMMV here, when using regular FTP I only have to use /www, but when I connect to the server using SFTP the /www subdirectory is two steps down the tree. This may be a peculiarity of the SFTP server to which I have access.
-close = tells FileZilla to close when done. Test without this parameter so you can watch what is happening and identify problems like the above directory issue.
I did test Tunnelier from Bitvise mentioned in the other thread. I could make it work with Windows command line FTP, but not MacroSheduler FTP. It would be a very clumsy solution for this task so I abandoned work on it.
Thanks for bringing this popular subject back. Since the last posts in the thread that Bob referenced I have figured out how to use FileZilla for secure ftp in MacroScheduler.
MoveItFreely mentioned in that other thread is a great scriptable FTP client (I use it for all my automated FTP) but it only supports the FTP over SSL/TSL type of secure FTP. I have no doubt it will work for that purpose with MacroSheduler but I don't have access to a suitable server to test that mode.
FileZilla is a great general purpose FTP client, it supports both types of secure FTP but only has limited command line functionality that can be scripted. I was able to to get it working with MacroScheduler to transfer files by SFTP using this code:
RunProgram>c:\Program Files\FileZilla\filezilla.exe -overwrite -u "c:\test\ftptest.txt" sftp://username:password@ftpserver:22/aaa/bbbbbb/www -close
(That should be all on one line)
The parameters are:
-overwrite = overwrite the file if it exists on the server
-u = this is an upload
"c:\test\ftptest.txt" = the file to upload
sftp:// = protocol to be used
username:password@ftpserver = obvious
:22 = port number (according to the FileZilla doc this should default based on the protocol but I found it necessary to force it)
/aaa/bbbbbb/www = the target subdirectory. YMMV here, when using regular FTP I only have to use /www, but when I connect to the server using SFTP the /www subdirectory is two steps down the tree. This may be a peculiarity of the SFTP server to which I have access.
-close = tells FileZilla to close when done. Test without this parameter so you can watch what is happening and identify problems like the above directory issue.
I did test Tunnelier from Bitvise mentioned in the other thread. I could make it work with Windows command line FTP, but not MacroSheduler FTP. It would be a very clumsy solution for this task so I abandoned work on it.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Congratulations for the success, and thanks for those details, Me_again.
Although Filezilla is my default FTP tool, I have never needed to use the command line function, but knew the option was there.
I will have to cut/paste your example into my notes for Filezilla.

Although Filezilla is my default FTP tool, I have never needed to use the command line function, but knew the option was there.

I will have to cut/paste your example into my notes for Filezilla.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Hi Me_again,
Good stuff, thanks for posting this info about scripting Filezilla for SFTP.
Good stuff, thanks for posting this info about scripting Filezilla for SFTP.
Try this. When you are entering a message here in phpbb, put a check in these two checkboxes: Disable HTML in this post and Disable Smilies in this post. Select your lines of code, click the "Code" buton and it will add "textarea" BBCode tags around the lines of code. Now, manually change the word "textarea" to the word "code" in both the beginning and end tags and post your code. Does that come out any better?Me_again wrote:Well, I tried to post something but this dumb phpbb insists on adding html into a code/textbox even with html turned off so I can't do it
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The standard Code button in phpBB does NOT leave code as it was intended. To be absolutely sure that the code has no hidden characters, is not wordwrapped, and is left in it's completely raw text state I change the Code button to insert a TEXTAREA. So the code ends up in a text box like this
This is the best way to a) keep the script in it's raw form as it was intended and b) not mess up the formatting/width of the page.
I would also advise that you check "Disable HTML in this post" and also "Disable Smilies". Certain bits of script code can be interpreted as smilies, and phpBB will insert the html needed for them, so it is best to switch this off. Ideally we need to make it ignore data between the textarea tags when it does this.
Not sure why jpuziano suggests reverting back to using code instead of textarea. Textarea is there for a good reason.
Code: Select all
//Dialog Specification, to view in the designer select the next line,
//then right click and select 'Edit Calculator'
Dialog>Calculator
Caption=Calculator
Top=182
Width=180
Left=61
Height=224
Label=Enter an expression:,8,8
Edit=expression,8,32,153,expr
Button=&9,72,64,25,25,19
Button=&8,40,64,25,25,18
Button=&7,8,64,25,25,17
Button=&6,72,96,25,25,16
Button=&5,40,96,25,25,15
Button=&4,8,96,25,25,14
Button=&3,72,128,25,25,13
Button=&2,40,128,25,25,12
Button=&1,8,128,25,25,11
Button=&0,8,160,25,25,10
Button=&+,104,160,25,25,20
Button=&-,104,128,25,25,21
Button=&/,104,64,25,25,22
Button=&*,104,96,25,25,23
Button=&=,136,160,25,25,30
Button=&+/-,40,160,25,25,40
Button=.,72,160,25,25,41
Button=1/x,136,128,25,25,42
Button=sqrt,136,96,25,25,44
Button=C,136,64,25,25,50
EndDialog>Calculator
I would also advise that you check "Disable HTML in this post" and also "Disable Smilies". Certain bits of script code can be interpreted as smilies, and phpBB will insert the html needed for them, so it is best to switch this off. Ideally we need to make it ignore data between the textarea tags when it does this.
Not sure why jpuziano suggests reverting back to using code instead of textarea. Textarea is there for a good reason.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Mystery solved, button was modified.Me_again wrote:The mystery of why the "Code" button doesn't generate "Code" tags we'll leave for another day
Me_again wrote:Well, I tried to post something but this dumb phpbb insists on adding html into a code/textbox even with html turned off so I can't do it

Code: Select all
to [code] tags enable you to properly post that code? :?:
[quote="mtettmar"]Not sure why jpuziano suggests reverting back to using code instead of textarea. Textarea is there for a good reason.[/quote]
Some time ago I was trying to post some code and the code button was giving me those [code] bbcode tags like it does... but the post wasn't coming out right. I manually changed "textarea" to "code" and the problem went away... so I have been doing this ever since.
That said, maybe [code] is better than [code] in general, I don't know. Can anyone give an example of some code that posts well with [code] bbcode tags but poorly with [code] bbcode tags?
The documentation on the phpbb website that explains the [code] bbcode tag is here:
[b][url]http://www.phpbb.com/community/faq.php?mode=bbcode[/url][/b]
Here's what it says about the [code] bbcode tags:
[list][color=blue]Outputting code or fixed width data
If you want to output a piece of code or in fact anything that requires a fixed width, e.g. Courier type font you should enclose the text in [code]
Code: Select all
echo "This is some code";
Code: Select all
Code: Select all
Code: Select all
bbcode tag on that page. Hmm... I just saw this at the bottom of that page though:
[list][color=blue]Can I add my own tags?
If you are an administrator on this board and have the proper permissions, you can add further BBCodes through the Custom BBCodes section.[/color][/list]Marcus, is [code] a custom BBCode that you have added?
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes this mod was made some years ago. Code LOOKS ok but you will get hidden html chars when you copy and paste. *I* modified the board to use TEXTAREA instead as it is the only thing that properly preserves the code in it's raw form. You will not find it mentioned ANYWHERE else because it is a custom mod. A text box contains pure text. So we can guarantee that the code inside it is raw and safe for pasting into your editor.
The problem you had was probably that at the time smilies and html code was still being altered rather than ignored. As of today that is now fixed (for all future posts) e.g. the following correctly shows 8 followed by ) rather than the html for rendering a phpBB smilie
:
Before you would have had to select "Disable Smilies" or the above would have inserted html code for the smilie. You won't have to do this any more. So it should be easier to use the Code button.
The problem you had was probably that at the time smilies and html code was still being altered rather than ignored. As of today that is now fixed (for all future posts) e.g. the following correctly shows 8 followed by ) rather than the html for rendering a phpBB smilie

Code: Select all
MessageModal>8)
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Hi Marcus,
Well that's it then. As of today I'll go back to just clicking the Code button and leaving the
Well that's it then. As of today I'll go back to just clicking the Code button and leaving the
Code: Select all
tags as-is and it sounds like all will be well.
[b]Me Again[/b], it sounds like that code that gave you problems before should now be postable just by clicking the Code button and using the [code] tags it generates. Let us know though please...
Thanks for explaining all this and taking the extra steps to allow code to be easily posted on these forums.
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
JP's code suggestion did work for me (I edited the original post) so this is a test. Fresh new post. HTML and Smilies disable before any typing. Code copied from the MS editor
Unmodified "code" tags (textarea)
textarea tags changed to code tags
Unmodified "code" tags (textarea)
Code: Select all
RunProgram>c:\Program Files\FileZilla\filezilla.exe -overwrite -u "c:\test\ftptest.txt" sftp://username:password@ftpserver:22/aaa/bbbbbb/www -close
Code: Select all
RunProgram>c:\Program Files\FileZilla\filezilla.exe -overwrite -u "c:\test\ftptest.txt" sftp://username:password@ftpserver:22/aaa/bbbbbb/www -close
Last edited by Me_again on Wed Feb 27, 2008 2:55 pm, edited 1 time in total.
Well... perhaps not so strange. Marcus did say that he just changed it today...Me_again wrote:Very strange, this time the textarea worked fine and didn't insert html href coding
...perhaps his changes fixed that issue for you. I am back to using the Code button and leaving themtettmar wrote:The problem you had was probably that at the time smilies and html code was still being altered rather than ignored. As of today that is now fixed (for all future posts) e.g. the following correctly shows 8 followed by ) rather than the html for rendering a phpBB smilie:
Before you would have had to select "Disable Smilies" or the above would have inserted html code for the smilie. You won't have to do this any more. So it should be easier to use the Code button.Code: Select all
MessageModal>8)
Code: Select all
bbcode tags as-is.
To all code posters here, I'd like to point out two more advantages of [code]:
[list]- First, since this latest change [color=blue](see above)[/color], we no longer have to click the "Disable BBCode in this post" checkbox when posting a message here... just paste in your lines of code, select them, click that "Code" button and Marcus' [code] bbcode tags will now protect your code from unwanted smilie conversions by default.
- Second, when you see code in a forum post that you'd like to copy, if its inside [code] bbcode tags, all you have to do is click inside the textarea box, hit CTRL-A to select all the code and then hit CTRL-C to copy it. If it was posted using [Code] bbcode tags, you'd have to manually select the lines with the mouse before copying.[/list] :?: What is not clear to me Marcus is... do we still need to click the "Disable HTML in this post" checkbox? ever? or do your custom [code] bbcode tags take care of that by default as well? [color=orange][b]edit- 1:16 PM Feb 27, 2008:[/b] Oops, I missed the "and html code" in your reply above... so it appears this is covered as well now by default, that's great, thanks again Marcus![/color]
Thanks again for the initial complaint Me-again. The improvement Marcus just made to the original [code] improvement :) will make it easier for all of us to post code here without having it get all messed up.
And thanks Marcus for this additional change and for taking the time to explain the history of how things work here.
Last edited by jpuziano on Wed Feb 27, 2008 7:19 pm, edited 1 time in total.
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
