Winpcap Test 02

Programming/C,CPP,CS 2016. 3. 7. 09:08 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Obtaining advanced information about installed devices



 



/* * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Politecnico di Torino, CACE Technologies * nor the names of its contributors may be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include <stdio.h> #include "pcap.h" #ifndef WIN32 #include <sys/socket.h> #include <netinet/in.h> #else #include <winsock.h> #endif // Function prototypes void ifprint(pcap_if_t *d); char *iptos(u_long in); char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen); int main() { pcap_if_t *alldevs; pcap_if_t *d; char errbuf[PCAP_ERRBUF_SIZE+1]; char source[PCAP_ERRBUF_SIZE+1]; printf("Enter the device you want to list:\n" "rpcap:// ==> lists interfaces in the local machine\n" "rpcap://hostname:port ==> lists interfaces in a remote machine\n" " (rpcapd daemon must be up and running\n" " and it must accept 'null' authentication)\n" "file://foldername ==> lists all pcap files in the give folder\n\n" "Enter your choice: "); fgets(source, PCAP_ERRBUF_SIZE, stdin); source[PCAP_ERRBUF_SIZE] = '\0'; /* Retrieve the interfaces list */ if (pcap_findalldevs_ex(source, NULL, &alldevs, errbuf) == -1) { fprintf(stderr,"Error in pcap_findalldevs: %s\n",errbuf); exit(1); } /* Scan the list printing every entry */ for(d=alldevs;d;d=d->next) { ifprint(d); } pcap_freealldevs(alldevs); return 1; } /* Print all the available information on the given interface */ void ifprint(pcap_if_t *d) { pcap_addr_t *a; char ip6str[128]; /* Name */ printf("%s\n",d->name); /* Description */ if (d->description) printf("\tDescription: %s\n",d->description); /* Loopback Address*/ printf("\tLoopback: %s\n",(d->flags & PCAP_IF_LOOPBACK)?"yes":"no"); /* IP addresses */ for(a=d->addresses;a;a=a->next) { printf("\tAddress Family: #%d\n",a->addr->sa_family); switch(a->addr->sa_family) { case AF_INET: printf("\tAddress Family Name: AF_INET\n"); if (a->addr) printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr)); if (a->netmask) printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr)); if (a->broadaddr) printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr)); if (a->dstaddr) printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr)); break; case AF_INET6: printf("\tAddress Family Name: AF_INET6\n"); if (a->addr) printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str))); break; default: printf("\tAddress Family Name: Unknown\n"); break; } } printf("\n"); } /* From tcptraceroute, convert a numeric IP address to a string */ #define IPTOSBUFFERS 12 char *iptos(u_long in) { static char output[IPTOSBUFFERS][3*4+3+1]; static short which; u_char *p; p = (u_char *)&in; which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); _snprintf_s(output[which], sizeof(output[which]), sizeof(output[which]),"%d.%d.%d.%d", p[0], p[1], p[2], p[3]); return output[which]; } char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen) { socklen_t sockaddrlen; #ifdef WIN32 sockaddrlen = sizeof(struct sockaddr_in6); #else sockaddrlen = sizeof(struct sockaddr_storage); #endif if(getnameinfo(sockaddr, sockaddrlen, address, addrlen, NULL, 0, NI_NUMERICHOST) != 0) address = NULL; return address; }






error LNK2019: __imp__getnameinfo@28 외부 기호(참조 위치: _ip6tos 함수)에서 확인하지 못했습니다.


Re: About error LNK2001: unresolved external symbol in a winsock application

You need corresponding Ws2_32.lib file to be added to your project to link with.
Header file contains only function declareations.



이런 에러가 뜬다.



링커 input 에 Ws2_32.lib 를 추가



'Programming > C,CPP,CS' 카테고리의 다른 글

Winpcap Test 04  (0) 2016.03.07
Winpcap Test 03  (0) 2016.03.07
Winpcap Test 01  (0) 2016.03.07
CPP 2015-01-15 수업내용 정리  (0) 2015.01.15
C 2015-01-09 실습  (0) 2015.01.09

Winpcap Test 01

