블로그 이미지
훅크선장

카테고리

분류 전체보기 (362)
사진이야기 (23)
펭귄컴퓨팅 (121)
컴퓨터보안 (84)
절름발이 프로그래머 (59)
하드웨어개조 (23)
멀알려줄까 (35)
홈베이킹&홈쿠킹 (2)
잡다한것들 (15)
Total
Today
Yesterday

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

태그목록

최근에 올라온 글

This guide will show you how to make the Internationalized Kali Linux ISO. Although there are several documents for“Customizing Kali Linux”in the KALI LINUX OFFICIAL DOCUMENTATION (also there is a documentation for“Live Build a Custom Kali ISO”),  There is no documentation about how to make the Internationalized Kali Linux ISO. That’s why I wrote this guide. *^ ^*


http://docs.kali.org/category/development

http://docs.kali.org/development/live-build-a-custom-kali-iso


If you referred this guide of making the Korean Kali Linux ISO, you would easily make a Internationalized Kali Linux ISO which has the default language of you own native language.


※This guide will show some methods which do not exist in the KALI LINUX OFFICIAL DOCUMENTATION, I always referred to the Debian Live-Build manuals.

https://debian-live.alioth.debian.org/live-manual/stable/manual/html/live-manual.en.html


Here we go~!


1. Preparation

1-1) Download the original Kali Linux System

You can download a Kali Linux image from the internet webpages of “Kali Linux Downloads”. https://www.kali.org/downloads/


1-2) Install the Kali Linux onto a computer (A real computer could be much better, but a VM machine doesn’t matter. Actually I prefer the VMware Workstation.)

Because you want to make a new Kali Linux image, you must allocate more than 10G Bytes free space of HDD excluding the Kali Linux OS space when you install a Kali Linux.

You could make a new Kali image on a Live booting Kali Linux, but you have to make free space of disk and mount to your Live booting Kali Linux. At least, you should be a intermediate linux user. If not, it will be a hard journey. So I recommend you to install a new Kali Linux system, which would be a easy way to go.


If you are not familiar with a installation of the Kali Linux, there are many installation guides on the internet like the followings.

http://docs.kali.org/category/installation

https://www.youtube.com/watch?v=cfrCMUH2dIE

http://www.hackingtutorials.org/general-tutorials/kali-linux-installation/


※ You can find the installation guides of the Kali Linux which is written by your own language on the web, Please use the web search engine like Google.


※ It doesn’t matter which language environment is used on a Kali Linux system when making the internationalized Kali Linux images. Basically you can make any internationalized Kali Linux image on the original Kali Linux system of the English environment. 


1-3) Check the Internet line (The faster a Internet line is, the more quickly you make a image)

Because the Live-Build process will download all the package files from the Internet, the speed of Internet line will affect the total time of making images. From my experiences, it will take more than 2~3 hours to complete the Live-Build process. But the total time would vary with the line speed and the computer performance.



2. Installation of Live-Build package

After booting with the installed Kali Linux system, Log-in to the system and open a terminal, then type the commands as shown in this guide.

If you are not familiar with the linux commands, Please use Copy & Paste. *^ ^*


2-1) Update the list of packages

root@kali:~#  apt-get update


2-2) Install the packages for the custom build of Kali Linux images

root@kali:~#  apt-get install curl git live-build cdebootstrap apt-cacher-ng



3. Set-up for the custom build of Kali Linux


3-1) Move to the directory of the custom build and download the basic template of Kali Linux

(I will use /mnt directory for the custom build, you can use any directory or make a new one for the custom build.)

root@kali:~#  cd /mnt

root@kali:/mnt# git clone git://git.kali.org/live-build-config.git


Now, you can see new “live-build-config” directory for the custom build settings.


3-2) Set the Korean locale and the keyboard layout

root@kali:/mnt# cd /mnt/live-build-config/auto

root@kali:/mnt/live-build-config/auto# vi config

...

                --bootappend-live "boot=live username=root hostname=kali" \

...


You have to change the 137th line of “config” file like the following, and save the file.

...

                --bootappend-live "boot=live noconfig=sudo username=root hostname=kali ignore_uuid locales=ko_KR.UTF-8 keyboard-layouts=kr keyboard-variants=alt-intl" \

...



YOU MUST BE CAREFUL TO CHANGE THE “config” FILE! Kali Development Team warn everyone not to touch this “config” file, but there is no way except to change this file for making the internationalized Kali Linux ISO. YOU MUST CHECK AGAIN AND AGAIN WHEN CHANGING THE “config” FILE!!!


3-3) Set the package list for Korean fonts, Korean Input method and so on

You can also add the packages for your own need in the custom build. I will add the packages for Korean environment. The file name for the list is “mypackages.chroot.list”.


root@kali:/mnt/live-build-config/auto# cd /mnt/live-build-config/kali-config/common/package-lists

root@kali:/mnt/live-build-config/kali-config/common/package-lists# vi mypackages.chroot.list

nabi

libhangul-data

libhangul1

fonts-nanum

fonts-nanum-coding

fonts-nanum-eco

fonts-nanum-extra

fonts-unfonts-core

fonts-unfonts-extra

im-config

iceweasel

iceweasel-l10n-ko

icedove

icedove-l10n-ko

wicd-gtk

lynx

etherape

gdebi

gtk-recordmydesktop

remmina

htop

nethogs

filezilla

filezilla-common

tor

unace

rar

p7zip-rar

file-roller

pepperflashplugin-nonfree

open-vm-tools

open-vm-tools-desktop

open-vm-tools-dev

open-vm-tools-dkms

gnuradio

gr-osmosdr

osmo-sdr

inspectrum


I showed the purpose of the packages as the followings.

# For Korean environment

# Korean Input Method

nabi

libhangul-data

libhangul1

# Korean fonts

fonts-nanum

fonts-nanum-coding

fonts-nanum-eco

fonts-nanum-extra

fonts-unfonts-core

fonts-unfonts-extra

# Input Method Switcher

im-config

# Additional packages for my own need

iceweasel

iceweasel-l10n-ko

icedove

icedove-l10n-ko

wicd-gtk

lynx

etherape

gdebi

gtk-recordmydesktop

remmina

htop

nethogs

filezilla

filezilla-common

tor

unace

rar

p7zip-rar

file-roller

# Adobe Flash Plug-in

flashplugin-nonfree

# For using the VM environment

open-vm-tools

open-vm-tools-desktop

open-vm-tools-dev

open-vm-tools-dkms



3-4) Make a auto-execute script file for setting of Korean Input Method

On the previous procedure, you added nabi package for Korean Input, but Korean Input method is not working yet. You must run the command for changing the setting of Input method. While booting the Live Kali Linux, you can run the specific command in a script file by “hook”function. If you add a shell script file to “hooks” directory, a shell script file would be inserted to the ISO image and would be executed when the Live Kali linux boots. You can make a shell script file like the followings and name it whatever you want.


root@kali:/mnt/live-build-config/kali-config/common/package-lists# cd /mnt/live-build-config/kali-config/common/hooks/live

