'2022/03/25'에 해당되는 글 5건

  1. 2022.03.25 웹소켓
  2. 2022.03.25 ssl socket 예제
  3. 2022.03.25 mac console에서 gui 프로그램 실행하기
  4. 2022.03.25 mac 패키지 분석.. 2?
  5. 2022.03.25 macos ssh 서버 구동
Programming/node.js2022. 3. 25. 17:43

전에 보기만 했지 다뤄본적은 없는데 크윽..

일단 웹을 통해서 소켓을 만드니까.. HTTPS 하면 자동으로 보안도 올라가고

릴레이 해주면 websocket - socket 도 가능하고..

 

[링크 : https://www.npmjs.com/package/websocket]

[링크 : https://niceman.tistory.com/109]

'Programming > node.js' 카테고리의 다른 글

node.js 웹소켓 채팅 서버 예제  (0) 2022.07.14
ubuntu 18.04 / nodej.s 18.x 실패  (0) 2022.05.19
broadway / jsmpeg  (0) 2020.09.16
node.js array.sort() 주의사항  (0) 2020.02.01
node.js postgresql transaction  (0) 2020.01.31
Posted by 구차니
Linux API/network2022. 3. 25. 14:12

복붙하면 "와 ' 가 문제가 생기고

우분투 18.04 에서 빌드하면 client 쪽의 소스에서

SSLv3_client_method() 함수가 없다고 나오니, SSLv23_client_method 으로 바꾸어 주어야 한다.

[링크 : http://pchero21.com/?p=603]

 

실행하면 보안인증서 경로 문제로 실행이 안되는데 인증서는 어떻게 생성해야 하려나..

[링크 : https://m.blog.naver.com/espeniel/221845133507]

 

 

+ 빌드

$ sudo apt-get install libssl-dev

[링크 : https://stackoverflow.com/questions/43131708/fatal-error-openssl-rsa-h-no-such-file-or-directory]

 

-lssl 옵션을 주고 빌드하는데 아래와 같은 에러 발생시에는

/usr/bin/ld: /tmp/ccHIcKux.o: undefined reference to symbol 'ERR_print_errors_fp@@OPENSSL_1_1_0'
//usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

 

-lcrytpo 까지 추가해주면 해결!

% gcc -o test test.c -L/usr/lib -lssl -lcrypto

[링크 : https://stackoverflow.com/questions/12917731/linking-issues-using-openssl-in-ubuntu]

 

+

nc 테스트

접속시 connection from이 뜨고

sadf를 입력하니 error가 나오며 접속이 종료된다.

$ ./srv
Enter PEM pass phrase:
Connection from 100007f, port 96c5
140278452101568:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:332:

 

$ nc localhost 1111

sadf

'Linux API > network' 카테고리의 다른 글

AF_PACKET로 link layer 열기  (0) 2022.06.09
linux tcp server listen accept connect  (0) 2022.05.11
TCP timeout  (0) 2020.09.29
UDS (Unix Domain Socket)  (0) 2020.09.01
raw socker과 promiscous mode  (0) 2019.07.03
Posted by 구차니
Apple2022. 3. 25. 10:14

아.. 우분투 마렵다(?)

 

% open -a TextEdit filename

[링크 : https://apple.stackexchange.com/questions/25844/can-i-open-files-in-textedit-from-the-terminal-in-mac-os-x]

'Apple' 카테고리의 다른 글

mac 에서 rtl-sdr 시도..  (0) 2022.04.02
macos 더블클릭 드래그  (0) 2022.04.01
mac 패키지 분석.. 2?  (0) 2022.03.25
macos ssh 서버 구동  (0) 2022.03.25
macos python opengl  (0) 2022.03.21
Posted by 구차니
Apple2022. 3. 25. 10:08

마인크래프트 한번 해보려고 받았는데 안되네.. 

되면 좋지만 안되면 그것 나름대로 원인을 분석해봐야 하는데

그걸 떠나서 패키지가 어떻게 되나 궁금해서 분석 ㄱㄱ!

 

마인크래프트 패키지는 dmg 확장자에 zlib compressed data라는 포맷으로 인식된다.

% file *
Minecraft.dmg: zlib compressed data

 

근데 해당 파일을 실행하면 알아서 마운트 되고

 

~/Desktop 에서는 보이지 않는 Minecraft 라는 폴더가 생긴다.(맥에서는 폴더라고 하나 디렉토리라고 하나..?)

Desktop % ls -al
total 6432
drwx------+  9 minimonk staff      288  3 25 09:15 .
drwxr-xr-x+ 23 minimonk staff      736  3 25 09:11 ..
-rw-r--r--@  1 minimonk staff     8196  3 25 09:15 .DS_Store
-rw-r--r--   1 minimonk staff        0  3 19 16:50 .localized
-rw-r--r--@  1 minimonk staff  2053616  3 21 10:13 스크린샷 2022-03-21 오전 10.13.11.png
-rw-r--r--@  1 minimonk staff   897651  3 25 09:15 스크린샷 2022-03-25 오전 9.14.55.png
-rw-r--r--@  1 minimonk staff    91529  3 25 09:15 스크린샷 2022-03-25 오전 9.15.04.png
-rw-r--r--@  1 minimonk staff   220589  3 25 09:15 스크린샷 2022-03-25 오전 9.15.28.png

 

바탕화면에 생긴 Minecraft 디렉토리는 "볼륨" 타입으로 출력된다.

일단 mount 명령을 통해 경로를 찾아 들어가보면

% mount | grep Mine
/dev/disk2s1 on /Volumes/Minecraft (hfs, local, nodev, nosuid, read-only, noowners, quarantine, mounted by shin)

 

다른건 딱히 눈에 띄는건 없고.. laucher 라는 실행 파일 하나만 보인다.

% tree
.
├── Applications -> /Applications
└── Minecraft.app
    └── Contents
        ├── Info.plist
        ├── MacOS
        │   └── launcher
        ├── Minecraft Updater.app
        │   └── Contents
        │       ├── Info.plist
        │       ├── MacOS
        │       │   └── nativeUpdater
        │       ├── Resources
        │       │   ├── NativeUpdater.nib
        │       │   ├── PkgInfo
        │       │   └── favicon.icns
        │       └── _CodeSignature
        │           └── CodeResources
        ├── Resources
        │   ├── MainMenu.nib
        │   ├── PkgInfo
        │   └── favicon.icns
        └── _CodeSignature
            └── CodeResources


11 directories, 12 files

 

흐음.. file 설명이 특이하네.. Mach-O? 마하 커널용 오브젝트의 약자일려나?

% file *
launcher: Mach-O 64-bit executable x86_64

 

 

 

이번에는 zoom 클라이언트

파일 자체는 xar로 압축되었다는데 tar 옵션주듯 풀면 풀린다.

% file Zoom.pkg 
Zoom.pkg: xar archive compressed TOC: 6106, SHA-1 checksum

 

% tree
.
├── Distribution
├── Resources
│   ├── de.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── en.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── es.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── fr.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── it.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── ja.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── ko.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── pl.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── pt.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── ru.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── tr.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── vi.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── zh-Hans.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   └── zh-Hant.lproj
│       ├── Localizable.strings
│       └── Welcome.rtf
└── zoomus.pkg
    ├── Bom
    ├── PackageInfo
    ├── Payload
    └── Scripts


16 directories, 33 files

 

 

% file *
Bom:         Mac OS X bill of materials (BOM) file
PackageInfo: XML 1.0 document text, ASCII text
Payload:     gzip compressed data, from Unix, original size modulo 2^32 88226304
Scripts:     gzip compressed data, from Unix, original size modulo 2^32 12800

 

'Apple' 카테고리의 다른 글

macos 더블클릭 드래그  (0) 2022.04.01
mac console에서 gui 프로그램 실행하기  (0) 2022.03.25
macos ssh 서버 구동  (0) 2022.03.25
macos python opengl  (0) 2022.03.21
dmg 파일 분해  (0) 2022.03.21
Posted by 구차니
Apple2022. 3. 25. 09:56

 

 

 

 

 

[링크 : https://jootc.com/p/201810122013]

'Apple' 카테고리의 다른 글

mac console에서 gui 프로그램 실행하기  (0) 2022.03.25
mac 패키지 분석.. 2?  (0) 2022.03.25
macos python opengl  (0) 2022.03.21
dmg 파일 분해  (0) 2022.03.21
mac python opencv 설치  (0) 2022.03.20
Posted by 구차니