Cyber Security module-2

 Cyber Security Module-2 (security management) 

What is Intellect property?

  •    Creation of human mind and intellect
  • Idea or a concept or a thought at the beginning
  •  Research and development to lead the idea or thought to practice
  •  The outcome of these ideas may be development of products, processes, works marks and design, etc.

Intellect is property?

  • Documentation
  • Legal authorization by Govt.
  •  Description
  •  Ownership
  •  Time duration
  •  Fee
  • Commercial Value

Why IPR is important?

  • Reward original efforts
  • Stimulate innovation and creativity
  • Prevent duplication of work.
  • Commercial value in research
  • Prevent exploitation of workers
  • Technical information for research and to prevent litigation.

Forms of IPR



Patents :

• Patent defined in Patents Act as “patent granted for any invention under the Act”.
• Territorial(national) Statutory exclusive right
• Granted by Government
• To inventor or their assignees
• In consideration of disclosure of invention to the government 
• To prevent third parties not having his consent from making, using, offering for sale, selling or importing for those purposes the products or products produced by the patented processes (Sec. 48)
• For limited period of time ( 20 years) 
• Qualified rights with duties and liabilities

Copyright :

• Objective : To ensure protection from unlawfully exploitation of the work of owner(Author)
• Copyright act provides exclusive rights to authors and other owner of original works.
• Exclusive privilege to authors to reproduce, distribute, perform, or display their creative works.
examples of copyright:



Trademark :

• Word or symbol used by manufacturers to identify goods.
 • Customer able to distinguish product of one manufacturer from that of other.
 • Initial registration for 10 yrs and further renewed by payment of fees for unlimited period .

Geographical Indication :

• Geographical Indication ?
• Indication which identifies such goods( as agricultural goods, natural goods or manufactured goods ) as originating or manufactured or processed in territory of the country or locality of territory.
 • Quality and reputation of such goods are attributable to geographical origin.

DESIGN :

 • Include shape, configuration, composition of colors, lines.
 • Main criteria :- 1) Novelty
                             2) Originality

Registration of design - 

                 Currently governed by Design Act 2000 
                 - Total time: 15 yrs
                 - Initially right is granted for 10 yrs then can be extended by 5 yrs by making application                        along with necessary fee.

Trade Secret :

 • Confidential business information
• i.e manufacturing or industrial secrets and commercial secrets.
 • e.g . Sales methods, distribution methods, consumer profiles, advertising strategies, lists of suppliers and clients , manufacturing processes

Examples: 

  • KFC's secret blend of 11 herbs and spices.
  • Coca-Cola's recipe for their signature drink.
  • Google's search algorithm.
  • McDonald's Big Mac “special sauce.”
  • Secret client lists at any company.

Plant Variety Protection :


                                                              Singapore Coconut


• Legal protection granted by govt. For protection of plant varieties, right of farmers and plant breeders 
• Farmer rights act 2001

Integrated Circuits

• Specific manner in which transistors and other circuitry elements of IC are laid out and includes connecting elements.

Laws in India

• Trade marks – The trademarks Act 1999
 • Copy right works – the copyright act 1957
 • Designs – lines colours shapes etc.- The designs Act 2000
 • Inventions – Products or process – Patents Act 1970 
• Plant variety protection – Plant varieties & farmers Rights Act 2001 
• Integrated Circuits – The semiconductor Integrated circuit layout – design Act,2000 
• Geographical indications – Geographical indications of goods (Registration & Protection) Act 1999 came in force with effect from Sept.2003

Ethics and Best Practices: 

Practice cyber ethics

                             Ethics are principles or standards of human conduct. Cyber ethics is a code of behavior on the Internet. Based on common sense and good judgment, cyber ethics also includes obeying laws that apply to online behavior. When you practice cyber ethics, you are more likely to have a safer and enjoyable Internet experience.
Here are a few suggestions: 
DO use the Internet to communicate and interact with other people. Email and instant messaging make it easy to stay in touch with friends and family members, communicate with work colleagues, and share ideas and information with people across town or halfway around the world. Participating in Internet forums and social networking sites are also great ways to engage with people online.