root@kali:/mnt/live-build-config/kali-config/common/hooks/live# vi 0500-enable-hangul-xim.hook.chroot 

#!/bin/sh

# Enable hangul-xim setting to use nabi

im-config -n hangul


After making the script file, you have to make the file executable by adding a execute permission. 


root@kali:/mnt/live-build-config/kali-config/common/hooks# chmod 755 0500-enable-hangul-xim.hook.chroot 



3-5) Add some files for program settings in a Live filesystem of Kali Linux (These procedure are not mandatory, If you don’t need it, Just pass!)

When you boot the Live Kali Linux, you might need a file or some files on a specific directory. For example, I always need a modified /root/.bashrc file for my convenient, so I have inserted the modified .bashrc file to “/mnt/live-build-config/kali-config/common/includes.chroot/root/“. In a Live-Build structure, “/mnt/live-build-config/kali-config/common/includes.chroot/”directory would be the root directory for the new Live Kali Linux System, you can add any file to this linux filesystem hierarchy. Every directories and files under the “/mnt/live-build-config/kali-config/common/includes.chroot/”directory will be copied to the Live Kali Linux filesystem after booting. Please be careful, Do not mess up the directories with unnecessary files.


root@kali:/mnt/live-build-config/kali-config/common/hooks# cd /mnt/live-build-config/kali-config/common/includes.chroot

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot# cd root

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot/root# cp /root/.bashrc .

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot/root# vi .bashrc

...

#alias ll='ls -l'

...


Change the above line like the following for making an alias of a linux list command.  


...

alias ll='ls -la'

...



3-6) Add a Debian package file of .deb for installation 

If you need a specific .deb package file in the Live-Build process, you have to locate a .deb file in “/mnt/live-build-config/kali-config/common/packages.chroot/” directory.

Sometime you might want to add a un-official package to the Live Kali Linux, then you can use this directory.

※ A un-official package .deb file must have a filename of the official Debian convention.


root@kali:/mnt/live-build-config# cd kali-config/common

root@kali:/mnt/live-build-config/kali-config/common# mkdir packages.chroot && cd packages.chroot

root@kali:/mnt/live-build-config/kali-config/common/packages.chroot# cp ~/root/xxxxxxxx.deb  .



4. Build the new image

You have setup all the things, Now, you can build the new Kali Linux image.

First move to the build directory.

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot/root/.nabi# cd /mnt/live-build-config


If you just execute the basic script for build like the following,

root@kali:/mnt/live-build-config# ./build.sh


A custom DVD ISO file which has the same system type of current system and has the default X-windows manager of Gnome will be generated in “/mnt/live-build-config/images” directory.

(While building, a .log file of build log will be generated in the same directory of “/mnt/live-build-config/images”. But there are no screen log)


I would recommend you to build a custom DVD ISO with the “build.sh” script with options like the followings

root@kali:/mnt/live-build-config# ./build.sh --arch [CPU type] --distribution [distribution version nickname] --variant [X-Window manager type] --verbose


If possible, you’d better execute the build script for screen logs like the following.

root@kali:/mnt/live-build-config# ./build.sh --distribution kali-rolling --verbose

Last “—verbose” option will make screen logs with the log file too.

CPU type can be chosen from i386 or amd64. i386 means 32bit system, and amd64 means 64bit system.

We do not have any other option for “distribution version nickname”, you have to type “kali-rolling” now. 

X-Windows manager type means the user interface of Kali Linux. You can choose your favorite desktop view & user interface.  X-Windows manager types are gnome which is the default, xfce which was the default of 1.1.0 version, KDE, e17, i3wm, light, lede and mate. But in my experience, Only gnome, xfce and lxde can be made for Korean. I failed to make Korean version of Kali Linux with KDE, e17, i3wm, light and mate.


For example, If you want to make a 64bit xfce version, you have to type the following command.

root@kali:/mnt/live-build-config# ./build.sh --arch amd64 --distribution kali-rolling --variant xfce --verbose


If you want to make a 32bit lxde version, you have to type the following command.

root@kali:/mnt/live-build-config# ./build.sh --arch i386 --distribution kali-rolling --variant lxde --verbose



Thanks to “Hans Ullrich”for his document of making a German Kali Linux. I have referred his document for a long time and I can make my own Korean Kali Linux because of him.

http://www.ccpeine.de/?p=1152

Posted by 훅크선장
, |

2016년 추석을 맞이하여, 칼리 리눅스의 롤링 버전 2016.2 의 한글화에 성공하였습니다.

작년에 나왔던 칼리 리눅스 2.0 버전에 비해서 많은 변화가 있는 것은 아닙니다. 다만, DVD ISO 생성을 위해서 설정하던, 디렉토리의 위치가 조금 변경되었습니다.


현재 X윈도우 매니저를 여러 종류(XFCE, GNOME, LXDE)로 해서 64bit만 각각 Build하는 중입니다. 빌드되는 대로, 계속 업데이트할 예정입니다.

※ KDE 버전은 한글화가 안되는 문제점이 발생되어, 너무 어려워서 한글화하지 않을 예정입니다. 대신 XFCE, LXDE를 써보시기를 권장드립니다. XFCE는 이전 Kali 1.1.0까지 디폴트 X윈도우 매니저이었습니다. LXDE는 저도 이번에 봤는데, 매우 깔끔한 인터페이스입니다.

※ 32bit 는 별도로 빌드하지 않을 예정입니다. 필요성이 점점 없어지는 것 같아서... (결정적으로 제가 환경이 32비트가 아니라서...)


예전까지 Kali는 배포판을 버전으로만 부르다가, 2.0버전부터는 배포판에 별명을 붙이기 시작했습니다. Kali 2.0은 sana라고 불립니다. 그리고 현재는 Rolling 형태가 되어서 버전이라는 개념이 없습니다.


작년 칼리 2.0 한글화 버전에서와 같이, 2015년 2월 1일에 열반에 드신 제 할머니의 법명이신 정도화(jungdowha)를 특별히 한글화된 칼리 리눅스의 별명으로 계속 사용합니다.(앞으로 계속 별명을 사용할 지는 고민해보렵니다.)


※ 세벌식 자판을 쓰시는 분들은 메뉴바에서 나비 아이콘을 클릭하고, 자판을 변경하시면 됩니다.

그놈 버전은 화면 왼쪽 하단의 얇은 검정색 조그만 막대에 마우스를 가져가면, 꺽쇠 아이콘이 나타납니다. 그 아이콘을 클릭하시면, 나비 아이콘이 나옵니다.


배포방식은 이전과 동일하게, FTP 하나 입니다. FTP 패스워드만 퀴즈로 풀면 됩니다.


64비트 파일명(UTF-8, GNOME)은 

kali-linux-rolling-2016.2-jungdowha-amd64-ko-utf8-gnome.iso 입니다.

SHA-160     : b93eb9321290d65519912d9716727ca888b5c8ae

MD5         :  0979522ffe223b5027a4f1c48d5407be


64비트 파일명(UTF-8, XFCE)은 

kali-linux-rolling-2016.2-jungdowha-amd64-ko-utf8-xfce.iso 입니다.

