This file is indexed.

/usr/bin/suricatasc is in suricata 1.4.7-1.

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
47
48
49
50
51
#! /usr/bin/python
# Copyright(C) 2013 Open Information Security Foundation

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


import argparse
from suricatasc import *

parser = argparse.ArgumentParser(prog='suricatasc', description='Client for Suricata unix socket')
parser.add_argument('-v', '--verbose', action='store_const', const=True, help='verbose output (including JSON dump)')
parser.add_argument('socket', metavar='socket', nargs='?', help='socket file to connnect to', default=None)
args = parser.parse_args()

if args.socket != None:
    SOCKET_PATH = "/var/run/suricata/" + args.socket[0]
else:
    SOCKET_PATH = "/var/run/suricata/suricata-command.socket"

sc = SuricataSC(SOCKET_PATH, verbose=args.verbose)
try:
    sc.connect()
except SuricataNetException, err:
    print "Unable to connect to socket %s: %s" % (SOCKET_PATH, err)
    sys.exit(1)
except SuricataReturnException, err:
    print "Unable to negotiate version with server: %s" % (err)
    sys.exit(1)
try:
    sc.interactive()
except SuricataNetException, err:
    print "Communication error: %s" % (err)
    sys.exit(1)
except SuricataReturnException, err:
    print "Invalid return from server: %s" % (err)
    sys.exit(1)

print "[+] Quit command client"

sc.close()