배포된 여러 취약점중에, 서버를 운영하는 경우 아래와 같은 취약점은 패치 적용을 꼭 진행하는 것이 좋습니다.
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 인것 때문으로 보임)
가장 많이 본 글
-
여러 보안 기관 및 언론등에서 자주 오르내리는 해킹사건의 상당 부분이 웹사이트를 통해서 이루어지고 있다. 왜냐면, 요즘에는 거의 대부분 방화벽등의 장비등을 통해서 막아 놓기 때문에 역시 공개되어 있는 루트를 이용해야 하는데 그것이 바로 웹사이트 이기 ...
-
Windows Server 2003 제품군에서는 다음 두 가지 종류의 클러스터링 서비스가 제공됩니다. 다음 설정 방법은 Windows Server 2003을 기준으로 합니다. Cluster Service (MSCS) Windows Server...
-
Windows2000 Server 및 Windows Server 2003 에서는 관리용 터미널 세션으로 2개 밖에 제공하지 않습니다. 그런데, 터미널에 접속후 연결을 끊지 않을 경우 다른 사용자의 로그인이 불가능합니다. 방법은 query session...