|
| Author |
Message |
mathieu2005 Young One

Joined: 23 Dec 2004 Posts: 76
  
|
Posted: Sat Jan 29, 2005 6:37 pm Post subject: |
|
|
That is the command i create | Code: | | if ($msg =~/^source (.*)/){<br />$reply = get("http://www.$1.com");<br />$self->sendmsg("$reply");<br />} | if you want to write all your web url do this | Code: | | if ($msg =~/^source (.*)/){<br />$reply = get("http://$1");<br />$self->sendmsg("$reply");<br />} | Enjoy it |
|
| Back to top |
|
 |
mat007 Almost An Agent

Joined: 12 Jan 2004 Posts: 1375
   votes: 2
|
Posted: Sat Jan 29, 2005 6:39 pm Post subject: |
|
|
It will barely one, Some sites require you send browser info etc or use cookies etc.
Plus you should realy put $1 into a proper variable. |
|
| Back to top |
|
 |
alienz Almost An Agent

Joined: 22 Mar 2004 Posts: 1436 Location: Mars
 
|
Posted: Sat Jan 29, 2005 7:25 pm Post subject: |
|
|
Not only that, $1 is a special variable in Perl. I would change it to something else. _________________ Check out Botworld! A dev resource for things bot.
Downloads, articles, news, fourm and more.
http://botworld.marzopolis.com |
|
| Back to top |
|
 |
mathieu2005 Young One

Joined: 23 Dec 2004 Posts: 76
  
|
Posted: Sat Jan 29, 2005 11:38 pm Post subject: |
|
|
| like what |
|
| Back to top |
|
 |
Mojave Almost An Agent

Joined: 01 Nov 2003 Posts: 1434
 
|
Posted: Sun Jan 30, 2005 12:45 am Post subject: |
|
|
| Why can't you think of something as simple as a variable name for yourself? I would call it $icantthinkofanameforthismyselfsoiaskedotherpeopletonameifforme. I know that's a little long, but it best describes the variable's function. |
|
| Back to top |
|
 |
Xyem Young One

Joined: 03 Jan 2005 Posts: 54
  
|
Posted: Sun Jan 30, 2005 12:50 am Post subject: |
|
|
*applauds Mojave* 
You made a typing mistake though! Just noticed... you put
...letonameifforme
Should be
...letonameitforme
:ph34r: |
|
| Back to top |
|
 |
..::BIGmouth( )::.. God Like

Joined: 05 Feb 2004 Posts: 801
    
|
Posted: Sun Jan 30, 2005 12:50 am Post subject: |
|
|
Oh my gosh, that is soo Amazing! (a) *cough's* - No really, its a good 'first' command. |
|
| Back to top |
|
 |
Mojave Almost An Agent

Joined: 01 Nov 2003 Posts: 1434
 
|
Posted: Sun Jan 30, 2005 2:00 am Post subject: |
|
|
Oops, so I can't spell the word it, haha.
Bigmouth, you think it's a good command or are you joking? Anyway, this command gets the source of a url and sends it to you. Most pages I encounter are hundreds or thousands of lines and at least 10k bytes. Do you really want all of that sent to you via IM? That would hurt!
It would be a good command if it saved the source to a specified file or directory. Or if it downloaded the entire contents of the page, source and images to a directory. But that would make it a good command for the owner of the bot only (or whoever is hosting the bot).
But mostly, I just want this guy to think! At the very least, he could think of his own variable names. |
|
| Back to top |
|
 |
..::BIGmouth( )::.. God Like

Joined: 05 Feb 2004 Posts: 801
    
|
Posted: Sun Jan 30, 2005 2:37 am Post subject: |
|
|
lol, I was being sarcastic. Anyhow, since the source isn't gunna change, It'll be cooler if he just added cache, soo users are actually instrested in it this 'little' post. (Good o'l LWP::Usergent got 1337 and made one, sooo... here's a script you can play around with):
| Code: | | #Hash out the system stuff after you run it once.;-)<br />system("ppm install LWP::UserAgent::WithCache"); <br /># Btw, Don't even know if the system would work. too lazy to try but I think it would.;-)<br /><br />use LWP::UserAgent::WithCache;<br /><br /> $msg = $1;<br />my $Expire = '600';<br />my %cache_opt = ( 'namespace' => 'lwp-cache', <br /> 'cache_root' => "./Data/Cache", <br /> 'default_expires_in' => $Expire );<br /><br />$ua = LWP::UserAgent::WithCache->new(\%cache_opt, agent => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)');<br /><br />#thanks mojave for this var;-)<br />$icantthinkofanameforthismyselfsoiaskedotherpeopletonameifforme = $ua->get("http://$msg")->content;<br /><br />return $icantthinkofanameforthismyselfsoiaskedotherpeopletonameifforme; |
Btw. I recommend this for most internet commands people post in bot-depot, unless it like some random thingy. |
|
| Back to top |
|
 |
Addict Not Yet a God

Joined: 21 Jan 2004 Posts: 473
   
|
Posted: Sun Jan 30, 2005 3:08 am Post subject: |
|
|
wow that is l337ness mathieu2005 and biggie what are you thinking!?  |
|
| Back to top |
|
 |
..::BIGmouth( )::.. God Like

Joined: 05 Feb 2004 Posts: 801
    
|
Posted: Sun Jan 30, 2005 3:15 am Post subject: |
|
|
*Cries sorry* - *Doesn't post for another couple of months* lmao, anyways no more comedian stuff, back to the topic - this command is very very, very - bad for your botty cause it'll put your botty to sleep for a couple of seconds while querying and can be abused easily soo (Like I can easily make a spam bot open a socket with your bot and type !source randompage.com every second), Anyhow I recommend adding a timer for each user (like 3 mins). |
|
| Back to top |
|
 |
Siebe God Like

Joined: 06 Jan 2004 Posts: 562 Location: Netherlands
    
|
Posted: Sun Jan 30, 2005 3:45 am Post subject: |
|
|
Even better yet, I'll let it download an ISO!  |
|
| Back to top |
|
 |
mathieu2005 Young One

Joined: 23 Dec 2004 Posts: 76
  
|
Posted: Fri Feb 25, 2005 2:18 am Post subject: |
|
|
| what is a iso |
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Fri Feb 25, 2005 12:50 pm Post subject: |
|
|
QUOTE(mathieu2005 @ Feb 24 2005, 09:18 PM) what is a iso | An ISO is a type of archive file, they tend to be really large (i.e. you might find a download of "Microsoft Office 2003 Professional.iso").
Unless they were not referring to the file extension, ISO, than I have no idea what they are talking about. :rolleyes: _________________ Current Site (2008) http://www.cuvou.com/ |