Programming/C,CPP,CS 2016. 3. 7. 08:50 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Winpcap Test 01



Download WinPcap 4.1.2 Developer's Pack

http://www.winpcap.org/devel.htm



C/C++ -> Genenral -> Additional Include Directories : WpdPack/WpdPack/Include


Linker -> General -> Additional Library Directories : WpdPack/WpdPack/Lib


Linker -> Input -> Addtional Dependencies : wpcap.lib Packet.lib


C/C++ -> Preprocessor -> PreProcessor Definitions : HAVE_REMOTE


sample Code

/* Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)

 * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)

 * All rights reserved.

 *

 * Redistribution and use in source and binary forms, with or without

 * modification, are permitted provided that the following conditions

 * are met:

 *

 * 1. Redistributions of source code must retain the above copyright

 * notice, this list of conditions and the following disclaimer.

 * 2. Redistributions in binary form must reproduce the above copyright

 * notice, this list of conditions and the following disclaimer in the

 * documentation and/or other materials provided with the distribution.

 * 3. Neither the name of the Politecnico di Torino, CACE Technologies 

 * nor the names of its contributors may be used to endorse or promote 

 * products derived from this software without specific prior written 

 * permission.

 *

 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT

 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 *

 */



#include <stdlib.h>

#include <stdio.h>


//

// NOTE: remember to include WPCAP and HAVE_REMOTE among your

// preprocessor definitions.

//


#include <pcap.h>


#define LINE_LEN 16


int main(int argc, char **argv)

{   

pcap_if_t *alldevs, *d;

pcap_t *fp;

u_int inum, i=0;

char errbuf[PCAP_ERRBUF_SIZE];

int res;

struct pcap_pkthdr *header;

const u_char *pkt_data;


    printf("pktdump_ex: prints the packets of the network using WinPcap.\n");

    printf("   Usage: pktdump_ex [-s source]\n\n"

           "   Examples:\n"

           "      pktdump_ex -s file://c:/temp/file.acp\n"

           "      pktdump_ex -s rpcap://\\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n");


    if(argc < 3)

    {


        printf("\nNo adapter selected: printing the device list:\n");

        /* The user didn't provide a packet source: Retrieve the local device list */

        if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)

        {

            fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);

            return -1;

        }

        

        /* Print the list */

        for(d=alldevs; d; d=d->next)

        {

            printf("%d. %s\n    ", ++i, d->name);


            if (d->description)

                printf(" (%s)\n", d->description);

            else

                printf(" (No description available)\n");

        }

        

        if (i==0)

        {

            fprintf(stderr,"No interfaces found! Exiting.\n");

            return -1;

        }

        

        printf("Enter the interface number (1-%d):",i);

        scanf_s("%d", &inum);

        

        if (inum < 1 || inum > i)

        {

            printf("\nInterface number out of range.\n");


            /* Free the device list */

            pcap_freealldevs(alldevs);

            return -1;

        }

        

        /* Jump to the selected adapter */

        for (d=alldevs, i=0; i< inum-1 ;d=d->next, i++);

        

        /* Open the device */

        if ( (fp= pcap_open(d->name,

                            100 /*snaplen*/,

                            PCAP_OPENFLAG_PROMISCUOUS /*flags*/,

                            20 /*read timeout*/,

                            NULL /* remote authentication */,

                            errbuf)

                            ) == NULL)

        {

            fprintf(stderr,"\nError opening adapter\n");

            return -1;

        }

    }

    else 

    {

        // Do not check for the switch type ('-s')

        if ( (fp= pcap_open(argv[2],

                            100 /*snaplen*/,

                            PCAP_OPENFLAG_PROMISCUOUS /*flags*/,

                            20 /*read timeout*/,

                            NULL /* remote authentication */,

                            errbuf)

                            ) == NULL)

        {

            fprintf(stderr,"\nError opening source: %s\n", errbuf);

            return -1;

        }

    }


    /* Read the packets */

    while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0)

    {


        if(res == 0)

            /* Timeout elapsed */

            continue;


        /* print pkt timestamp and pkt len */

        printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len);          

        

        /* Print the packet */

        for (i=1; (i < header->caplen + 1 ) ; i++)

        {

            printf("%.2x ", pkt_data[i-1]);

            if ( (i % LINE_LEN) == 0) printf("\n");

        }

        

        printf("\n\n");     

    }


    if(res == -1)

    {

        fprintf(stderr, "Error reading the packets: %s\n", pcap_geterr(fp));

        return -1;

    }


    return 0;

}


