Vcoderz Community
We create websites that have it all, beauty & brains
Lebanon Web Design & Development - Coddict
 

Go Back   Vcoderz Community > Computer Zone > Computers & Information Technologies > E-Learning Center

Notices

E-Learning Center E-Learning tutorials and competitions.

Reply
 
Share Thread Tools Search this Thread
Old 05-12-2009   #11
Google

 
Google's Avatar
 
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
Default

Quote:
Originally Posted by perfectable View Post
what abt coding a mtc bot or alfa bot but with .jar or .sis extension .
if it is not impossible it wll be a revolution in leb :P
Everything is possible. I can code in any language.
I'm participating in some programming competitions lately + I have important things to do. So basically, this needs some time to be sorted out.
Also, this project means turning the application to open source which needs a public license before publishing.


Google is offline   Reply With Quote
Old 05-12-2009   #12
polo
Registered Member
 
polo's Avatar
 
Last Online: 03-25-2010
Join Date: May 2008
Posts: 77
Thanks: 20
Thanked 23 Times in 18 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Default

quick question that might to be worth opening a thread for it:
what's the best programming language (or maybe there's a software that already does that?) to do the following:

- download a bunch of zipped files from a secure ftp connetion
- unzip the files
- save the resulting files in various directories on my system (depending on their name, etc...)

[windows environment]

doesn't have to be a marvel of object oriented, scalable programming. smthing quick & dirty to just do this repetitive task (that i have to do every morning :P)

thx
polo is offline   Reply With Quote
Old 05-14-2009   #13
Google

 
Google's Avatar
 
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
Default

Quote:
Originally Posted by polo View Post
quick question that might to be worth opening a thread for it:
what's the best programming language (or maybe there's a software that already does that?) to do the following:

- download a bunch of zipped files from a secure ftp connetion
- unzip the files
- save the resulting files in various directories on my system (depending on their name, etc...)

[windows environment]

doesn't have to be a marvel of object oriented, scalable programming. smthing quick & dirty to just do this repetitive task (that i have to do every morning :P)

thx
You can do this with PERL or PHP.
Google is offline   Reply With Quote
Old 06-30-2009   #14
HizbullaH
Registered Member
 
HizbullaH's Avatar
 
Last Online: 09-06-2011
Join Date: Oct 2006
Posts: 397
Thanks: 262
Thanked 215 Times in 87 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Default

Quote:
Originally Posted by polo View Post
quick question that might to be worth opening a thread for it:
what's the best programming language (or maybe there's a software that already does that?) to do the following:

- download a bunch of zipped files from a secure ftp connetion
- unzip the files
- save the resulting files in various directories on my system (depending on their name, etc...)

[windows environment]

doesn't have to be a marvel of object oriented, scalable programming. smthing quick & dirty to just do this repetitive task (that i have to do every morning :P)

thx
Bro I Don't Know What Do You Exactly Want, If You Can Tell Me And I Will Write For You The Script.. I Have Written This Sample Now For You And You Can Edit Or Continue It.. It Just Connects To FTP And Gets A Zipped File The Decompress It.. You Can Run It Using php-cli If You Want..

PHP Code:
<?php

// FTP Connection

$connection = @ftp_ssl_connect("YOURHOST") or die("WTF!! Unable To Connect To The Host!!\n"); // Put Your Host
$ftpuser "FTPUSERNAME"// Put Your FTP Username
$ftppass "FTPPASSWORD"// Put Your FTP Password
$login = @ftp_login($connection$ftpuser $ftppass );
$file "YOURFILE.zip"// Put The Name Of Your Compressed File


if (!$login) {
    echo 
"WTF!! Unable To Login!!\n";
             }
else {
    echo 
"Logged In! O'RLY? YA'RLY.\n";
    }

// Put The Directory Of File In The FTP Server Down Here
@ftp_chdir($connection,"DIRECTORY/OF/FILE/ON/FTP/SERVER") or die("WTF!! Unable To Change Directory, Please Enter A Valid Directory.\n");

echo 
"Current Dir: ".ftp_pwd($connection)."\n";

$getfile = @ftp_get($connection$file$fileFTP_BINARY);

if (!
$getfile) {
    echo 
"WTF!! Unable To Get File.\n";
               }
else {
    echo 
"File Has Been Successfully Downloaded!.\n";
     }

//Unzipping The File

$zip = new ZipArchive;
$res $zip->open("$file");
if (
$res === TRUE) {
    
$zip->extractTo('Extracted-FTP-TMP/');
    
$zip->close();
    echo 
"The File Has Been Successfully Unziped!\n";
} else {
    echo 
"WTF!! Unable To Decompress The File!!\n";
}

@
ftp_close($connection) or die("WTF!! Unable To Close Connection!!\n");
?>
__________________
من؟ من سينزع سلاح حزب الله!؟
HizbullaH is offline   Reply With Quote
The Following User Says Thank You to HizbullaH For This Useful Post:
polo (07-12-2009)
Old 07-12-2009   #15
polo
Registered Member
 