SHA-160     : 530c5cb6fafdd0c1026a9d54e9c0d085cffc43b2

MD5         :  6b921c74e91acf5008904772ebfe46e7


64비트 파일명(UTF-8, LXDE)은 

kali-linux-rolling-2016.2-jungdowha-amd64-ko-utf8-lxde.iso 입니다.

SHA-160     : f268405dc2b4e6d44776df9d42e83235db087f06

MD5         :  a651a8496095fa3ef6c02291415e2397


다른 버전들도 있으니, 한꺼번에 받지 마시고, 필요한 것만 받아가시기 바랍니다.


FTP 서버: hook7346.ignorelist.com

FTP 포트: 21번

FTP 계정: kali2ko

FTP 패스워드는 퀴즈입니다. => 영문자판상태에서 한글로 치시면 됩니다.

1) 패스워드는 한글 4글자와 특수문자 1개로 구성되어 있습니다.

2) 패스워드의 첫 두 글자는 우리나라 문자 이름입니다. 이미 1) 문장에서 나온 단어입니다.

3) 패스워드의 세번째와 네번째 두 글자는 3.1절에 외치던 문장에 있는 두 글자입니다.

“대한 독립 OO”에서 OO에 들어가는 단어입니다.

4) 마지막에 들어가는 특수문자는 3)의 단어뒤에 자주 붙는 특수문자입니다. 느낌이 오시나요? (이거 자주 헷갈리시는데, 쩜은 아닙니다. 느낌입니다.)


다시한번 말씀드리지만, 영문자판상태에서 한글로 치시면 됩니다.

한글 4글자와 특수문자 1개로 구성되어 있습니다.(영문자로는 총 12글자입니다.)


퀴즈가 안풀리시는 분은 이전과 동일하게, 밑에 답글로 이메일주소 적어주시면, 이메일로 접속 정보와 패스워드 알려드립니다.


--------------------------------------------------------------------------------------------------------------


# GNOME 데스크탑 화면



# XFCE 데스크탑 화면



# LXDE 데스크탑 화면


Posted by 훅크선장
, |

칼리 리눅스 롤링 버전(Rolling version)를 한글화된 버전으로 만드는 방법을 공개합니다.

백트랙 리눅스에서 칼리 리눅스로 발전하면서, DVD 커스터마이징은 Live-Build 라는 도구를 이용하여 만들 수 있습니다.


다음은 언제든 업데이트된 상태로 자신만의 칼리리눅스 또는 데비안 리눅스의 Live 버전을 만들어내는 방법이라고도 할 수 있습니다.

많이들 이용하셔서, 자신만의 칼리 리눅스 한글화 버전을 만드시기 바랍니다.


--------------------------------------------------------------------------------------------------------------------------


1. 사전준비 


1) 먼저 칼리 리눅스 2.0 영어 원본을 구합니다.

https://www.kali.org/downloads/

에서 다운로드 받을 수 있습니다.


2) 칼리 리눅스를 설치합니다. (실제 컴퓨터면 더 좋겠습니다만, VMware 같은 가상 PC 환경도 상관없습니다.)

다만, 우리는 새로운 DVD ISO 파일을 생성해야 하기때문에, 칼리리눅스 운영체제를 제외하고, 하드디스크 공간이 적어도  10GB 가 필요할 것입니다. 

(굳이 설치를 하지 않고, Live 부팅 상태에서도 가능합니다만, 이 경우에는 리눅스 ext4 파일시스템을 만들고, 포맷해서 mount 하는 과정을 할 수 있어야 합니다. 리눅스를 사용한 경험이 필요합니다.  리눅스 전문가는 설치가 굳이 필요없을 것입니다. 여러분이 리눅스 초보자라면, 설치를 권장합니다.)

설치에 관련된 내용은 아래 링크들에서 찾을 수 있습니다. 인터넷 검색으로 “칼리 리눅스 설치”를 찾으시면 될 것입니다.

http://bigsecurity.tistory.com/3

http://cherub.sungkyul.edu/~web/jinboard/files/122_Kali-Linux%20%20insatll.pdf


한글 환경후에 설치했는데, 한글이 안보일때는, 아래 링크를 보고 해결하시면 됩니다.

http://lureout.tistory.com/573

※ 꼭 한글화된 칼리 리눅스에서만 한글화 ISO가 만들어지는 것은 아닙니다. 영문판에서도 다 됩니다.


상용 VMware 가 아닌, 무료 VirtualBox 버추얼박스 가상머신에서 칼리 리눅스를 설치하는 법도 있습니다. 참고하시기 바랍니다.

http://blog.naver.com/agboy/220545961824


3) 반드시, 인터넷에 연결되어 있어야 합니다. 가능하면 빠른 인터넷 속도가 좋습니다. (여러분 집에서 쓰는 ADSL 정도 수준이면 충분합니다.)

Live-Build는 인터넷상에서 모든 패키지 파일들을 다운받아오기 때문에, 인터넷 속도가 중요합니다. 

제 경험상 한번 빌드가 시작되면, 2시간 정도 걸립니다. 빌드 명령이 내려지고 나면, 인터넷 속도와 시스템 속도에 따라 2~3시간이 걸릴 것으로 예상됩니다. 그래서, 한번의 실수는 2~3시간의 낭비가 발생합니다만, 어쪌 수 없습니다. 

(저는 항상 칼리리눅스 한글화를 i7 CPU를 장착한 윈도우즈 컴퓨터에서 VMware  가상 환경으로 생성합니다. 가상 환경에서 램은 4GB, 하드디스크는 40GB 정도를 잡고 있습니다. 참고하시기 바랍니다.)


2. Live-Build 패키지 설치하기

설치된 칼리 리눅스 또는 Live 상태의 칼리 리눅스로 부팅한 다음, 터미널 창을 하나 열고 시작합니다.

(인터넷 브라우저를 하나 열고, 여기 제 블로그에 접속해서, 명령어들을 하나씩 Copy & Paste 로 참조하는 것이 좋은 팁입니다.  명령어를 직접 타이핑하는 것보다는 실수가 줄어들 수 있습니다.)


1) 설치 패키지 목록을 최신으로 업데이트합니다.

root@kali:~#  apt-get update


2) 커스텀 빌드에 필요한 패키지 설치

root@kali:~#  apt-get install curl git live-build cdebootstrap apt-cacher-ng


3. 칼리 리눅스를 커스텀 빌드하기 위한 설정


1) 커스텀 빌드를 위한 디렉토리 이동후, 칼리리눅스의 기본 템플릿 가져오기 

(여기서는 /mnt 디렉토리를 빌드용으로 사용합니다. 다른 디렉토리를 선택해도 무방합니다.)

root@kali:~#  cd /mnt

root@kali:/mnt# git clone git://git.kali.org/live-build-config.git


2) 한글 로케일과 키보드 레이아웃을 설정하기

root@kali:/mnt# cd /mnt/live-build-config/auto

root@kali:/mnt/live-build-config/auto# vi config

...

                --bootappend-live "boot=live username=root hostname=kali" \