'Programming > C,CPP,CS' 카테고리의 다른 글

Winpcap Test 03  (0) 2016.03.07
Winpcap Test 02  (0) 2016.03.07
CPP 2015-01-15 수업내용 정리  (0) 2015.01.15
C 2015-01-09 실습  (0) 2015.01.09
Run-Time Check Failure #3 - The variable 'a' is being used without being initialized.  (0) 2014.05.14

ImageFrameTest

Programming/JAVA,JSP 2016. 2. 5. 15:20 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
import java.io.*;

class MyFrame extends JFrame implements ActionListener {
	Image image;
	JButton button;
	JPanel panel;

	public MyFrame() {
		setSize(500, 300);
		setTitle("Image Frame Test");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		panel = new MyPanel();
		add(panel, BorderLayout.CENTER);

		button = new JButton("그림 선택 및 표시");
		button.addActionListener(this);
		add(button, BorderLayout.NORTH);

		setVisible(true);
	}

	public void actionPerformed(ActionEvent e) {
		String file = getFile();
		if (file != null) {
			image = Toolkit.getDefaultToolkit().getImage(file);
			image = image.getScaledInstance(500, 300, Image.SCALE_SMOOTH);
			panel.repaint();
		}
	}

	private String getFile() {
		JFileChooser fc = new JFileChooser();
		fc.setFileFilter(new ImageFilter());
		int result = fc.showOpenDialog(null);
		File file = null;
		if (result == JFileChooser.APPROVE_OPTION) {
			file = fc.getSelectedFile();
			return file.getPath();
		} else
			return null;
	}

	private class MyPanel extends JPanel {
		public void paint(Graphics g) {
			g.drawImage(image, 0, 0, this);
		}
	}

	private class ImageFilter extends javax.swing.filechooser.FileFilter {
		public boolean accept(File f) {
			if (f.isDirectory())
				return true;
			String name = f.getName();
			if (name.matches(".*((.jpg)|(.JPG)|(.gif)|(.GIF)|(.png))|(.PNG)"))
				return true;
			else
				return false;
		}

		public String getDescription() {
			return "이미지 파일 (*.jpg, *.gif, *.png)";
		}
	}
}

public class ImageFrameTest {
	public static void main(String[] args) {
		new MyFrame();
	}
}

'Programming > JAVA,JSP' 카테고리의 다른 글

Activex Event use in JavaScript  (0) 2016.04.14
JDBC Realm  (1) 2016.03.09
Java 채팅 프로그램  (0) 2016.02.04
Java 채팅 소스 예제 #1  (0) 2016.02.04
Java CardLayout Test  (0) 2016.01.26

Java 채팅 프로그램

