r/ProgrammerHumor • • Jan 16 '14

[deleted by user]

[removed]

1.3k Upvotes

446 comments sorted by

View all comments

Show parent comment

6

u/[deleted] Jan 17 '14

+/u/CompileBot python

from subprocess import call
call(["ls", "-l"])

3

u/CompileBot Green security clearance Jan 17 '14

Output:

total 4
-rw-r--r-- 1 root 1001 181 2014-01-21 09:00 prog

^source | ^info | ^git | ^report

18

u/[deleted] Jan 17 '14

Uh oh.

3

u/rtkwe Jan 17 '14

+/u/CompileBot python

from subprocess import call
call(["ls", "-al","/"])

2

u/CompileBot Green security clearance Jan 17 '14

Output:

total 48
drwxr-xr-x 12 root root 4096 2013-10-18 10:08 .
drwxr-xr-x 12 root root 4096 2013-10-18 10:08 ..
drwxr-xr-x  2 root root 4096 2013-10-18 10:06 bin
drwxrwxr-x  3 root root 4096 2013-10-18 10:05 build
drwxr-xr-x  3 root root 4096 2013-10-18 10:05 dev
drwxr-xr-x 28 root root 4096 2013-10-18 10:08 etc
drwxr-xr-x  3 root root 4096 2014-01-21 11:10 home
drwxr-xr-x  5 root root 4096 2013-10-18 10:08 lib
drwxrwxr-x  2 root root 4096 2013-10-18 10:05 spoj
drwxrwxr-x  5 root root 4096 2014-01-21 11:10 tmp
drwxr-xr-x  7 root root 4096 2013-10-18 10:08 usr
drwxr-xr-x 13 root root 4096 2013-10-18 10:05 var

^source | ^info | ^git | ^report

4

u/rtkwe Jan 17 '14 edited Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call
call(["ls", "-alR","/"])

2

u/CompileBot Green security clearance Jan 17 '14

Output:

/:
total 48
drwxr-xr-x 12 root root 4096 2013-10-18 10:08 .
drwxr-xr-x 12 root root 4096 2013-10-18 10:08 ..
drwxr-xr-x  2 root root 4096 2013-10-18 10:06 bin
drwxrwxr-x  3 root root 4096 2013-10-18 10:05 build
drwxr-xr-x  3 root root 4096 2013-10-18 10:05 dev
drwxr-xr-x 28 root root 4096 2013-10-18 10:08 etc
drwxr-xr-x  3 root root 4096 2014-01-21 11:21 home
drwxr-xr-x  5 root root 4096 2013-10-18 10:08 lib
drwxrwxr-x  2 root root 4096 2013-10-18 10:05 spoj
drwxrwxr-x  5 root root 4096 2014-01-21 11:21 tmp
drwxr-xr-x  7 root root 4096 2013-10-18 10:08 usr
drwxr-xr-x 13 root root 4096 2013-10-18 10:05 var

/bin:
total 4928
drwxr-xr-x  2 root root   4096 2013-10-18 10:06 .
drwxr-xr-x 12 root root   4096 2013-10-18 10:08 ..
-rwxr-xr-x  1 root root 811156 2013-10-18 10:05 bash
-rwxr-xr-x  1 root root  30268 2013-10-18 10:05 bunzip2
-rwxr-xr-x  1 root root 682996 2013-10-18 10:05 busybox
-rwxr-xr-x  1 root root  30268 2013-10-18 10:05 bzcat
lrwxrwxrwx  1 root root      6 2013-10-22 12:30 bzcmp -> bzdiff
-rwxr-xr-x  1 root root   2140 2013-10-18 10:05 bzdiff
lrwxrwxrwx  1 root root      6 2013-10-22 12:30 bzegrep -> bzgrep
-rwxr-xr-x  1 root root   4877 2013-10-18 10:05 bzexe
lrwxrwxrwx  1 root root      6 2013-10-22 12:30 bzfgrep -> bzgrep
-rwxr-xr-x  1 root root   3642 2013-10-18 10:05 bzgrep
-rwxr-xr-x  1 root root  30268 2013-10-18 10:05 bzip2
-rwxr-xr-x  1 root root   9652 2013-10-18 10:05 bzip2recover
lrwxrwxrwx  1 root root      6 2013-10-22 12:30 bzless -> bzmore
-rwxr-xr-x  1 root root   1297 2013-10-18 10:05 bzmore
-rwxr-xr-x  1 root root  42816 2013-10-18 10:05 cat
-rwxr-xr-x  1 root root  47612 2013-10-18 10:05 chgrp
-rwxr-xr-x  1 root root  44204 2013-10-18 10:05 chmod
-rwxr-xr-x  1 root root  49560 2013-10-18 10:05 chown
-rwxr-xr-x  1 root root   5516 2012-04-29 09:06 chvt
-rwxr-xr-x  1 root root 104576 2013-10-18 10:05 cp
-rwxr-xr-x  1 root root 117264 2013-10-18 10:05 cpio
-rwxr-xr-x  1 root root  84144 2013-10-18 10:05 dash
-rwxr-xr-x  1 root root  53996 2013-10-18 10:05 date
-rwxr-xr-x  1 root root  96400 2013-10-18 10:05 dir
-rwxr-xr-x  1 root root  57936 2012-04-29 09:06 dumpkeys
-rwxr-xr-x  1 root root  18820 2013-10-18 10:05 echo
-rwxr-xr-x  1 root root 100532 2013-10-18 10:05 egrep
-rwxr-xr-x  1 root root  16060 2013-10-18 10:05 false
-rwxr-xr-x  1 root root   9616 2012-04-29 09:06 fgconsole
-rwxr-xr-x  1 root root  65288 2013-10-18 10:05 fgrep
-rwxr-xr-x  1 root root 104628 2013-10-18 10:05 grep
-rwxr-xr-x  1 root root     63 2013-10-18 10:05 gunzip
...