DON'T be a cyberbully. Treat people online the way you would if you were talking to them face-to face. Be considerate and respectful. Don't be rude or mean, don't use bad language, and don't make threats or attempt to humiliate other people. When you type, make sure your Caps Lock key is off or people might think that you're screaming. 

DO report cyberbullying. Keep a record of every comment you receive from a cyberbully; contact the cyberbully one time only and tell him to stop bothering you. If behavior doesn't change, then report the bully to the proper authorities. 
 
DON'T encourage cyberbullies.
If someone you encounter online insults you or says something threatening, just ignore them. Engaging or arguing with cyberbullies might encourage even worse behavior. If you refuse to respond, there is a good chance they will move on and stop bothering you. If a cyberbully harassers you through email or instant messaging, you can also use the builtin filters to prevent further contact.

DO use the Internet for research and information. The Internet is like the world's largest library, packed full of information on every conceivable subject, from ancient history to current events, from math and science to art and anthropology. The information you find online can help you to manage your life, to improve your work, and to make important decisions with greater confidence. 

DON'T use copyrighted information as your own. The Internet has such a wealth of information that it can be tempting to copy and reuse information you find online. Presenting information from the Internet as your own work is not only dishonest, it could be illegal. If the material is copyrighted, then by law it belongs to someone else. If you use it without permission or appropriate attribution, you might be violating copyright laws.

DO enjoy music, videos and games on the Internet. There are many websites where you can sample new music, watch movies and other videos, or play and learn about computer games.

DON'T download or share copyrighted information. If you download and distribute copyrighted  music, videos, games or other materials over the Internet without proper payment or permission, you are stealing.

DO shop, bank and pay bills online. The Internet makes it easy and convenient to manage many tasks online-which can save time and money. 

DON'T share personal information too easily. Be careful about the type and amount of information you share with people online. Beware especially of people you don't know or questionable websites that might not be secure. Revealing personal information can make you a target for online criminals or cyberbullies. To help ensure you're on a secure site, check to see if the URL begins with https (the "s" stands for "secure"). Also, look for a green address bar or a security certificate-represented by an icon such as an unopened lock-somewhere in the browser window. Double-click the certificate to make sure the name on the web address matches the certificate. 

DO use the Internet to expand your social and business networks. Social and business networking sites can help you locate old friends and make new ones, create and maintain valuable professional contacts, and build your online reputation. 
DON'T lie. When you're interacting with people online, be honest, and never pretend to be someone else. If someone asks you a question that makes you uncomfortable or asks you to reveal too much personal information, just don't answer.

Drupal Question-Ans



Drupal is a free and open source Content Management System (CMS) that allows organizing, managing and publishing your content.
Drupal is very powerful and can be used for building large, complex sites. It is PHP based template and allows non-technical users to add and edit the content without any HTML or Web design knowledge. Using Drupal CMS, it can be easy to interact with other sites or technologies and can handle complex forms and workflows. It is available with more than 16000 modules which can be addressed with Drupal core and add-on modules.
The Features of Drupal are:
  • It makes easy to create and manage your site.
  • Translates anything in the system with built-in user interfaces.
  • It connects your website to other sites and services using feeds, search engine connection capabilities etc.
  • Drupal is open source software hence requires no licensing costs.
  • It designs highly flexible, creative website to the users and display more effectively to increase the visitors.
  • Drupal can publish your content on social media such as Twitter, Facebook and other social mediums.
The disadvantage of Drupal are:
  • Drupal is not user friendly interface. It requires advanced knowledge and few basic things about the platform to install and modify.
  • Drupal is new content management system. It is not compatible with other software.
  • Performance is low compared to other CMS's. The website which is built using Drupal will generate big server loads and never opens with a slow internet connection.