polo's Avatar
 
Last Online: 03-25-2010
Join Date: May 2008
Posts: 77
Thanks: 20
Thanked 23 Times in 18 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Default

Quote:
Originally Posted by HizbullaH View Post
Bro I Don't Know What Do You Exactly Want, If You Can Tell Me And I Will Write For You The Script.. I Have Written This Sample Now For You And You Can Edit Or Continue It.. It Just Connects To FTP And Gets A Zipped File The Decompress It.. You Can Run It Using php-cli If You Want..

PHP Code:
<?php

// FTP Connection

$connection = @ftp_ssl_connect("YOURHOST") or die("WTF!! Unable To Connect To The Host!!\n"); // Put Your Host
$ftpuser "FTPUSERNAME"// Put Your FTP Username
$ftppass "FTPPASSWORD"// Put Your FTP Password
$login = @ftp_login($connection$ftpuser $ftppass );
$file "YOURFILE.zip"// Put The Name Of Your Compressed File


if (!$login) {
    echo 
"WTF!! Unable To Login!!\n";
             }
else {
    echo 
"Logged In! O'RLY? YA'RLY.\n";
    }

// Put The Directory Of File In The FTP Server Down Here
@ftp_chdir($connection,"DIRECTORY/OF/FILE/ON/FTP/SERVER") or die("WTF!! Unable To Change Directory, Please Enter A Valid Directory.\n");

echo 
"Current Dir: ".ftp_pwd($connection)."\n";

$getfile = @ftp_get($connection$file$fileFTP_BINARY);

if (!
$getfile) {
    echo 
"WTF!! Unable To Get File.\n";
               }
else {
    echo 
"File Has Been Successfully Downloaded!.\n";
     }

//Unzipping The File

$zip = new ZipArchive;
$res $zip->open("$file");
if (
$res === TRUE) {
    
$zip->extractTo('Extracted-FTP-TMP/');
    
$zip->close();
    echo 
"The File Has Been Successfully Unziped!\n";
} else {
    echo 
"WTF!! Unable To Decompress The File!!\n";
}

@
ftp_close($connection) or die("WTF!! Unable To Close Connection!!\n");
?>
i just saw this. thx a lot!
i'll tweak it & give it a try and revert if i need anything
thx again!
polo is offline   Reply With Quote
Old 07-12-2009   #16
Google

 
Google's Avatar
 
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
Default

You can also create a batch script and do this via CURL.

Accessing the ftp server:
curl ftp://HOST_NAME --user usr:pwd

Downloading a file from the server:
curl ftp://HOST_NAME/FOLDER/FILE.zip --user myname:mypassword -o DOWNLOADED_FILE_NAME.zip

Uploading a file:
curl -T FILE.zip ftp://HOST_NAME/FOLDER/ --user usr:pwd

Listing files in sub directories
curl ftp://HOST_NAME/FOLDER/ --user usr:pwd

Listing directories, hiding curl progress bar and using grep to filter
curl ftp://HOST_NAME --user usr:pwd -s | grep ^d
Google is offline   Reply With Quote
The Following User Says Thank You to Google For This Useful Post:
polo (07-13-2009)
Old 08-25-2009   #17
polo
Registered Member
 
polo's Avatar
 
Last Online: 03-25-2010
Join Date: May 2008
Posts: 77
Thanks: 20
Thanked 23 Times in 18 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Default

what do you think of this TOR project: http://www.torproject.org ?
every heard of it? would it significantly slow down the connection? are there more known applications that use the same principle? any potential problems with it?
polo is offline   Reply With Quote
Old 08-29-2009   #18
Google

 
Google's Avatar
 
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
Default

I use it sometimes in the university to bypass some silly restrictions.

Yes it would slow down the connection because your HTTP request will pass through many servers to reach the final server destination (same is the reply that is on its way to your computer).

While using TOR, your IP will be changed each amount of time because the network relay path will be changed. This dynamic change will keep you *anonymous on the internet. It is all about the HTTP tunneling. Of course there are other free applications that use this, like ultra-surf and there are some paid VPN (virtual private network) services for this purpose.

Problems that may arise:
In normal cases, you won't face any problem other than slowness. Other than that, there are some websites that base their cookies on IP address (to protect their users against cookie theft), so you will lose your session and get logged out when your IP address on TOR change (These websites are not very common).

*There are some theoretical attacks based on Javascript (similar to the man_in_the_middle_attack concept) that can reveal your identity when you are using TOR. The attacker must have a TOR server.
__________________

Google is offline   Reply With Quote
Reply

  Vcoderz Community > Computer Zone > Computers & Information Technologies > E-Learning Center

Tags
bit, thinking



Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:51 PM.


Lebanon web design and development
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Share