...


config 파일의 137번째 라인에 있는 이 부분을 다음과 같이 수정하고 저장합니다.

...

                --bootappend-live "boot=live noconfig=sudo username=root hostname=kali ignore_uuid locales=ko_KR.UTF-8 keyboard-layouts=kr keyboard-variants=alt-intl" \

...


config 파일을 수정할 때는 정말 진짜로 너무나도 주의를 기울여야 합니다. 원래 칼리 개발팀은 이 파일을 절대로 손대지 말라고 경고하고 있습니다. 그러나, 이 파일을 수정해야만 한글판을 만들 수 있습니다. 최대한 실수를 하지 않도록, 확인하고 또 확인해서 수정하시기 바랍니다.


3) 한글화를 위한 폰트와 입력기, 그리고 추가 패키지 설정하기

한글화를 위해 반드시 필요한 패키지들과 추가적인 패키지들의 목록을 만들어 줍니다. 그 목록이 들어가는 파일명은 mypackages.chroot.list 입니다.

root@kali:/mnt/live-build-config/auto# cd /mnt/live-build-config/kali-config/common/package-lists

root@kali:/mnt/live-build-config/kali-config/common/package-listsvi mypackages.chroot.list

nabi

libhangul-data

libhangul1

fonts-nanum

fonts-nanum-coding

fonts-nanum-eco

fonts-nanum-extra

fonts-unfonts-core

fonts-unfonts-extra

im-config

iceweasel

iceweasel-l10n-ko

icedove

icedove-l10n-ko

wicd-gtk

lynx

etherape

gdebi

gtk-recordmydesktop

remmina

htop

nethogs

filezilla

filezilla-common

tor

unace

rar

p7zip-rar

file-roller

pepperflashplugin-nonfree

open-vm-tools

open-vm-tools-desktop

open-vm-tools-dev

open-vm-tools-dkms

gnuradio

gr-osmosdr

osmo-sdr

inspectrum


저는 한글입력기로 nabi 를 선호하고, 한글 폰트는 나눔폰트와 은폰트를 선호하기 때문에, mypackages.chroot.list  파일에 그 패키지들의 이름을 넣었습니다. 만약 다른 입력기나 다른 한글 폰트를 좋아하시면 바꾸시면 됩니다. 

위 mypackages.chroot.list  파일의 내용을 천천히 보시면, 제가 추가한 패키지들의 성격을 알 수 있습니다. 저는 가상 환경은 선호하기 때문에, 가상환경에 필요한 open-vm-tools 패키지들을 추가하고 있습니다.


-------------------------------------------------------------------------------------------------------------------------------

한글 입력기를 nimf 프레임워크로 바꾸는 방식을 고려하고 있습니다. 공통입력기 프레임워크인 ibus가 많이 좋아졌다는 이야기가 있습니다만, 제 개인적인 선호에 따라서, nimf 프레임워크로 만들어보려고 합니다.

(다만, nimf를 사용하면, 최초부터 일본어와 중국어 입력기가 활성화되기 때문에, 일단 로그인한 후에, 설정프로그램에서 일본어와 중국어 입력기를 비활성화해야하는 단점이 있습니다.)

root@kali:/mnt/live-build-config/kali-config/common/package-listsvi mypackages.chroot.list

anthy 

anthy-common 

kasumi 

libanthy0 

libappindicator3-1 

libdbusmenu-glib4 

libdbusmenu-gtk3-4 

libhangul-data 

libhangul1 

libindicator3-7 

libsunpinyin3v5 

sunpinyin-data

nimf

fonts-nanum

fonts-nanum-coding

fonts-nanum-eco

fonts-nanum-extra

fonts-unfonts-core

fonts-unfonts-extra

im-config

iceweasel

iceweasel-l10n-ko

icedove

icedove-l10n-ko

wicd-gtk

lynx

etherape

gdebi

gtk-recordmydesktop

remmina

htop

nethogs

filezilla

filezilla-common

tor

unace

rar

p7zip-rar

file-roller

pepperflashplugin-nonfree

open-vm-tools

open-vm-tools-desktop

open-vm-tools-dev

open-vm-tools-dkms

gnuradio

gr-osmosdr

osmo-sdr

inspectrum


3-1) 한글화를 위한 nimf의 deb 파일 추가하기 

한글 입력기 프레임워크인 nimf 패키지는 아직 데비안 정식패키지가 아니기 때문에, 별도록 빌드 과정에서  .deb 파일을 지정된 디렉토리에 추가해야 한다.

~/live-build-config/kali-config/ 밑에 packages.chroot 디렉토리를 생성하고, 그 안에 deb 파일을 데비안 파일명칭 형식에 맞게 해서 넣어주어야 한다. 

root@kali:/mnt/live-build-config# cd kali-config/common

root@kali:/mnt/live-build-config/kali-config/common# mkdir packages.chroot

root@kali:/mnt/live-build-config/kali-config/common/packages.chrootwget https://dl.dropboxusercontent.com/u/54450962/nimf/nimf_2016.07.23-2~xenial_amd64.deb

-------------------------------------------------------------------------------------------------------------------------------


4) 한글 입력기의 설정을 위한 자동 스크립트 작성하기

앞에서 한글 입력기 nabi를 위한 패키지를 추가했습니다만, 패키지가 설치되었다고 바로 입력기를 쓸 수 있는 것이 아닙니다. 입력기가 디폴트로 설정될 수 있도록 하는 명령어를 실행해야 합니다. 이 과정은 Live-Build 에서 hook 이라고 하는 과정을 이용해서 완성합니다. hook 이라는 쉘 스크립트를 작성해서 추가하면, Live-Build가 수행되는 과정중에 ISO 만들어지기 전에 스크립트를 실행시켜줍니다. 

이 hook 기능을 사용하기 위해서, 한글입력기 설정을 위한 쉘 스크립트를 작성합니다.

root@kali:/mnt/live-build-config/kali-config/common/package-lists# cd /mnt/live-build-config/kali-config/common/hooks/live

root@kali:/mnt/live-build-config/kali-config/common/hooks/livevi 0500-enable-hangul-xim.hook.chroot 

#!/bin/sh

# Enable hangul-xim setting to use nabi

im-config -n hangul


위와 같이, 쉘스크립트 내용을 작성해서 저장한 다음, 쉘스크립트가 실행될 수 있도록 실행권한을 줍니다.

root@kali:/mnt/live-build-config/kali-config/common/hooks# chmod 755 0500-enable-hangul-xim.hook.chroot 


-------------------------------------------------------------------------------------------------------------------------------

만약에 nimf를 한글입력기로 쓰려고 설정했다면, 다음과 같이 자동 스크립트를 바꿔줘야 합니다.


root@kali:/mnt/live-build-config/kali-config/common/hooks/livevi 0500-enable-hangul-xim.hook.chroot 

#!/bin/sh

# Enable hangul-xim setting to use nimf

im-config -n nimf

-------------------------------------------------------------------------------------------------------------------------------