Menus are very important to navigate your website easily. Menus offer a set of links as a result; you can navigate your website. The Drupal menu allows you to add, remove and rename the menus and menu items.
If it is consist of sub-menus. Then it will be displayed under parent menu item.
It Sets the order of menu items.
Blocks are container objects that are used to organize your content of your website.
It is used to set width of first sidebar and second sidebar and unit in % or px or em.
Media query defines different style rules for different media devices and by default for this layout will be 1025px.
Media query for Landscape tablet will be min-width: 769px and max-width: 1024px.
It fixes your page at top of lists on your site.
Here you can specify alternative URL by which content can be accessed. Don't add slash at the end or beginning of the URL alias or else it will not work.
It allows you to publish your blog content on Front Page or you can stick at top of lists as per the demand.
By clicking on Provide a menu link checkbox it shows all the related details of Menu such as Menu link title, Description, Parent item, and Weight.
Provide revised information if any changes are made in the article.
By selecting open or close, it allows others to write comment for the article.
Specifies the authored name and the date when article has been authored.
Drupal content type defines the style in which contents are collected and displayed.
The status of the content present while filtering the pages are:
  • Published
  • promoted
  • not promoted
  • sticky
  • not sticky
Menu Management is the important part to navigate through your Drupal admin page.
It displays the list of articles or pages which are created. It is a first screen that will get displayed when you log into administration area.
In this menu you can create, manage and find new pages. Here, the table gets displayed with the detail of the article i.e. status, title, updated, author and operation (Edit and delete).
Structure includes the blocks, manage content types, add new menu links to the site and manage administrative tagging of content.
In this menu, the lists of themes are displayed. User can install the theme, update the existing theme or switch the themes.
In people menu, you can create a new user account or mange the existing user.
This is an important part in the Drupal Back-End. Any changes done in this configuration, will affect the entire website. Here you can do the user account setting, site information setting or any other general site setting.
Taxonomy can be thought of classifying website content which display specific content based on taxonomy terms.
Drupal taxonomy is made up of several terms such as:
  • Term: It is used to manage or describe the content.
  • Vocabulary: It is set of terms.
User Management manages the information of the user, which allows creating or deleting the user, changing passwords, time and roles.
It allows user to access your website without asking them for the username or password.
It allows only those users to access your website, who are authenticated to use it.
The steps to optimize the Drupal site are:
  • Enable Page Caching
  • Compress CSS files
  • Js Aggregation
  • Moving Media Files and Static files to a CDN
  • Optimize Images Size and Their Number
  • Theme Optimization
Error Handling is a process of detection and finding the resolutions for the errors, this can be programming application errors or communicable errors.
Twitter Suffix will optionally append a Twitter handle, or text, so that you get pinged when someone shares an article.
Pane module is used to translate the custom panel's pane with optional title that will be stored as variables and it can be translate or edit quickly.
Aggregator Module takes the content from other websites but does not generate any feeds. It is also known as a feed reader. It gathers, displays texts and images and other sites and blogs.
Select the length of your descriptions.
Sends the automatic reply message to the user.
Unique identifier for the product is given here.
It is a percentage used to calculate the tax which is expressed as a decimal.
Specify what type of rounding should occur when tax rates of tax type are calculated for the unit price of a line item.
It includes the product line item types in add to cart form to collect information.
We should select the server from either of the one i.e. Production or Sandbox.
Invoice is a document with a statement of amount and cost, unique invoice number and tax information.
Order history is dependent on the ordered products made by the user through the use of checkout. It includes history of the product which includes order number, user name, order status etc.
It defines the order status such as processing or pending or completed or cancelled.
PHP 5.2+
The advantages of Drupal are:
  • Drupal is a flexible CMS that allows handling content types including video, text, blog, menu handling, real-time statistics etc.
  • It provides a number of templates for developing web applications. So there is no need to start from scratch if you are building simple or complicated web applications.
  • Drupal is easy to manage or create blog or website. It helps to organize, structure, find and reuse content.
  • Drupal provides some interesting themes and templates which gives your website an attractive look.
  • Drupal has over 7000 plug-ins to boost your website. Since Drupal is an open source, you can create your own plug-ins.
Multilingual means your content can be written and will be displayed in different languages.

