Editing Noisecode

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
 
noisecode: eval self.say_public('hi')
 
noisecode: eval self.say_public('hi')
 
noisecode: eval reduce(lambda (say,s),i,w=110: [say, [[w>>(s[i-1]*4+s[i]*2+s[(i+1)%len(s)])&1 for i in range(len(s))], say("".join(c and "*" or " " for c in s)), __import__('time').sleep(1)][0]], range(25), [self.say_public, [0] * 70 + [ 1, 0]] ) and "ok 25 is enough"
 
noisecode: eval reduce(lambda (say,s),i,w=110: [say, [[w>>(s[i-1]*4+s[i]*2+s[(i+1)%len(s)])&1 for i in range(len(s))], say("".join(c and "*" or " " for c in s)), __import__('time').sleep(1)][0]], range(25), [self.say_public, [0] * 70 + [ 1, 0]] ) and "ok 25 is enough"
noisecode: eval (lambda c,self=self: map(lambda m,self=self: self.say_public(m) or __import__("time").sleep(1) or c, __import__("re").compile("\w{2,}(?:\w+ ){1,5}(?:is)(?:\w+){1,5}\w{3,}",__import__("re").I).findall(__import__("urllib2").urlopen(__import__("urllib2").Request("http://www.google.com/search?q=%s" % c,headers={"User-agent":"Mozilla/5.0"})).read())[:5]))(__import__("random").choice(self.channels['#noisebridge'].users()))[0]
 
 
</pre>
 
</pre>
  
Line 16: Line 15:
 
noisec: eval char * p; int i; p=&main; for(i=0;i<20;i++) { printf("%.02hhX ", p[i]);
 
noisec: eval char * p; int i; p=&main; for(i=0;i<20;i++) { printf("%.02hhX ", p[i]);
 
noisec: eval char*f="eval char*f=%c%s%c;printf(f,34,f,34,10);%c";printf(f,34,f,34,10);
 
noisec: eval char*f="eval char*f=%c%s%c;printf(f,34,f,34,10);%c";printf(f,34,f,34,10);
noisec: eval int i; __asm("movl $0xdeadbeef, %0": "m"(i)); printf("i=0x%x", i);
 
 
</pre>
 
</pre>
  
Noisesql is yet another bot in #noisebridge which knows all about MySQL.  It's used so often that it also responds to anything prefixed with ".sql".  It has a database of dong urls (dongs), a database of gong urls (gongs), and a database with a copy of the 2009 California legislature's output and the state codes (capublic).  Fun things to ask it to do:
+
Noisesql is yet another bot in #noisebridge which knows all about MySQL.  Fun things to ask it to do:
  
 
<pre>
 
<pre>
Line 25: Line 23:
 
noisesql: eval select cos(0)
 
noisesql: eval select cos(0)
 
noisesql: eval select aes_encrypt('hocus', 'pocus')
 
noisesql: eval select aes_encrypt('hocus', 'pocus')
.sql select * from gongs order by rand() limit 1
 
 
</pre>
 
</pre>
  
Line 33: Line 30:
 
noiseelisp: (message "1+1=%d" (+ 1 1))
 
noiseelisp: (message "1+1=%d" (+ 1 1))
 
</pre>
 
</pre>
 
Noisejs is yet another bot in #noisebridge which knows all about javascript.  Fun things to ask it to do:
 
 
<pre>
 
noisejs: eval function f(x) { if(x>2) { return x*f(x-1); } else { return x; } };  print(f(5));
 
</pre>
 
 
There used to be a bot that looked for certain keywords and would respond with "appropriate" images, but it was kicked and the group arguing for the bot didn't exercise their do-ocratic rights and reinstate it.
 
 
Things people have tried to break the bots so far:
 
 
* Flooding.  The bots are ratelimited and rejoin if they are kicked by the server.
 
* Multiline output, like "Hello, world\nquit\n".  The bots only reply with the first line of the output.
 
* Infinite loops.  The bots use setrlimit and watchdog threads to cap the maximum amount of execution time per eval request.
 
* Modifying noisecode's internal objects using setattr/getattr.
 
* Calling eval() in noisecode via InteractiveConsole and InteractiveInterpreter.
 
* feta called sleep() in noisesql to hang it:
 
< feta> .sql select sleep(999999999)
 
* davr called sleep(), but with more snazz:
 
< davr> .sql set @s=concat('select sle','ep(99999)');prepare stmt1 from @s; execute stmt1;
 
* feta called benchmark and md5 to hang it:
 
< feta> .sql select benchmark(99999999999999,md5(1))
 

Please note that all contributions to Noisebridge are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Noisebridge:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)