배포된 여러 취약점중에, 서버를 운영하는 경우 아래와 같은 취약점은 패치 적용을 꼭 진행하는 것이 좋습니다.
CVE-2019-0714 | Windows Hyper-V 서비스 거부 취약성
https://portal.msrc.microsoft.com/ko-KR/security-guidance/advisory/CVE-2019-0714
CVE-2019-0720 | Hyper-V 원격 코드 실행 취약성
https://portal.msrc.microsoft.com/ko-KR/security-guidance/advisory/CVE-2019-0720
CVE-2019-1181 | 원격 데스크톱 서비스 원격 코드 실행 취약성
https://portal.msrc.microsoft.com/ko-KR/security-guidance/advisory/CVE-2019-1181
CVE-2019-1206 | Windows DHCP 서버 서비스 거부 취약성
https://portal.msrc.microsoft.com/ko-KR/security-guidance/advisory/CVE-2019-1206
CVE-2019-1224 | 원격 데스크톱 프로토콜 서버 정보 유출 취약성
https://portal.msrc.microsoft.com/ko-KR/security-guidance/advisory/CVE-2019-1224
CVE-2019-9511 | HTTP/2 Server 서비스 거부 취약성
https://portal.msrc.microsoft.com/ko-KR/security-guidance/advisory/CVE-2019-9511
2019/08/14
2019/08/13
C# Google API Blogger 예제
주로 REST API 호출 예제가 많은데, 구글에서 제공되는 닷넷 API Lib 사용 예제. 인증 부분에서 한참을 헤메다가.. 그리고 API 통해서 포스트내 이미지 업로드 추가는 어떻게 하는건지 못찾음 (지원 안되는것 같음?)
using System.Net.Security;
using Google.Apis.Blogger.v3.Data;
using Google.Apis.Blogger.v3;
using Google.Apis.Auth.OAuth2;
using Google.Apis.Util.Store;
using Google.Apis.Services;
// 인증
UserCredential credential;
using (var stream = new FileStream("client_secret_oauth.json", FileMode.Open, FileAccess.Read))
{
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
new[] { "https://www.googleapis.com/auth/blogger" }, // https://developers.google.com/apis-explorer/#p/blogger/v3/ 에서 허용 설정
"abc", // 구분값
CancellationToken.None,
new FileDataStore("Auth.Blogger")).Result;
}
string blogUrl = "http://bitsyrup.blogspot.com";
BloggerService BloggerService = new BloggerService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = "My Project 20108",
});
// 블로그 정보
var BlogResource = BloggerService.Blogs.GetByUrl(blogUrl);
Blog blog = BlogResource.Execute();
Console.WriteLine("Blog ID: " + blog.Id);
// 포스트 데이터
Post PostData = new Post();
PostData.Title = DateTime.Now.ToString() + " " + " - test";
PostData.Content = "◯◯◯23232 <br /><br /> ";
// PostData.Images.Add(◯◯◯); // 이건 어떻게 작동? 활용 하는건지 못찾음. 예제 없음
// 포스트 올리기
PostsResource PostsResource = new PostsResource(BloggerService);
var post = PostsResource.Insert(PostData, blog.Id).Execute();
Console.WriteLine(post.Id);
// 포스트 목록
PostsResource.ListRequest _request = new PostsResource.ListRequest(_bloggerService, blog.Id);
_request.MaxResults = 50;
_request.FetchBodies = false;
_request.FetchImages = false;
foreach (var _item in _request.Execute().Items)
{
}
using System.Net.Security;
using Google.Apis.Blogger.v3.Data;
using Google.Apis.Blogger.v3;
using Google.Apis.Auth.OAuth2;
using Google.Apis.Util.Store;
using Google.Apis.Services;
// 인증
UserCredential credential;
using (var stream = new FileStream("client_secret_oauth.json", FileMode.Open, FileAccess.Read))
{
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
new[] { "https://www.googleapis.com/auth/blogger" }, // https://developers.google.com/apis-explorer/#p/blogger/v3/ 에서 허용 설정
"abc", // 구분값
CancellationToken.None,
new FileDataStore("Auth.Blogger")).Result;
}
string blogUrl = "http://bitsyrup.blogspot.com";
BloggerService BloggerService = new BloggerService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = "My Project 20108",
});
// 블로그 정보
var BlogResource = BloggerService.Blogs.GetByUrl(blogUrl);
Blog blog = BlogResource.Execute();
Console.WriteLine("Blog ID: " + blog.Id);
// 포스트 데이터
Post PostData = new Post();
PostData.Title = DateTime.Now.ToString() + " " + " - test";
PostData.Content = "◯◯◯23232 <br /><br /> ";
// PostData.Images.Add(◯◯◯); // 이건 어떻게 작동? 활용 하는건지 못찾음. 예제 없음
// 포스트 올리기
PostsResource PostsResource = new PostsResource(BloggerService);
var post = PostsResource.Insert(PostData, blog.Id).Execute();
Console.WriteLine(post.Id);
// 포스트 목록
PostsResource.ListRequest _request = new PostsResource.ListRequest(_bloggerService, blog.Id);
_request.MaxResults = 50;
_request.FetchBodies = false;
_request.FetchImages = false;
foreach (var _item in _request.Execute().Items)
{
}
C# Google API PhotosLibrary 예제
C# 예제가 거의 전무 하다 시피해서... 한참을 이것 저것 테스트 헤매다가 어케 어케....
using Google.Apis.Auth.OAuth2;
using Google.Apis.Util.Store;
using Google.Apis.Services;
using Google.Apis.PhotosLibrary.v1;
using Google.Apis.PhotosLibrary.v1.Data;
// 인증
UserCredential credential;
using (var stream = new FileStream("client_secret_oauth.json", FileMode.Open, FileAccess.Read))
{
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
new[] { PhotosLibraryService.Scope.Photoslibrary, PhotosLibraryService.Scope.DrivePhotosReadonly },
"abcApp", // 구분값
CancellationToken.None,
null).Result;
}
// 앨범 목록
PhotosLibraryService PhotosService = new PhotosLibraryService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
});
var albumsList = PhotosService.Albums.List().Execute();
foreach (var item in albumsList.Albums)
{
Console.WriteLine("Album title: " + item.Title);
Console.WriteLine("Album ID: " + item.Id);
}
// 사진 목록
SearchMediaItemsRequest x = new SearchMediaItemsRequest();
x.AlbumId = "AMhW9mr-M9UF3Tpo2";
var mitems = PhotosService.MediaItems.Search(x).Execute(); // 특정 앨범
foreach(var i in mitems.MediaItems)
{
Console.WriteLine("Id : " +i.Id);
Console.WriteLine("Filename : " + i.Filename);
Console.WriteLine("BaseUrl : " + i.BaseUrl);
Console.WriteLine("ProductUrl : " + i.ProductUrl);
}
using Google.Apis.Auth.OAuth2;
using Google.Apis.Util.Store;
using Google.Apis.Services;
using Google.Apis.PhotosLibrary.v1;
using Google.Apis.PhotosLibrary.v1.Data;
// 인증
UserCredential credential;
using (var stream = new FileStream("client_secret_oauth.json", FileMode.Open, FileAccess.Read))
{
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
new[] { PhotosLibraryService.Scope.Photoslibrary, PhotosLibraryService.Scope.DrivePhotosReadonly },
"abcApp", // 구분값
CancellationToken.None,
null).Result;
}
// 앨범 목록
PhotosLibraryService PhotosService = new PhotosLibraryService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
});
var albumsList = PhotosService.Albums.List().Execute();
foreach (var item in albumsList.Albums)
{
Console.WriteLine("Album title: " + item.Title);
Console.WriteLine("Album ID: " + item.Id);
}
// 사진 목록
SearchMediaItemsRequest x = new SearchMediaItemsRequest();
x.AlbumId = "AMhW9mr-M9UF3Tpo2";
var mitems = PhotosService.MediaItems.Search(x).Execute(); // 특정 앨범
foreach(var i in mitems.MediaItems)
{
Console.WriteLine("Id : " +i.Id);
Console.WriteLine("Filename : " + i.Filename);
Console.WriteLine("BaseUrl : " + i.BaseUrl);
Console.WriteLine("ProductUrl : " + i.ProductUrl);
}
2019/08/12
구글 API 인증 At least one client secrets (Installed or Web) should be set 에러
C#, Google.Apis.Blogger.v3 Auth
처리되지 않은 예외: System.InvalidOperationException: At least one client secrets (Installed or Web)
should be set
위치: Google.Apis.Auth.OAuth2.GoogleClientSecrets.get_Secrets()
json 인증값이, 구글 API 서비스 인증이 아닌 사용자 oAuth 인증으로 변경 적용해 볼 필요가 있음. (구글 여러 API 중에, 서비스 인증을 지원 안하는 API 인것 때문으로 보임)
가장 많이 본 글
-
다음 내용은 SQL Server 2005 인스턴스 간에 로그인 및 암호를 전송하는 방법 : http://support.microsoft.com/kb/918992/ 의 문서 내용중 쿼리 스크립트에 관련된 것인데,. 특히 SQL 의 DB 이전이나 복...
-
다음은,. SQL Injection 또는 자료실 업로드 취약점을 이용해서 해킹에 필요한 기본적인 파일을 업로드후 시스템 전체를 좌지우지 할수 있는 매우 다양한 기능의 asp 파일에 관련된 내용입니다. 실제 해킹을 당했던 서버는, 아래 설명되는 툴을 이...
-
이벤트 형식: 경고 이벤트 원본: WMServer 이벤트 범주: 멀티미디어 이벤트 ID: 309 날짜: 2007-02-26 시간: 오전 11:52:04 사용자: N/A 컴퓨터: VOLVOEC-JMTV8O4 설명: TCP 포트 80...