Sponsored links


Go Back   Sat Industry Forums > French Forum > Forum Dreambox
Register FAQ Members List Calendar Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-27-2006
f4bian's Avatar
Moderator
 
Join Date: Mar 2005
Posts: 67
Thanks: 0
Thanked 1 Time in 1 Post
f4bian is on a distinguished road
[SCRIPT] Connexion auto en telnet/ftp et execution de cmd

Attention : Valable pour ITGATE & DREAMBOX

Bonsoir à tous,

Afin de répondre à des besoin personnel j'ai developper deux script.
Ceux-ci permettent de lancer une connexion TELNET et FTP avec auto-login et execution de commandes Windows.

********* PRE-REQUIS ********
- Environnement Windows XP ou supportant les commandes *.vbs.
- Un editeur de texte (notepad, ultraedit).
- Un dezzipeur (Winzip, 7Zip, ...).
- Des connaissance en invites de commandes Windows (Telnet/Ftp).
- 5 minutes pour les customiser!

********** PACKAGE *********
- Le package est fournit au format *.zip
- Le contenu du package est constitué de deux fichiers : ftp.bat et telnet.bat
- Une note explicative est fournie.

********** HOW-TO **********
- Sélectionner le script de votre choix et l'editer.
- Renseignez l'adresse ip de votre Itgatebox, le nom d'utilisateur et le mot de passe de connexion (par défaut : root/tgatebox).
- Pour chaque ligne de commande ajouttez après le signe "=" votre commande.

Exemple :
Dans le script FTP je veux lister les repertoires alors la ligne de commande n°1 ressemblera à celà.

@set tgatecommand1=ls


********* SCRIPT FTP*********


Code:
@rem *******************************************
@rem *   Auto-Connexion en FTP sur la iTgate   *
@rem * Date   : 21/03/2006                     *
@rem * Auteur : f4bian                         *
@rem * Forums  : http://www.itgateusers.com    *
@rem *******************************************

@rem ////// Editez les elements ci dessous concernant votre materiel
@set tgateboxip=192.168.0.3
@set tgateusername=root
@set tgatepassword=tgatebox
@set tgatecommand1=
@set tgatecommand2=
@set tgatecommand3=
@set tgatecommand4=
@set tgatecommand5=

@rem ///// Ne plus rien modifier en dessous de cette ligne !

@rem ///// Creation du script VBS pour connexion automatique
@echo set sh=WScript.CreateObject("WScript.Shell")>>ftp.vbs
@echo WScript.Sleep 500>>ftp.vbs
@echo sh.SendKeys "%tgateusername%">>ftp.vbs
@echo WScript.Sleep 500>>ftp.vbs
@echo sh.SendKeys "~">>ftp.vbs
@echo WScript.Sleep 500>>ftp.vbs
@echo sh.SendKeys "%tgatepassword%">>ftp.vbs
@echo sh.SendKeys "~">>ftp.vbs
@echo WScript.Sleep 500>>ftp.vbs

@rem ///// Lancement des commandes Telnet
@echo sh.SendKeys "%tgatecommand1%">>ftp.vbs
@echo sh.SendKeys "~">>ftp.vbs
@echo WScript.Sleep 500>>ftp.vbs
@echo sh.SendKeys "%tgatecommand2%">>ftp.vbs
@echo sh.SendKeys "~">>ftp.vbs
@echo WScript.Sleep 500>>ftp.vbs
@echo sh.SendKeys "%tgatecommand3%">>ftp.vbs
@echo sh.SendKeys "~">>ftp.vbs
@echo WScript.Sleep 500>>ftp.vbs
@echo sh.SendKeys "%tgatecommand4%">>ftp.vbs
@echo sh.SendKeys "~">>ftp.vbs
@echo WScript.Sleep 500>>ftp.vbs
@echo sh.SendKeys "%tgatecommand5%">>ftp.vbs
@echo sh.SendKeys "~">>ftp.vbs
@echo WScript.Sleep 500>>ftp.vbs

@rem ///// Lancement de la session FTP sur l'iTgatebox
@start /realtime ftp.exe %tgateboxip%
@cscript //nologo ftp.vbs
@del /q ftp.vbs
******* SCRIPT TELNET *******

Code:
@rem *******************************************
@rem * Auto-Connexion en Telnet sur la iTgate  *
@rem * Date   : 21/03/2006                     *
@rem * Auteur : f4bian                         *
@rem * Forums  : http://www.itgateusers.com    *
@rem *******************************************

@rem ////// Editez les elements ci dessous concernant votre materiel
@set tgateboxip=192.168.0.3
@set tgateusername=root
@set tgatepassword=tgatebox
@set tgatecommand1=
@set tgatecommand2=
@set tgatecommand3=
@set tgatecommand4=
@set tgatecommand5=

@rem ///// Ne plus rien modifier en dessous de cette ligne !

@rem ///// Creation du script VBS pour connexion automatique
@echo set sh=WScript.CreateObject("WScript.Shell")>>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgateusername%">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatepassword%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs

@rem ///// Lancement des commandes Telnet
@echo sh.SendKeys "%tgatecommand1%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand2%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand3%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand4%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand5%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs

@rem ///// Lancement de la session Telnet sur l'iTgatebox
@start /realtime telnet.exe %tgateboxip%
@cscript //nologo telnet.vbs
@del /q telnet.vbs
***** POUR CONCLURE *****

J'espere que vous aurez autant de plaisir à l'utiliser que j'en ai eu à le créer

@bientôt !
Attached Files
File Type: zip f4bian_ftptelnet.zip (1.1 KB, 46 views)

Last edited by f4bian : 03-27-2006 at 04:04 AM.
Reply With Quote
Sponsored links
  #2 (permalink)  
Old 11-18-2006
spanik's Avatar
Registered User
 
Join Date: Mar 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
spanik is on a distinguished road
Re: [SCRIPT] Connexion auto en telnet/ftp et execution de cmd

super script, tres utile, merci beaucoup
Reply With Quote
  #3 (permalink)  
Old 03-28-2007
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Uranai is on a distinguished road
Re: [SCRIPT] Connexion auto en telnet/ftp et execution de cmd

Bravo et merci pour ce script dont je me suis inspiré pour faire le mien
Reply With Quote
  #4 (permalink)  
Old 10-22-2008
Registered User
 
Join Date: Oct 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
gratinox123 is on a distinguished road
Re: [SCRIPT] Connexion auto en telnet/ftp et execution de cmd

Salut, je crois que le lein pour telecharger est mort, on peut me le repasser svp ?
tnt-bug@wanadoo.fr
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SCRIPT] Connexion auto en ftp et execution de shell Linux f4bian Forum Dreambox 0 03-27-2006 03:00 AM
EPGUI auto update install script Doosje Plugins 22 05-31-2005 03:52 AM
Help Plz LAN connexion settings justsimply DB Images 4 04-01-2005 11:14 AM
Et encore un problème de connexion !! Robocop91 Forum Dreambox 18 03-31-2005 01:55 PM
VGA or DVI Connexion to LCD TV tareumlaneuchie Dreambox Hardware 1 09-09-2004 11:39 AM


All times are GMT +10. The time now is 10:36 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Page generated in 0.24661 seconds with 11 queries