Q.1) What is CMS?
2) Why to use drupal?
3) What are features of drupal?
4) What is the system requirements for drupal?
5) Write in brief installation of Drupal.
6) What are the layers contained in architecture of drupal?
7) Explain the architecture of drupal with diagram.
8) How to create menu in drupal?
9) Write a note on blocks and region in drupal.
10) Explain how to change themes in drupal.
11) What are steps to create front page in drupal?
12) How to create static page in drupal?
13) How to create articles in drupal?
14) How to create pages in drupal?
15) Write a steps about creating content in drupal.
16) Explain in brief menu management in drupal.
17) Write steps of Drupal - Taxonomies.
18) Explain user management in drupal.
19) How to optimize drupal to improve its performance and speed?
20) How to setup a shopping cart for Drupal site by using commerce kickstart module?


referenced https://www.tutorialspoint.com/drupal


Practical Assignment :





PHP-II Practical Assignment

Practical Assignment -1  Creating and Drawing Images


<?php

$im = ImageCreate(200,200);

$white = ImageColorAllocate($im,0xFF,0xFF,0xFF);

$black = ImageColorAllocate($im,0x00,0x00,0x00);

ImageFilledRectangle($im,50,50,150,150,$black);

header('Content-Type: image/png');

ImagePNG($im);

?>

Practical Assignment -2  Images with Text 



<?php

$im = ImageCreate(200,200);

$white = ImageColorAllocate($im,0xFF,0xFF,0xFF);

$black = ImageColorAllocate($im,0x00,0x00,0x00);

ImageFilledRectangle($im,50,50,150,150,$black);

ImageString($im,5,50,160,"A black box",$black);


Header('Content-Type: image/png');



ImagePNG($im);



?>



Practical Assignment -3

Resizing with ImageCopyResampled( ) 

<?php
$src=imagecreatefromjpeg('download.jpg');
$width=ImageSx($src);
$height=ImageSy($src);
$x=$width/2;
$y=$height/2;
$dst=ImageCreateTrueColor($x,$y);
ImageCopyResampled($dst,$src,0,0,0,0,$x,$y,$width,$height);
header('Content-Type: image/png');
ImagePNG($dst);
?>

Practical Assignment -4

Checking for image format support 

 <?php
 $im = ImageCreate(200,200);
 $white = ImageColorAllocate($im,0xFF,0xFF,0xFF);
 $black = ImageColorAllocate($im,0x00,0x00,0x00);
 ImageFilledRectangle($im,50,50,150,150,$black);
 if (ImageTypes( ) & IMG_PNG) {
   header("Content-Type: image/png");
   ImagePNG($im);
 } elseif (ImageTypes( ) & IMG_JPG) {
   header("Content-Type: image/jpeg");
   ImageJPEG($im);
 } elseif (ImageTypes( ) & IMG_GIF) {
   header("Content-Type: image/gif");
   ImageGIF($im);
 }
 ?>

Practical Assignment -5

Write a PHP Script to read ‘book.xml’ file and print specific content of a file using DOMDocument parser. ‘book.xml’ file should contain following information with at least 5 records with values.
BookInfo : book_no, book_Name, author_name, Price, Year.

book.xml:


<?xml version='1.0' encoding ='UTF-8' ?>

<?xml-stylesheet type="text/css"?>


<bookstore>
                <books category="technical">
                                <book_no>1</book_no>
                                <book_name>Mrutunjay</book_name>
                                <author_name>shivaji sawant</author_name>
                                <price>500</price>
                                <year>1990</year>
                </books>
                <books category="Cooking">
                                <book_no>2</book_no>
                                <book_name>ccc</book_name>
                                <author_name>aaa</author_name>
                                <price>200</price>
                                <year>1950</year>
                </books>
                <books category="YOGA">
                                <book_no>3</book_no>
                                <book_name>ddd</book_name>
                                <author_name>zzz</author_name>
                                <price>150</price>
                                <year>2016</year>
                </books>
                <books category="technical">
                                <book_no>1</book_no>
                                <book_name>def</book_name>
                                <author_name>xxx</author_name>
                                <price>100</price>
                                <year>1990</year>
                </books>
                <books category="technical">
                                <book_no>1</book_no>
                                <book_name>def</book_name>
                                <author_name>xxx</author_name>
                                <price>100</price>
                                <year>1990</year>
                </books>
