Homework 1 Perl programming - TA bot release and demo attention - - PowerPoint PPT Presentation

homework 1
SMART_READER_LITE
LIVE PREVIEW

Homework 1 Perl programming - TA bot release and demo attention - - PowerPoint PPT Presentation

Homework 1 Perl programming - TA bot release and demo attention Irc bot fighting screen shot TAs bot Usage: perl referee.pl YOUR_NICK_NAME IDENTIFY_PASSWD TESTING_CHANNEL This bot Should be a channel operator maintain channel


slide-1
SLIDE 1

Homework 1

Perl programming

  • TA bot release and

demo attention

slide-2
SLIDE 2

Irc bot fighting screen shot

slide-3
SLIDE 3

TA’s bot

Usage: perl referee.pl YOUR_NICK_NAME IDENTIFY_PASSWD TESTING_CHANNEL This bot

Should be a channel operator maintain channel member list Decide fighting pair, and send ‘FIGHT’ msg

<@MCBSD> MCBSD2: FIGHT MCBSD3 1377 <@MCBSD> MCBSD3: FIGHT MCBSD2 63933

Kick loser and re-schedule winner

If u want to observe the fighting process

Add a normal user nick to: my @Operator = ($Nick, “XXX”);

slide-4
SLIDE 4

How to register channel and get OP

Register ur own channel. Be careful start with double ‘#’ /msg ChanServ register ##XXXX Set channel operator, and auto-get Op after identifying and auto-login channel /msg ChanServ access ##XXXX add XXXX +voOtsriRfA

slide-5
SLIDE 5

Program flow

Be sure u receive ur and ur opponent’s fighting msg: MCBSD2: FIGHT MCBSD3 1377 MCBSD3: FIGHT MCBSD2 63933 Save ur opponent name, And ur and opponet’s random seed

※ seed will save as string in ur program

Hash string compare Hex char. is bigger than opponet?

Opponent’s is bigger five times mine is bigger five times

random seed Generate 絕招, and attack ur opponent: < MCBSD2> MCBSD3: MCBSD2下賤地blabla.... receive attack from ur opponent: < MCBSD3> MCBSD2: MCBSD3科科地blabla.... Encode and hash both attack: xxEncode = encode_base64(xxAttack ^ xxSeed) xxHash = md5_hex(xxencode ) My energy -1. My energy is 0?

Opponent’s energy -1 Opponent’s energy is 0?

* Me LOSER * Me WINNER

yes yes no no

slide-6
SLIDE 6

Attention for testing bot

If ur channel has unusual behavior…the admin is coming and “cares” for u…

slide-7
SLIDE 7

Attention for testing bot (cont.)

Don’t use “bot海戰術” to test ur bot utility… and be as minimal testing as u can

slide-8
SLIDE 8

Demo environment

Irc bot:

TA will ask u and check ur program, be sure

ur bot is written by right sequence. ur bot is written by right sequence.

Fight with TA’s bot under same referee bot

today release @ secret channel (kerker)

Apache log analyser

Show ur result on browser

slide-9
SLIDE 9

Requirement modification reminder

If TA’s bot discover someone can fight with u

u will receive msg from TA’s bot:

<@TABOT> ME: FIGHT OPPONENT $Seed # $Seed is a random number provide by TA’s bot # $Seed is a random number provide by TA’s bot

Apache log analyser calculate:

top 10: daily burning hour、user page popularity、file

downloading popularity