User Control Panel
Advertisements

HELP US, HELP YOU!

Perl command

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
Juzz
Senior Member
Senior Member


Joined: 28 Feb 2004
Posts: 190
Location: NSw, australia.
Reputation: 30.4Reputation: 30.4Reputation: 30.4

PostPosted: Mon Apr 12, 2004 4:02 am    Post subject: Reply with quote

Ok can someone please help me.
I need a command for andromeda so if I type !perl $self->file_trans("hehe.exe"); itll send it and same with !perl $self->sendmsg("curry"); will send a message saying curry. Anyone know? Its for andromeda I mention once again Wink
Back to top
GrimReaper
Young One
Young One


Joined: 26 Mar 2004
Posts: 86

Reputation: 27.5Reputation: 27.5Reputation: 27.5

PostPosted: Mon Apr 12, 2004 7:10 am    Post subject: Reply with quote

blah. if i knew i would tell you.. and people, don't say im trying to boost my post, it dosen't count in here anyways
Back to top
Trebe
Young One
Young One


Joined: 23 Mar 2004
Posts: 58
Location: Computer Desk, My House, Alberta, Canada
Reputation: 27Reputation: 27Reputation: 27

PostPosted: Mon Apr 12, 2004 8:08 am    Post subject: Reply with quote

Heres my command to execute perl commands...
Code:
sub perl <br />{<br />   my ($bot, $self, $user, $msg) = @_;<br /><br />      # cuttoff command<br />      $msg =~ s/ /%20/g;<br /><br />   # html symbols<br />   $msg =~ s/\"\;/"/ig;<br />   $msg =~ s/\&apos\;/'/ig;<br />   $msg =~ s/\<\;/</ig;<br />   $msg =~ s/\>\;/>/ig;<br />   $msg =~ s/\&\;/\&/ig;<br /><br />   # execute the command...<br />   if ($msg) {<br />  eval ($msg);<br />  $reply = "I have executed the Perl function.$msg";<br />   }<br />   else {<br />  $reply = "You must put a Perl command in your message. $bot->{settings}->{CommandChar}perl (command here)" ";<br />   }<br /><br />   # Return the reply.<br />   return $reply;<br />}<br /><br />{<br />    Category    => 'System',<br />    Usage       => '/perl (command)',<br />    Description => 'Execute perl commands.',<br />};
Back to top
GiL
Not Yet a God
Not Yet a God


Joined: 06 Jan 2004
Posts: 344

Reputation: 35.3Reputation: 35.3Reputation: 35.3Reputation: 35.3

PostPosted: Mon Apr 12, 2004 8:32 am    Post subject: Reply with quote

or for DevDragon:
Code:
sub eval<br />{<br />    my ($bot,$user,$name,$msg) = @_;<br />    <br />    if ($msg)<br />    {<br />        eval $msg || $bot->sendmsg("Sorry but I couldn't do that.. It didn't work!");<br />    }<br />    else<br />    {<br />        $bot->sendmsg("You have to supply something to eval.");<br />    }<br />}<br /><br />{<br />    Category => 'System',<br />    Description => 'Run a CMD command or a PERL command'<br />};


Note, if this is going to be used at all please only let the most trustworthy people use it. It can be used to format your computer or delete your windows folder. In my opinion it shouldn't be used at all.
Back to top
night
Not Yet a God
Not Yet a God


Joined: 06 Jan 2004
Posts: 498

Reputation: 38.4Reputation: 38.4Reputation: 38.4Reputation: 38.4

PostPosted: Mon Apr 12, 2004 11:27 am    Post subject: Reply with quote

ace gil Razz devdragons ace:)
Back to top
JoeX
Agent
Agent


Joined: 02 Jan 2004
Posts: 2153

Reputation: 72.7

PostPosted: Mon Apr 12, 2004 11:44 am    Post subject: Reply with quote

QUOTE(Trebe @ Apr 12 2004, 12:08 AM)
Heres my command to execute perl commands...
Code:
sub perl <br />{<br />   my ($bot, $self, $user, $msg) = @_;<br /><br />      # cuttoff command<br />      $msg =~ s/ /%20/g;<br /><br />   # html symbols<br />   $msg =~ s/\"\;/"/ig;<br />   $msg =~ s/\&apos\;/'/ig;<br />   $msg =~ s/\<\;/</ig;<br />   $msg =~ s/\>\;/>/ig;<br />   $msg =~ s/\&\;/\&/ig;<br /><br />   # execute the command...<br />   if ($msg) {<br />  eval ($msg);<br />  $reply = "I have executed the Perl function.$msg";<br />   }<br />   else {<br />  $reply = "You must put a Perl command in your message. $bot->{settings}->{CommandChar}perl (command here)" ";<br />   }<br /><br />   # Return the reply.<br />   return $reply;<br />}<br /><br />{<br />    Category    => 'System',<br />    Usage       => '/perl (command)',<br />    Description => 'Execute perl commands.',<br />};

Cer ( Nate ) posted that!

_________________
Heroes NBC
Back to top
Lord Sephiroth
Member
Member


Joined: 02 Jan 2004
Posts: 111

Reputation: 30.8Reputation: 30.8Reputation: 30.8

PostPosted: Mon Apr 12, 2004 1:09 pm    Post subject: Reply with quote

*lazy* we no joe he is referring to it
Back to top
Trebe
Young One
Young One


Joined: 23 Mar 2004
Posts: 58
Location: Computer Desk, My House, Alberta, Canada
Reputation: 27Reputation: 27Reputation: 27

PostPosted: Mon Apr 12, 2004 8:52 pm    Post subject: Reply with quote

I just didn't know who posted it, its the one I use.
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Mon Apr 12, 2004 9:06 pm    Post subject: Reply with quote

QUOTE(JoeX @ Apr 12 2004, 06:44 AM)
Cer ( Nate ) posted that!

Haha, I thought that looked familiar.

The main reason: I'm one of the few people who make AIM bots, and AIM messages are HTML-based, and...

$msg =~ s/\"\;/"/ig;
$msg =~ s/\&apos\;/'/ig;
$msg =~ s/\<\;/$msg =~ s/\>\;/>/ig;
$msg =~ s/\&\;/\&/ig;

Are HTML ascii codes.
" - quotes
' - apostrophes
< - less than <
> - greater than >
& - amperstand &

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group