5) 기타 설정파일을 추가하기 또는 임의의 파일을 Live 파일시스템에 추가하기(이 과정은 필수적이지는 않습니다, 필요할 때 사용하면 됩니다. 필요없다면, 건너뛰어도 상관없습니다.)

칼리 리눅스가 Live 상태로 부팅되었을 때, 그 파일시스템에 특정한 설정파일 또는 임의의 파일이 필요한 경우가 있습니다. 저에게는 대표적으로  기존에 존재하는 /root/.bashrc 파일이 원하는 대로 수정된 상태로 필요하며, 세벌식 자판을 nabi 입력기에서 디폴트 설정이 되도록 하기 위해서 필요할 수도 있습니다. 이런 임의의 파일이 Live 부팅된 파일시스템에 존재하도록 하기 위해서는 /mnt/live-build-config/kali-config/common/includes.chroot/ 디렉토리 하위에 리눅스 파일시스템과 동일한 디렉토리 구조를 만들고, 파일을 생성·추가해주면 됩니다. 그러면, DVD ISO가 부팅되자마자, 해당 파일들이 파일시스템쪽으로 복사되게 됩니다.

저는 예로 /root/.bashrc 파일내에 alias ll='ls -la' 내용을 수정하고, /root/.nabi/config 파일을 추가합니다.

root@kali:/mnt/live-build-config/kali-config/common/hooks# cd /mnt/live-build-config/kali-config/common/includes.chroot

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot# cd root

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot/root# cp /root/.bashrc .

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot/root# vi .bashrc

...

#alias ll='ls -l'

...

위 내용을 아래와 같이 수정합니다.

...

alias ll='ls -la'

...


그러면, bash 환경에서 ll 이라는 단축 명령어를 사용할 수 있게 됩니다.


4. 칼리리눅스 빌드하기

설정이 완료되었으면, 이제 칼리리눅스를 최신판으로 빌드합니다.

먼저 빌드할 수 있는 디렉토리로 이동합니다.

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot/root/.nabi# cd /mnt/live-build-config

빌드를 기본 스크립트를 다음과 같이 그냥 실행하면,

root@kali:/mnt/live-build-config# ./build.sh

현재 시스템 구조(i386 또는 amd64 CPU 환경)와 동일하고, 디폴트 X-Window 매니저인 gnome으로 커스텀 DVD ISO가 /mnt/live-build-config/images 디렉토리에 생성됩니다. (빌드되는 동안의 로그도 .log 텍스트 파일로 동일한 디렉토리에 생성됩니다. 화면에는 아무것도 표시되지 않습니다.)

그러나, 원하는 커스텀 DVD ISO를 빌드하는 옵션을 다음과 같이 줘서, build.sh 스크립트를 실행하는 것이 좋습니다.

root@kali:/mnt/live-build-config# ./build.sh --arch [CPU 타입] --distribution [배포판 이름] --variant [X-Window 매니저 종류] --verbose

가능하면, 다음과 같이, 빌드과정 메시지들이 출력되게 만들면 좋습니다.

root@kali:/mnt/live-build-config# ./build.sh --distribution kali-rolling --verbose


마지막의 --verbose 옵션은 화면에 빌드되는 로그가 표시되도록 합니다. 물론 로그파일은 생성됩니다.

CPU 타입은 i386 또는 amd64 로 지정할 수 있습니다. 32bit 버전인가  64bit 버전인가를 선택합니다.

배포판 이름은 kali-rolling 를 쓰면 됩니다.  2015년 말에 칼리리눅스 2.0 (배포판 이름은  sana)이 나온 이후로, 칼리리눅스는 rolling 버전의 개념으로 바뀌어서, 항상 최신의 배포판 이름은 kali-rolling 입니다.

X-Windows 매니저 종류는 정확하게는 칼리 리눅스의 종류를 지정하는 것입니다만, 종류가 X-Window 매니저를 기준으로 가장 잘 구분되기 때문에 이렇게 표현하였습니다. X-Windows 매니저 종류는 디폴트 설정인 gnome 부터, 1.1.0버전까지 디폴트 매니저였던 xfce, 그리고 kde, e17, i3wm, light, lxde, mate 같은 종류가 다양하게 있습니다.

제 경험으로 현재 한글화가 되는 것은 gnome, xfce, lxde 세 종류뿐입니다. 


예로, 64bit용 xfce 버전을 만들고 싶으면, 명령어는 다음과 같습니다.

root@kali:/mnt/live-build-config# ./build.sh --arch amd64 --distribution kali-rolling --variant xfce --verbose

만약 32bit용 lxde 버전을 만들고 싶으면, 명령어는 다음과 같습니다.

root@kali:/mnt/live-build-config# ./build.sh --arch i386 --distribution kali-rolling --variant lxde --verbose


이상입니다.

앞에서 알려드렸듯이, 이 과정으로 얼마든지 자기만의 칼리 리눅스를 만들어낼 수 있습니다. 많이 응용해서 사용하시기 바랍니다.

Posted by 훅크선장
, |

최근 유무선공유기 펌웨어 업데이트를 다시 해보니,

펌웨어 업데이트에서 가장 좋은 방법은 TFTP를 이용하는 방법이다.

왜냐하면, 네트워크상에서 바로 펌웨어를 공유기에 주입할 수 있기 때문이다. 기존에 설치된 펌웨어의 웹 인터페이스에서 업그레이드를 하려고 하면, 반드시 펌웨어의 버전 검사나 기타 검사에 의해서 펌웨어를 안 받아들이는 경우가 많기 때문에.(모든 공유기 회사의 번들 펌웨어도 그렇고, DD-WRT도 그렇고,  OpenWRT라고 다르지 않다.)



그래서, 맥(Mac OS X)에서 TFTP 서버를 구동시키고, 펌웨어를 TFTP로 전달하면 된다.


참고한 사이트는 http://www.barryodonovan.com/2014/11/08/os-x-built-in-tftp-server 이다. 


맥에서 터미널을 하나 열고,


# sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist

# sudo launchctl start com.apple.tftpd


이러면, TFTP 서버가 가동된다.


펌웨어는 /private/tftpboot/ 에 넣어주면 된다. 여기가 TFTP 서버의 root directory이다.


# cd /private/tftpboot

# sudo cp ~/Download/new_firmware.bin ./


이렇게 해서, 네트워크를 TFTP 용으로 설정하고, 공유기의 펌웨어를 업데이트를 진행하면 된다.

각각 공유기 회사마다 TFTP용 네트워크 설정이 따로 있으니, 이건 각 회사 매뉴얼을 참고하면 된다.

openwrt.org에 가면, 왠만한 공유기의 정보는 다 있으니, 거기도 참고할 만하다.


이미 가동된 TFTP서버를 정지하려면,


# sudo launchctl unload -F /System/Library/LaunchDaemons/tftp.plist


이 명령어 하나면 된다.


Posted by 훅크선장
, |

이전에 썼던 글에서, OpenWRT에서 OpenVPN 사용을 위한 방화벽 iptables 허용 규칙


방화벽 규칙을 iptables 가 아닌, netfilter로 사용하는 방법입니다. 두 방법에 차이는 없지만, 외국의 사용자들은 netfilter를 더 권장하는 것 같습니다.

