The problem I have is trying to match multiple lines using sed or egrep, so I did not quickly find a way to filter out the Explanation text. The rest was easy (plus I removed the stray number and the "New questions" phrase):
Code:
sed 's/NO./\nNO./' test.txt |egrep -v '^Answer|^Explanation|^New questions|^[0-9]'
Leaving an incomplete solution because of the requirement for a multiline regex match:
Code:
ubuntu# sed 's/NO./\nNO./' text.txt |egrep -v '^Answer|^Explanation|^New questions|^[0-9]'
NO.13 Darius is analysing IDS logs. During the investigation, he noticed that there was nothing
suspicious found and an alert was triggered on normal web application traffic. He can mark this alert
as:
A. False-Negative
B. False-Positive
C. True-Positive
D. False-Signature
NO.14 What is the proper response for a NULL scan if the port is closed?
A. SYN
B. ACK
C. FIN
D. PSH
E. RST
F. No response
NO.15 The Open Web Application Security Project (OWASP) is the worldwide not-for-profit
charitable organization focused on improving the security of software. What item is the primary
concern on OWASP's Top Ten Project Most Critical Web Application Security Risks?
A. Injection
B. Cross Site Scripting
C. Cross Site Request Forgery
D. Path disclosure
IT Certification Guaranteed, The Easy Way!
The top item of the OWASP 2013 OWASP's Top Ten Project Most Critical Web Application Security
Risks is injection.
Injection flaws, such as SQL, OS, and LDAP injection occur when untrusted data is sent to an
interpreter as part of a command or query. The attacker's hostile data can trick the interpreter into
executing unintended commands or accessing data without proper authorization.
References: https://www.owasp.org/index.php/Top_10_2013-Top_10
NO.16 A recent security audit revealed that there were indeed several occasions that the company's
network was breached. After investigating, you discover that your IDS is not configured properly and
therefore is unable to trigger alarms when needed. What type of alert is the IDS giving?
A. True Positive
B. False Negative
C. False Positive
D. False Positive
NO.17 A Network Administrator was recently promoted to Chief Security Officer at a local university.
One of employee's new responsibilities is to manage the implementation of an RFID card access
system to a new server room on campus. The server room will house student enrollment information
that is securely backed up to an off-site location.
During a meeting with an outside consultant, the Chief Security Officer explains that he is concerned
that the existing security controls have not been designed properly. Currently, the Network
Administrator is responsible for approving and issuing RFID card access to the server room, as well as
reviewing the electronic access logs on a weekly basis.
Which of the following is an issue with the situation?
A. Segregation of duties
B. Undue influence
C. Lack of experience
D. Inadequate disaster recovery plan
In practice, I would do this in PERL or PHP because of the required multiline matches; but I'm sure someone else can do a much better command line than me.
I am about 2 months new to Linux, and have only limited experience with PCLinuxOS, (kde) and Redhat.
I am installing the latest version of PClinuxOS on my wife's PC right now but running into a problem I dont understand. I have never seen it before so i thought i'd ask how I can get around it.... (1 Reply)
hi all
plese clarify me in the following area.
1. What is the default NFS version in solaris 5.10. If it is 3, then why it asks me to specify "-o vers=3" keyword while i am mounting a share from a RHEL 5.1 Server?
2. Can someone give the link to download packages for accessing "ntfs"... (4 Replies)
Hello,
I am new to this forum and I am preparing for interview .Kindly can anybody send me Solaris 10 OS administration interview questions and answers (2 Replies)
Hey you guys,
There's a couple questions I cannot find the answers to anywhere in this book for my Operating Systems class, hopefully you guys could help. I believe we are in the Bourne shell.
1. Match each description to the appropriate type of variable
Used in shell programs
... (7 Replies)
Discussion started by: KyleBucket
7 Replies
6. Post Here to Contact Site Administrators and Moderators
I hope this is ok so I will ask if I may use this thread to ask questions about
programming.
May I use this thread to ask questions and answer questions?
If the answer is yes, this is a thread made for minimizing the amount of threads I post to
ask questions about programming. Please feel... (3 Replies)
Hi all,
I have a fat file which contains something like this:
************************************************
blahblahblah
blahblahblah
Myobject1 HOME (
homecontents01 (
some junk;
)
home contents02(
some junk;
)
... (7 Replies)
Hi Unix geniuses,
I need your help for the answers of few objective Q&A.
i dont know if my answers are correct or not.
So i really need your help to provide the answers which will help me in unix programming. (1 Reply)
Here are some answers to some of the recent questions I have received about UNIX.COM. So, I thought I would take time to answer them here in this post:
Is it expected that the original poster "thank" everyone who responds to his / her discussion thread?
It is always a good practice in all... (7 Replies)
Discussion started by: Neo
7 Replies
LEARN ABOUT DEBIAN
gss_inquire_context
gss_inquire_context(3) gss gss_inquire_context(3)NAME
gss_inquire_context - API function
SYNOPSIS
#include <gss.h>
OM_uint32 gss_inquire_context(OM_uint32 * minor_status, const gss_ctx_id_t context_handle, gss_name_t * src_name, gss_name_t * targ_name,
OM_uint32 * lifetime_rec, gss_OID * mech_type, OM_uint32 * ctx_flags, int * locally_initiated, int * open);
ARGUMENTS
OM_uint32 * minor_status
(Integer, modify) Mechanism specific status code.
const gss_ctx_id_t context_handle
(gss_ctx_id_t, read) A handle that refers to the
security context.
gss_name_t * src_name
(gss_name_t, modify, optional) The name of the context
initiator. If the context was established using anonymous
authentication, and if the application invoking
gss_inquire_context is the context acceptor, an anonymous name
will be returned. Storage associated with this name must be
freed by the application after use with a call to
gss_release_name(). Specify NULL if not required.
gss_name_t * targ_name
(gss_name_t, modify, optional) The name of the context
acceptor. Storage associated with this name must be freed by the
application after use with a call to gss_release_name(). If the
context acceptor did not authenticate itself, and if the
initiator did not specify a target name in its call to
gss_init_sec_context(), the value GSS_C_NO_NAME will be returned.
Specify NULL if not required.
OM_uint32 * lifetime_rec
(Integer, modify, optional) The number of seconds
for which the context will remain valid. If the context has
expired, this parameter will be set to zero. If the
implementation does not support context expiration, the value
GSS_C_INDEFINITE will be returned. Specify NULL if not required.
gss_OID * mech_type
(gss_OID, modify, optional) The security mechanism
providing the context. The returned OID will be a pointer to
static storage that should be treated as read-only by the
application; in particular the application should not attempt to
free it. Specify NULL if not required.
OM_uint32 * ctx_flags
(bit-mask, modify, optional) Contains various
independent flags, each of which indicates that the context
supports (or is expected to support, if ctx_open is false) a
specific service option. If not needed, specify NULL. Symbolic
names are provided for each flag, and the symbolic names
corresponding to the required flags should be logically-ANDed
with the ret_flags value to test whether a given option is
supported by the context. See below for the flags.
int * locally_initiated
(Boolean, modify) Non-zero if the invoking
application is the context initiator. Specify NULL if not
required.
int * open (Boolean, modify) Non-zero if the context is fully
established; Zero if a context-establishment token is expected
from the peer application. Specify NULL if not required.
DESCRIPTION
Obtains information about a security context. The caller must already have obtained a handle that refers to the context, although the con-
text need not be fully established.
The `ctx_flags` values:
`GSS_C_DELEG_FLAG`:: - True - Credentials were delegated from the initiator to the acceptor. - False - No credentials were delegated.
`GSS_C_MUTUAL_FLAG`:: - True - The acceptor was authenticated to the initiator. - False - The acceptor did not authenticate itself.
`GSS_C_REPLAY_FLAG`:: - True - replay of protected messages will be detected. - False - replayed messages will not be detected.
`GSS_C_SEQUENCE_FLAG`:: - True - out-of-sequence protected messages will be detected. - False - out-of-sequence messages will not be
detected.
`GSS_C_CONF_FLAG`:: - True - Confidentiality service may be invoked by calling gss_wrap routine. - False - No confidentiality service (via
gss_wrap) available. gss_wrap will provide message encapsulation, data-origin authentication and integrity services only.
`GSS_C_INTEG_FLAG`:: - True - Integrity service may be invoked by calling either gss_get_mic or gss_wrap routines. - False - Per-message
integrity service unavailable.
`GSS_C_ANON_FLAG`:: - True - The initiator's identity will not be revealed to the acceptor. The src_name parameter (if requested) contains
an anonymous internal name. - False - The initiator has been authenticated normally.
`GSS_C_PROT_READY_FLAG`:: - True - Protection services (as specified by the states of the GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are avail-
able for use. - False - Protection services (as specified by the states of the GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are available only if
the context is fully established (i.e. if the open parameter is non-zero).
`GSS_C_TRANS_FLAG`:: - True - The resultant security context may be transferred to other processes via a call to gss_export_sec_context().
- False - The security context is not transferable.
RETURN VALUE
`GSS_S_COMPLETE`: Successful completion.
`GSS_S_NO_CONTEXT`: The referenced context could not be accessed.
REPORTING BUGS
Report bugs to <bug-gss@gnu.org>. GNU Generic Security Service home page: http://www.gnu.org/software/gss/ General help using GNU soft-
ware: http://www.gnu.org/gethelp/
COPYRIGHT
Copyright (C) 2003-2011 Simon Josefsson.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
SEE ALSO
The full documentation for gss is maintained as a Texinfo manual. If the info and gss programs are properly installed at your site, the
command
info gss
should give you access to the complete manual.
gss 1.0.2 gss_inquire_context(3)