This file is indexed.

/usr/bin/txaws-get-bucket is in python-txaws 0.2.3-1ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/python
"""
%prog [options]
"""

import sys

from txaws.credentials import AWSCredentials
from txaws.script import parse_options
from txaws.service import AWSServiceRegion
from txaws.reactor import reactor


def printResults(listing, bucket):
    print "Contents of '%s' bucket:" % bucket
    for item in listing.contents:
        print "\t%s (last modified on %s)" % (item.key, item.modification_date)
    print "Total items: %s\n" % len(listing.contents)
    return 0


def printError(error):
    print error.value
    return 1


def finish(return_code):
    reactor.stop(exitStatus=return_code)


options, args = parse_options(__doc__.strip())
if options.bucket is None:
    print "Error Message: A bucket name is required."
    sys.exit(1)
creds = AWSCredentials(options.access_key, options.secret_key)
region = AWSServiceRegion(
    creds=creds, region=options.region, s3_uri=options.url)
client = region.get_s3_client()

d = client.get_bucket(options.bucket)
d.addCallback(printResults, options.bucket)
d.addErrback(printError)
d.addCallback(finish)
# We use a custom reactor so that we can return the exit status from
# reactor.run().
sys.exit(reactor.run())