/etc/firewall.user는 일종의 custom 룰로 사용하다보니, 좀 더 근본적인 네트워크 필터링?은 netfilter를 더 선호하는 것 같습니다.


/etc/firewall.user  파일에서 사용한 다음의 세 줄이 대상입니다.


###OPENVPN PASS-THROUGH ENABLE RULES###

iptables -I INPUT -p udp --dport 1194 -j ACCEPT

iptables -I FORWARD -i tun+ -j ACCEPT

iptables -I FORWARD -o tun+ -j ACCEPT


----------------------------------------------------------------------------------------------

먼저 위의 세 줄을 모두 주석처리합니다.

# vi /etc/firewall.user

...

###OPENVPN PASS-THROUGH ENABLE RULES###

#iptables -I INPUT -i eth+ -p udp --dport 1194 -j ACCEPT

#iptables -I FORWARD -i tun+ -j ACCEPT

#iptables -I FORWARD -o tun+ -j ACCEPT

...


/etc/config/network 파일에 다음을 추가합니다.

...

...

config interface 'vpn0'

        option proto 'none'

        option ifname 'tun0'


네트워크 인터페이스를 하나 생성하는 것입니다.


/etc/config/firewall 파일에 다음을 추가합니다.(중간쯤에 추가하면 좋습니다.)


config zone

option input ACCEPT

option output ACCEPT

option name openvpn_zone

option network 'vpn0'

option forward REJECT


config forwarding

option dest lan

option src openvpn_zone


config forwarding

option dest wan

option src openvpn_zone


config forwarding

option dest openvpn_zone

option src lan


config rule

option target ACCEPT

option src wan

option proto udp

option dest_port 1194

option family ipv4

option name 'openvpn2openwrt'


순서대로 설명하면,

먼저 vpn 영역의 zone을 생성해줍니다.

두번째로 포워딩을 정의합니다. 포워딩 룰은 모두 3개를 정의합니다.

vpn 영역에서 lan 영역으로,  vpn 영역에서 wan 영역으로, 그리고, lan 영역에서 vpn 영역으로,

총 3개를 정의하면, vpn 상에서 lan 과 wan에 모두 연결이 됩니다.

마지막으로, openvpn 서비스가 사용하는 1194 포트에 대해서 udp 접속이 허가되도록 해줍니다.


이렇게 하고나서, 반드시 OpenWRT 장비를 리부팅해야 됩니다.  zone 설정은 시스템이 재시작되어야만 적용되기 때문이라고 합니다.

# /etc/init.d/network restart

# /etc/init.d/firewall restart

만으로는 해결되지 않습니다.

반드시, OpenWRT 장비를 리부팅해야만 합니다.



Posted by 훅크선장
, |

터미널 창에서 먼저


$ diskutil list    명령어를 실행합니다.

/dev/disk0

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *251.0 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:                  Apple_HFS Macintosh HD            250.1 GB   disk0s2

   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *2.0 TB     disk1

   1:                        EFI EFI                     209.7 MB   disk1s1

   2:                  Apple_HFS Macintosh HD 2          2.0 TB     disk1s2

/dev/disk2

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:     FDisk_partition_scheme                        *7.9 GB     disk2

   1:             Windows_FAT_32 boot                    62.9 MB    disk2s1

   2:                      Linux                         1.4 GB     disk2s2


위와 비슷한 결과가 나옵니다. 실험된 iMac 장비에는 내장 디스크가 SSD 256GB 1개와 HDD 2TB 1개가 달려있습니다.

그래서, 마지막에 보시면, /dev/disk2 라는 디스크로 8GB 짜리 USB 메모리가 보입니다. 현재 Linux 파티션이 1.4GB로 보입니다.


/dev/disk2 로 인식되어 있는 8GB USB 메모리를 FAT32 파티션으로 포맷하는 방법은 간단합니다.

포맷하기전에 반드시 꼭 디스크명 /dev/disk2 를 확인하세요!! 잘못하면, 엉뚱한 디스크를 포맷할 수 있습니다.


$ sudo diskutil eraseDisk FAT32 "AAA" MBRFormat /dev/disk2

명령어 하나면, USB 디스크를 모두 지운후에, FAT32 파티션으로 만들어줍니다.

"AAA"는 볼륨 이름을 지정하는 것인데, 반드시 대문자로 써야합니다.  "aaa" 같이 소문자를 절대로 쓰면 안됩니다.


$ sudo diskutil eraseDisk FAT32 "AAA" MBRFormat /dev/disk2

Password:[관리자 패스워드 입력 필요]

Started erase on disk2

Unmounting disk

Creating the partition map

Waiting for the disks to reappear

Formatting disk2s1 as MS-DOS (FAT32) with name AAA

512 bytes per physical sector

/dev/rdisk2s1: 15385208 sectors in 1923151 FAT32 clusters (4096 bytes/cluster)

bps=512 spc=8 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=2 drv=0x80 bsec=15415294 bspf=15025 rdcl=2 infs=1 bkbs=6

Mounting disk

Finished erase on disk2


위 명령어 후에는 다음과 같이 보입니다.

$ diskutil list

/dev/disk0

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *251.0 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:                  Apple_HFS Macintosh HD            250.1 GB   disk0s2

   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *2.0 TB     disk1

   1:                        EFI EFI                     209.7 MB   disk1s1

   2:                  Apple_HFS Macintosh HD 2          2.0 TB     disk1s2

/dev/disk2

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:     FDisk_partition_scheme                        *7.9 GB     disk2

   1:                 DOS_FAT_32 AAA                     7.9 GB     disk2s1

Posted by 훅크선장
, |

OpenWRT에서 WAN Interface 명칭과  LAN 인터페이스 명칭을 쉡 스크립트로 사용하여 알 수 있습니다.


Interface 명칭은 보통 eth0, eth1, 등등 인데, OpenWRT에서는 br-lan 이라는 인터페이스 명이 주로 내부 LAN 이름으로 사용됩니다.

UCI 명령어를 쓰면 인터페이스 명칭을 쉽게 알아낼 수 있습니다.


WAN 인터페이스 명칭 알아내기

uci -P/var/state get network.wan.ifname

결과값은

eth0

으로 출력됩니다만, 다른 장비들에서는 eth1 으로 출력되기도 합니다. 주의하셔서 보셔야 합니다.

LAN 인터페이스 명칭 알아내기

uci -P/var/state get network.lan.ifname

결과값은

br-lan

으로 대부분 출력됩니다.



위의 스크립트는 다양한 곳에서 사용할 수 있습니다.

대표적으로 방화벽 설정파일인 /etc/firewall.user 파일에 적용할 수 있습니다.


WANIF=$(uci -P/var/state get network.wan.ifname)

iptables -A INPUT -i $WANIF -p tcp --dport 21 -j ACCEPT

와 같은 식으로, WAN 인터페이스를 지정하는 스크립트를 장비의 출력값에 구애받지 않고 쓸 수 있는 장점이 있습니다.

Posted by 훅크선장
, |