^source | ^info | ^git | ^report

2

u/rtkwe Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call
call(["ls", "-al","/home"])
call(["touch", "/will_this_work"])
call(["ls", "-al","/"])
→ More replies (7)

1

u/Ilostmyredditlogin Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call
call(["ls","-la","/build"])
call(["ls","-la","/home"])
call(["ls","-la","/spoj"])
call(["ls","-la","/tmp"])
→ More replies (11)

1

u/Ilostmyredditlogin Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call
call(["cat","/etc/issue"])
call(["ifconfig","-a"])
call(["cat","/etc/passwd"])
→ More replies (5)

1

u/Ilostmyredditlogin Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call
call(["find","/","deploy.py"])
→ More replies (1)

1

u/Ilostmyredditlogin Jan 17 '14 edited Jan 17 '14

+/u/CompileBot python

from subprocess import call 
call(["uname","-a"])
call(["set"])
call(["find","/","-perm","-4000","-o","-perm","-2000"])
call(["find","/"])

1

u/Ilostmyredditlogin Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call 
call(["uname","-a"])
call(["set"])
call(["find","/","-perm","-4000","-o","-perm","-2000"])
call(["find","/"])

1

u/CompileBot Green security clearance Jan 17 '14

Output:

Linux checker 2.6.32.46 #1 SMP Fri Sep 2 15:45:09 CEST 2011 i686 GNU/Linux
Traceback (most recent call last):
  File "prog.py", line 3, in <module>
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

^source | ^info | ^git | ^report

1

u/Ilostmyredditlogin Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call 
call(["ls","-la","/usr/lib/python2.7"])
→ More replies (1)

1

u/Ilostmyredditlogin Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call 
call(["uname","-a"])
call(["find","/","-perm","-4000","-o","-perm","-2000"])
call(["find","/"])

1

u/CompileBot Green security clearance Jan 17 '14

Output:

Linux checker 2.6.34 #6 SMP Fri Jan 21 15:21:52 CET 2011 i686 GNU/Linux
/
/var
/var/spool
/var/spool/anacron
/var/spool/anacron/cron.monthly
/var/spool/anacron/cron.daily
/var/spool/anacron/cron.weekly
/var/spool/mail
/var/log
/var/log/kern.log
/var/log/wtmp
/var/log/mail.err
/var/log/mail.warn
/var/log/dmesg
/var/log/messages
/var/log/debug
/var/log/fsck
/var/log/fsck/checkfs
/var/log/fsck/checkroot
/var/log/installer
/var/log/installer/lsb-release
/var/log/installer/syslog
/var/log/installer/status
/var/log/installer/cdebconf
/var/log/installer/cdebconf/templates.dat
/var/log/installer/cdebconf/questions.dat
/var/log/installer/partman
/var/log/installer/hardware-summary
/var/log/mail.info
/var/log/boot
/var/log/btmp
/var/log/dmesg.1.gz
/var/log/mail.log
/var/log/syslog
/var/log/alternatives.log
/var/log/auth.log
/var/log/fontconfig.log
/var/log/apt
/var/log/apt/history.log
/var/log/apt/term.log
/var/log/lpr.log
/var/log/dpkg.log
/var/log/pycentral.log
/var/log/daemon.log
/var/log/user.log
/var/log/lastlog
/var/log/dmesg.0
/var/log/faillog
/var/log/news
/var/log/news/news.notice
...

^source | ^info | ^git | ^report

2

u/Ilostmyredditlogin Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call
call(["cat","/var/log/syslog"])
→ More replies (1)

2

u/Ilostmyredditlogin Jan 17 '14

+/u/CompileBot python --include-errors

from subprocess import call
call(["whoami"])
call(["cat","/var/log/installer/hardware-summary")
→ More replies (1)
→ More replies (2)