</bookstore>

book.php :

<?php
                $doc=new DOMDocument();
                $doc->load("book.xml");
                $name=$doc->getElementsByTagName("book_name");
                $year=$doc->getElementsByTagName("year");

                echo "Books Names";
                foreach($name as $val)
                {
                                echo "<br>".$val->textContent;
                }
                echo "<br><br> Year";
                foreach($year as $value)
                {
                                echo "<br>".$value->textContent;
                }


Practical Assignment -6

Write a PHP script to check how many times the web page access.[ Use cookies]

<?php
                if(isset($_COOKIE['cnt']))
                {
                                $x=$_COOKIE['cnt'];
                                $x=$x+1;
                                setcookie('cnt',$x);
                }
                                else
                                {
                                                setcookie('cnt',2);
                                                echo "you accessed this page 1st  time";
                                }
                echo "you accessed this page $x times";

?>



Practical Assignment -7

Write a PHP script to keep track of number of times the web page has been access. [Use Session]

<html>
<head>
<title> Number of times the web page has been viited.</title>
</head>
<body>
<?php
                session_start();
                if(isset($_SESSION['count']))
                $_SESSION['count']=$_SESSION['count']+1;
                                else
                                $_SESSION['count']=1;
                echo "<h3>This page is accessed</h3>".$_SESSION['count'];
?>



Practical Assignment -8

Write a script to create XML file as ‘Employee.xml’. The element of this xml file are as follows:
<Empdetails>
<Employee EMPno= Empname=>
<Salary>--------</Salary>
<Designation>-------</Designation>
</Employee>
</Empdetails>

XML file :  employee.xml

<?xml version="1.0" encoding="UTF-8"?>
<Empdetails>
                <Emp Empno="1" Empname="Mansi">
                                <Sal>15000</Sal>
                                <Desg>Developer</Desg>
                </Emp>
                <Emp Empno="2" Empname="Gautam">
                                <Sal>35000</Sal>
                                <Desg>HR</Desg>
                </Emp>
                <Emp Empno="3" Empname="Jack">
                                <Sal>25000</Sal>
                                <Desg>Tester</Desg>
                </Emp>
</Empdetails>

PHP file :

<?php
                $xml=simplexml_load_file("employee.xml") or die("error:cannot create object");

                echo "<table border=1 align=center>";
                echo "<tr><td>Employee no</td><td>Employee Name</td><td>Employee Salary</td>      <td>Employee Employee Designation</td></tr>";

                foreach($xml->children() as $emp)
                {
                                $arr = $emp->attributes();
                                echo "<tr><td>".$arr["Empno"]."</td>";
                                echo "<td>".$arr["Empname"]."</td>";
                                echo "<td>".$emp->Sal."</td>";
                                echo "<td>".$emp->Desg."</td></tr>";
                             
                }

                echo "<table>";
?>

Practical Assignment -9

Write a php script to create database connection.

<?php
$servername = "localhost";
$username = "root";
$password = "";

// Create connection
$conn = new mysqli($servername, $username, $password);

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>

Practical Assignment -10

Write a php script to create employee table with attribute (eno,ename,mobile_no,email)

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "mahesh";

// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
}

// sql to create table
$sql = "create table employee (eno INT(6) primary key,
ename varchar(20),mobileno int(10),email varchar(50))";

if (mysqli_query($conn, $sql)) {
    echo "Table employee created successfully";
} else {
    echo "Error creating table: " . mysqli_error($conn);
}

mysqli_close($conn);
?>



Practical Assignment -11

write php script to insert record in employee table : employee((eno,ename,mobile_no,email)

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "mahesh";

// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
}

$sql = "insert into employee values(11, 'ramesh',9730477888,'john@example.com')";

if (mysqli_query($conn, $sql)) {
    echo "New record created successfully";
} else {
    echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}

mysqli_close($conn);
?>