OpenWrt Chaos Calmer 15.05 에서 테스트된 내용으로,

OpenVPN 클라이언트가 OpenWRT의 OpenVPN 서비스로 접속하여, 인터넷을 하기 위한 iptables 규칙을 설명합니다. (클라이언트의 패킷들이 OpenWRT 공유기를 통하여, 인터넷으로 Forwarding 되기 위한 조건)


/etc/firewall.user  파일에 다음과 같이 딱 세 줄만 추가하면 됩니다.


###OPENVPN PASS-THROUGH ENABLE RULES###

iptables -I INPUT -p udp --dport 1194 -j ACCEPT

iptables -I FORWARD -i tun+ -j ACCEPT

iptables -I FORWARD -o tun+ -j ACCEPT


앞의 첫째 줄,

iptables -I INPUT -p udp --dport 1194 -j ACCEPT

이것들은 1194 포트(OpenVPN의 디폴트 Listen 포트번호)로 들어오는 udp 패킷을 받아들이는 것입니다.

이 라인이 없으면, OpenVPN 서비스 접속 자체가 불가능합니다.

만약 특정 네트워크 인터페이스에서만, OpenVPN 서비스를 사용한다면, 다음과 같이 인터페이스를 지정할 수 있습니다.

iptables -I INPUT -i eth0 -p udp --dport 1194 -j ACCEPT


eth0는 예로 든 것입니다. 일반적으로는 ifconfig  명령을 실행한 다음, 인터넷과 연결된 WAN 인터페이스를 찾아야 합니다. 경험상으로 eth0 또는 eth1이 주로 WAN 인터페이스입니다만, 어느쪽이 될지는 OpenWRT가 설치된 장비에 따라 틀립니다. 반드시 확인하시기 바랍니다.


만약 OpenVPN을 tcp 모드로 사용한다면,  다음과 같이 수정해서 사용하여야 한다. (OpenVPN은 udp 모드로 사용해야 좋습니다. udp 모드가 tcp 모드에 비해 속도가 빠르다고 합니다.)

iptables -I INPUT -p tcp --dport 1194 -j ACCEPT

--dport 뒤에 쓰여진 1194 라는 번호도 역시 디폴트 OpenVPN 포트번호이므로, 혹시 다른 포트를 사용하기로 설정했다면, 여기도 수정해서 사용해야 한다.


그 뒤의 두 줄,

iptables -I FORWARD -i tun+ -j ACCEPT

iptables -I FORWARD -o tun+ -j ACCEPT

이것들은 OpenVPN으로 연결된(tun 디바이스명을 가진) 네트워크 어댑터들의 패킷들이 다른 네트워크 디바이스 쪽으로 서로 왕래할 수 있도록 합니다.


-i tun+ 가 있는 줄은 tun 디바이스 명을 가진 네트워크 어댑터에서 출발한 패킷들이 다른 네트워크 어댑터, 즉 OpenWRT 공유기의 LAN 영역이나 WAN 영역으로 전달될 수 있도록 하는 것입니다.

-o tun+ 가 있는 줄은 OpenWRT 공유기의 LAN 영역이나 WAN 영역에서 출발한 패킷들이(아마도 대부분은 윗 줄의 패킷들에 대한 응답들이 많은) tun 디바이스명을 가진 네트워크 어댑터쪽으로 다시 들어올 수 있도록 하는 것입니다.


------------------------------------------

대부분의 OpenWRT의  OpenVPN 서비스가 사용할 빈도가 적겠지만,

만약 OpenVPN 서비스에 접속한 외부의 클라이언트들이 OpenWRT 내부의 LAN 영역에만 접근가능하도록 하고, 인터넷을 사용하지 못하게 하려면, (ex. 회사내의 서버만을 연결하는 경우)


위에서 설명한 FORWARD 규칙 두 줄을 다음과 같이 수정하면 됩니다.

iptables -I FORWARD -i tun+ -d 192.168.1.0/24 -j ACCEPT

iptables -I FORWARD -o tun+ -s 192.168.1.0/24 -j ACCEPT


여기서, 192.168.1.0 네트워크는 OpenWRT의 내부 LAN  IP 대역을 지칭하는 것입니다. 여러분의 환경에 맞게 확인하시고 입력하시면 됩니다.


 -d 192.168.1.0/24 를 -o br-lan 으로,  -s 192.168.1.0/24 를 -i br-lan  으로 바꾸어 쓸 수 없습니다. (br-lan은 OpenWRT의 내부 LAN 영역을 지칭하는 디바이스명입니다.) 이유는 확실하지 않지만, 일단 br-lan 영역에 패킷이 들어오면, 공유기의 기본 기능으로 인하여, 패킷이 인터넷으로 포워딩되는 것 같습니다.

개인적으로는 'br-lan' 이라는 이름보다는 IP 주소를 명시적으로 사용하는 것이 직관적이라고 생각됩니다.

Posted by 훅크선장
, |

FM_Receiver.grc
0.01MB
fm_example_by_HooK.grc
0.04MB

RTL-SDR FM radio receiver with GNU Radio Companion

http://www.instructables.com/id/RTL-SDR-FM-radio-receiver-with-GNU-Radio-Companion/?ALLSTEPS

를 참고하여서, 약간의 수정을 가한 것입니다.

 

※ 좀더 자세한 FM 수신에 관한 정보는 여기서 볼 수 있습니다. (일본어 자료)

http://wireless-square.com/2016/01/14/fm-receiver-using-gnu-radio/

위와 같이, 샘플링 주파수와 각각의 값을 주어져야 합니다. 아래의 설명에서는 주파수 대역폭이 약간 이상한 값을 사용하였으나, 방송수신에는 큰 차이 없습니다.

 

 

 

HackRF One 장비와 GNU Radio Companion 프로그램을 이용하여서, Kali Linux 2.0 버전에서 실행한 결과입니다.

※ Kali Linux 2.0에서 HackRF One 장비를 정상적으로 사용하기 위해서는, 항상 장비를 USB로 연결한 다음, # rmmod hackrf  명령을 실행해야만 합니다.

 

바로 사용할 수 있는 완성된 GRC 파일은 여기서 다운로드 받을 수 있습니다.

 

다음은 테스트 버전으로 만들어본 것으로 주파수 입력을 텍스트 박스에서 하는 형태입니다.

 

 

다음은 완성된 버전으로 주파수 입력을 텍스트 박스에서 할 수도 있고, 슬라이드 바를 움직여서 주파수 변화를 줄 수 있게 만든 것입니다.

 

 

위와 같은 SDR (Software Defined Radio)를 만드는 과정을 단계별로 설명합니다.

 

제일 먼저 (GRC) GNU Radio Companion 을 실행시킵니다.  실행메뉴에서 찾기 어려우면, 그냥 터미널 프로그램에서

# gnuradio companion &

명령어를 실행하면 됩니다.

 

 

0. Variable: samp_rate

HackRF One에서 전파 수신을 하는 주기인 Sampling Rate 샘플링 주기를 정합니다. FM Radio를 설계하는 것이라서, 적절한 2000000 (= 2MHz를 의미)으로 설정합니다. 2e6 으로 입력하면, 화면 표시는 2M 으로 나타납니다.

 

 