Programming/JAVA,JSP 2016. 2. 4. 15:35 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
package com.test.aa;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
	public static void main(String[] args) {
		try {
			ServerSocket ss = new ServerSocket(5555);
			Socket s;
			while (true) {

				s = ss.accept();

				System.out.println("입장 : " + s.getInetAddress());
				PerClientThread pc = new PerClientThread();
				pc.s = s;
				pc.start();

			}

		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}

package com.test.aa;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.ArrayList;

public class PerClientThread extends Thread {
	public Socket s;
	public static ArrayList alp
	 = new ArrayList();
		

	@Override
	public void run() {
		PrintWriter out = null;
		BufferedReader in = null;
		try {
			out = new PrintWriter(s.getOutputStream(), true);
			alp.add(out);
			in = new BufferedReader(new InputStreamReader(s.getInputStream()));

			String inputLine;

			while ((inputLine = in.readLine()) != null) {
				System.out.println(inputLine);
				for( int i = 0 ; i < alp.size() ; i++ )
				{
					try{
						alp.get(i).println(inputLine);
					}
					catch(Exception e)
					{
						
					}
					
				}
				
			}

		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}


import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Scanner;

import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JTextField;

public class Client {
	static String nickName;
	public static void main(String[] args) {
		JTextField textField;
		JTextArea textArea;
		PrintWriter out;
		BufferedReader in;
		try {
			Socket s = new Socket("118.46.60.67", 5555);
			out = new PrintWriter(s.getOutputStream(), true);
			in = new BufferedReader(
					new InputStreamReader(s.getInputStream()));
						
			Scanner sc = new Scanner(System.in);
			nickName = sc.next();
			
			JFrame f = new JFrame("채팅");
			f.setSize(600, 400);
			f.setDefaultCloseOperation(f.EXIT_ON_CLOSE);
			textArea = new JTextArea();	
			textField = new JTextField(10);
			textField.addActionListener(
					new ActionListener() {
						public void actionPerformed(ActionEvent e) {
						out.println(
								nickName + " : " + 
									textField.getText());
						}
					}
			);
			f.add(textField, BorderLayout.SOUTH);
			f.add(textArea, BorderLayout.CENTER);
			f.setVisible(true);
			while(true)
			{
				textArea.append(in.readLine()+"\n");
				textField.setText("");
			}
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}

'Programming > JAVA,JSP' 카테고리의 다른 글

JDBC Realm  (1) 2016.03.09
ImageFrameTest  (0) 2016.02.05
Java 채팅 소스 예제 #1  (0) 2016.02.04
Java CardLayout Test  (0) 2016.01.26
정올 알고리즘 2247 도서관 문제  (0) 2015.11.26

Java 채팅 소스 예제 #1

Programming/JAVA,JSP 2016. 2. 4. 14:28 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;

import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JTextField;

public class Client {
	public static void main(String[] args) {
		JTextField textField;
		JTextArea textArea;
		PrintWriter out;
		try {
			Socket s = new Socket("118.46.60.67", 5555);
			out = new PrintWriter(s.getOutputStream(), true);
			JFrame f = new JFrame("채팅");
			f.setSize(600, 400);
			f.setDefaultCloseOperation(f.EXIT_ON_CLOSE);
			textArea = new JTextArea();
			textField = new JTextField(10);
			textField.addActionListener(
					new ActionListener() {
						public void actionPerformed(ActionEvent e) {
						out.println(textField.getText());
						}
					}
			);
			f.add(textField, BorderLayout.SOUTH);
			f.add(textArea, BorderLayout.CENTER);
			f.setVisible(true);
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}

'Programming > JAVA,JSP' 카테고리의 다른 글

ImageFrameTest  (0) 2016.02.05
Java 채팅 프로그램  (0) 2016.02.04
Java CardLayout Test  (0) 2016.01.26
정올 알고리즘 2247 도서관 문제  (0) 2015.11.26
Java Server/Client Code  (2) 2015.11.12

Java CardLayout Test

Programming/JAVA,JSP 2016. 1. 26. 14:43 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

class MyFrame extends JFrame implements ActionListener {
	JPanel panel;
	Cards cards;

	public MyFrame() {
		setTitle("CardLayoutTest");
		setSize(400, 200);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		panel = new JPanel(new GridLayout(0, 5, 10, 0));
		addButton("<<", panel);
		addButton("<", panel);
		addButton(">", panel);
		addButton(">>", panel);
		addButton("종료", panel);
		add(panel, "North");
		cards = new Cards();
		add(cards, "Center");
		setVisible(true);
	}

	void addButton(String str, Container target) {
		JButton button = new JButton(str);
		button.addActionListener(this);
		target.add(button);
	}

	private class Cards extends JPanel {
		CardLayout layout;

		public Cards() {
			layout = new CardLayout();
			setLayout(layout);
			for (int i = 1; i <= 10; i++) {
				add(new JButton("현재 카드의 번호는 " + i + "입니다"), "Center");
			}
		}
	}

	public void actionPerformed(ActionEvent e) {
		if (e.getActionCommand().equals("종료")) {
			System.exit(0);
		} else if (e.getActionCommand().equals("<<")) {
			cards.layout.first(cards);
		} else if (e.getActionCommand().equals("<")) {
			cards.layout.previous(cards);
		} else if (e.getActionCommand().equals(">")) {
			cards.layout.next(cards);
		} else if (e.getActionCommand().equals(">>")) {
			cards.layout.last(cards);
		}
	}
}

public class CardTest {
	public static void main(String args[]) {
		MyFrame f = new MyFrame();
	}
}

'Programming > JAVA,JSP' 카테고리의 다른 글

Java 채팅 프로그램  (0) 2016.02.04
Java 채팅 소스 예제 #1  (0) 2016.02.04
정올 알고리즘 2247 도서관 문제  (0) 2015.11.26
Java Server/Client Code  (2) 2015.11.12
[Spring] 한글 인코딩 설정  (0) 2015.10.29
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

http://venturebeat.com/2015/12/31/software-with-the-most-vulnerabilities-in-2015-mac-os-x-ios-and-flash/



Which software had the most publicly disclosed vulnerabilities this year? The winner is none other than Apple’s Mac OS X, with 384 vulnerabilities. The runner-up? Apple’s iOS, with 375 vulnerabilities.

Rounding out the top five are Adobe’s Flash Player, with 314 vulnerabilities; Adobe’s AIR SDK, with 246 vulnerabilities; and Adobe AIR itself, also with 246 vulnerabilities. For comparison, last year the top five (in order) were: Microsoft’s Internet Explorer, Apple’s Mac OS X, the Linux Kernel, Google’s Chrome, and Apple’s iOS.

These results come from CVE Details, which organizes data provided by the National Vulnerability Database (NVD). As its name implies, the Common Vulnerabilities and Exposures (CVE) system keeps track of publicly known information-security vulnerabilities and exposures.

Here is the 2015 list of the top 50 software products in order of total distinct vulnerabilities:

cve_top_50_2015

You’ll notice that Windows versions are split separately, unlike OS X. Many of the vulnerabilities across various Windows versions are the same, so there is undoubtedly a lot of overlap. The argument for separating them is probably one of market share, though that’s a hard one to agree to, given that Android and iOS are not split into separate versions. This is the nature of CVEs.

It’s also worth pointing out that the Linux kernel is separate from various Linux distributions. This is likely because the Linux kernel can be upgraded independently of the rest of the operating system, and so its vulnerabilities are split off.

If we take the top 50 list of products and categorize them by company, it’s easy to see that the top three are Microsoft, Adobe, and Apple:

cve_top_50_company_2015

Keep in mind that tech companies have different disclosure policies for security holes. Again, this list paints a picture of the number of publicly known vulnerabilities, not of all vulnerabilities, nor of the overall security of a given piece of software.

If you work in IT, or are generally responsible for the security of multiple systems, there are some obvious trends to keep in mind. Based on this list, it’s clear you should always patch and update operating systems, browsers, and Adobe’s free products.

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Android , OpenCV 연동하여 카메라 촬영시 해상도 문제



params.setPictureSize(resolution.width, resolution.height); params.setPreviewSize(resolution.width, resolution.height);


Picture Size 실제 찍히는 사진 사이즈와


Preview Size 미리보기로 나오는 화면 사이즈가 별도로 존재하니 꼭 확인 바랍니다.



336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Opencv 안드로이드 연동 중 Resolution 설정 문제시


mOpenCvCameraView를 이용하여 코드 작성중

Resolution 관련 코드가 안 먹는 경우

화면의 크기가 변경할 Resolution 으로 같이 변하지 못할때 이런 현상이 발생한다.




getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);

를 onCreate 부분에 추가하여 주면


해상도 변경시 화면의 사이즈도 같이 변경된다.


Android Studio 1.4 and OpenCV 3.0.0 연동

Programming/Android 2015. 12. 19. 02:39 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Android Studio 1.4 and OpenCV 3.0.0 연동


Android Studio 1.4


https://dl.google.com/dl/android/studio/install/1.4.0.10/android-studio-bundle-141.2288178-windows.exe


OpenCV_Java_AndroidStudio

https://github.com/quanhua92/OpenCV_Java_AndroidStudio