1. RTL-SDR Source

HackRF 장비를 나타내는 전파 수신 입력기를 설정합니다. RTL-SDR Source는 대부분의 전파 수신 입력장치를 총괄합니다. RTL2832 계열의 수신기도 사용할 수 있습니다.

여기서는 Sample Rate로 변수인 samp_rate와 Ch0: Frequency를  슬라이드 바 변수값인 channel_freq로 설정합니다.

그리고, ch0: RF Gain을 20 정도로 맞추어줍니다. 

※ RF Gain은 환경에 따라, 40 정도가 적절할 수 도 있습니다.(전파혼선이 많은 환경에서는,)

 

 

 

2. WX GUI FFT Sink

주파수 영역의 그래프를 보기위한 비주얼 화면 출력입니다. Fast Fourier Transform 빠른 푸리에 변환을 수행하는 출력모듈입니다.

여기서는 Sample Rate로 변수인 samp_rate와 Baseband Freq를  슬라이드 바 변수값인 channel_freq로 설정합니다.

그리고 화면 출력을 한 화면에 2개의 탭으로 출력하기 위해서, Notebook에 Notebook_0, 0 로 입력합니다. 첫번째 탭에 출력이 될 것입니다.

 

 

3. Low Pass Filter

HackRF에 들어오는 전파 신호중에서 특정 영역(원하는 FM 라디오 주파수 대역)만을 추출하기 위해서 필요합니다.

Decimation 값은 int(samp_rate/500e3) 로 설정하여, 샘플링 주기로 추출되는 데이터신호 중에서 일부만을 가져옵니다. 이것은 샘플링되는 데이터 량을 줄여주는 역할을 합니다. 비록 일부만 가져오더라도, 뒤에 Rational Resampler로 다시 보완하는 과정이 있기 때문에 문제가 되지 않습니다.

※ 여기서 500e3 즉 500KHz는 통상 채널폭(Channel Width)를 의미합니다.

Sample Rate는 samp_rate로 설정하고, Cutoff Freq는 100k (입력은 100e3 으로), Transition Width는 10k (입력은 10e3으로) 설정합니다.

 

 

4. WBFM Receiver

진짜 FM 신호를 주파수 변환하는 것입니다. 출력은 음성신호로 곧 변환할 수 있습니다. 

FM 라디오 수신을 위해서는 Quadrature Rate는 500k로 해주어야만 합니다.

500e3 으로 입력하는 500k 입력값은 앞의 Low Pass Filter에서 Decimation 값 입력의 일부로 사용한 숫자와 동일해야 합니다.

 

 

5. WX GUI FFT Sink

주파수 영역의 그래프를 보기위한 비주얼 화면 출력입니다. Fast Fourier Transform 빠른 푸리에 변환을 수행하는 출력모듈입니다.

여기서는 Sample Rate로 변수인 samp_rate와 Baseband Freq를  슬라이드 바 변수값인 channel_freq로 설정합니다.

그리고 화면 출력을 한 화면에 2개의 탭으로 출력하기 위해서, Notebook에 Notebook_0, 1 로 입력합니다. 두번째 탭에 출력이 될 것입니다.

두번째 화면에서는 FM 변환이 완료된 주파수 영역을 볼 수 있습니다.

 

 

6. Rational Resampler

FM 변환된 음성신호는 이산신호(디지털 샘플링 신호)이기 때문에, 이 신호를 아날로그로 연결했다가, 다시 디지털 샘플링으로 추출하는 과정을 거칩니다. 

여기서 입력하는 Interpolation 값인 48과  Decimation 값인 500은 임의로 정하는 숫자가 아니라, 앞에 WBFM Receiver의 Quadrature Rate인 500k 가  뒤에 나오는 Audio Sink의 Sample Rate인 48Khz (480000)로 변환되기 위해서 필요한 값이 되어야만 합니다. 

500k 가  48배로 증가했다가, 다시 500 배로 축소되어야만 최종적으로 48k 가 됩니다.

 

 

7. Wav File Sink

FM 라디오에서 출력되는 음성 데이터를 저장하기 위해서, 파일명 File을 지정합니다.

음성데이터의 Sample Rate는 48000으로 설정합니다.

(더 높은 96000, 192000 등으로 증가시킬 수 있습니다. 그러면, 음성 품질은 좋아질 것입니다. 대신 Sample Rate를 변경하면, 앞에서 Rational Resampler에 입력되는 값을 적절히 변경하여야 합니다.)

 

 

8. Multiply Const

소리로 출력되는 FM라디오 음성데이터의 소리 증폭을 위해 Volume 상수를 지정합니다.

 

 

9. WX GUI Slider

소리로 출력되는 FM라디오 음성데이터의 소리 증폭을 위해, 앞의 Multiply Const인 Volume 상수에 대응되는 슬라이드 바를 추가합니다.

ID와 Lable을 모두 volume으로 설정하고, Default Value(기본값)와 Minimum(최소값), Maximum(최대값), 그리고 Num Steps(최소값과 최대값 사이의 총 단계)를 설정합니다.

 

 

10. Audio Sink

실제 컴퓨터의 사운드 카드에 대응하는 소리 출력을 지칭합니다.

Sample Rate는 48KHz 로 설정합니다.

 

 

11. WX GUI Slider

FM 라디오 수신을 위한 주파수 입력 및 슬라이드 바를 지정합니다.

 

 

12. WX GUI Notebook

GRC 파일의 실행시, 화면 출력을 한 화면에 2개의 탭으로 출력하기 위해서 사용하는 화면 설정을 합니다.

Labels에 두 개 화면의 탭 이름을 써줍니다. ['RF Spectrum', 'Demod Sprctrum'] 로 입력하면 됩니다.

 

 

 

 

 

 

 

Posted by 훅크선장
, |

http://lcom.uu.gl/106 에서 참고했습니다.


자동 적용 방법 레지스트리 다운로드 링크: http://citl.tistory.com/21

자동 적용 레지스트리 파일은 8.1 까지만 테스트되었습니다. 10에서는 아직 테스트 안해 봤습니다.


수동 적용 방법


1. 윈도우 (시작) 키 + R 키를 눌러 커맨드 실행 창을 표시합니다.


2. Regedit 를 쳐서 레지스트리 편집기를 실행합니다.


3. 아래 경로로 들어갑니다. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\i8042prt\Parameters]


4. 아래의 키 값들을 수정합니다.

LayerDriver JPN = KBD101.dll → KBD101A.dll 

LayerDriver KOR = KBD103.dll → KBD103A.dll 

OverrideKeyBoardldentifier : PCAT_103KEY → PCAT_103AKEY 

OverrideKeyBoardSubtype : 6 → 3 

OverrideKeyBoardType : 8 


※ 값을 수정할 때, 틀리지 않도록 주의하시기 바랍니다.


5. 시스템을 재시작합니다.(재부팅) 그럼, 한/영 키가 먹습니다.



Posted by 훅크선장
, |