Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
base code forked from https://github.com/rhobot/Hangulpy
νκΈ μλͺ¨ λΆν΄, μ‘°ν©(μ€ν λ§ν), μ‘°μ¬ λΆμ΄κΈ°, μ΄/μ€/μ’ λΆν΄μ‘°ν©, νκΈ/νμ/μλ¬Έ μ¬λΆ μ²΄ν¬ λ±μ μ§μν©λλ€.
pip install hgtk
>>> hgtk.letter.decompose('κ°')
('γ±', 'γ
', 'γ
')
>>> hgtk.letter.compose('γ±', 'γ
', 'γ
')
'κ°'
>>> hgtk.text.decompose('νκ΅μ’
μ΄ λ‘λ‘λ‘! hello world 1234567890 γ
γ
!')
'γ
γ
γ±α΄₯γ±γ
α΄₯γ
γ
γ
α΄₯γ
γ
£α΄₯ γΈγ
γ
α΄₯γΈγ
γ
α΄₯γΈγ
γ
α΄₯! hello world 1234567890 γ
α΄₯γ
α΄₯!'
κΈ°λ³Έ μ‘°ν© μλ£ κΈ°νΈλ α΄₯μ΄κ³ , μλμ κ°μ΄ compose_code μ΅μ μΌλ‘ λ³κ²½ κ°λ₯ν©λλ€.
>>> hgtk.text.decompose('νκ΅μ’
μ΄ λ‘λ‘λ‘! hello world 1234567890 γ
γ
!', compose_code='/')
'γ
γ
γ±/γ±γ
/γ
γ
γ
/γ
γ
£/γΈγ
γ
/γΈγ
γ
/γΈγ
γ
/! hello world 1234567890 γ
/γ
/!'
κΈ°λ³Έ μ‘°ν©κΈ°νΈμ μλ―Έλ κ³°λμ΄ μ
λλ€. π
>>> hgtk.text.compose('γ
γ
γ±α΄₯γ±γ
α΄₯γ
γ
γ
α΄₯γ
γ
£α΄₯ γΈγ
γ
α΄₯γΈγ
γ
α΄₯γΈγ
γ
α΄₯! hello world 1234567890 γ
α΄₯γ
α΄₯!')
'νκ΅μ’
μ΄ λ‘λ‘λ‘! hello world 1234567890 γ
γ
!'
>>> hgtk.checker.is_hangul('νκΈμ
λλ€')
True
>>> hgtk.checker.is_hangul('noνκΈμ
λλ€')
False
>>> hgtk.checker.is_hangul('it is english')
False
>>> hgtk.checker.is_hanja('倧ιζ°ε')
True
>>> hgtk.checker.is_hanja('倧νλ―Όκ΅')
False
>>> hgtk.checker.is_hanja('λνλ―Όκ΅')
False
>>> hgtk.checker.is_latin1('abcdefghijklmnopqrstuvwxyz')
True
>>> hgtk.checker.is_latin1('νκΈlatin1ν')
False
>>> hgtk.checker.has_batchim('ν') # 'ν' has batchim 'γ΄'
True
>>> hgtk.checker.has_batchim('ν')
False
>>> hgtk.josa.attach('νλ', hgtk.josa.EUN_NEUN)
'νλμ'
>>> hgtk.josa.attach('λ°λ€', hgtk.josa.EUN_NEUN)
'λ°λ€λ'
>>> hgtk.josa.attach('νλ', hgtk.josa.I_GA)
'νλμ΄'
>>> hgtk.josa.attach('λ°λ€', hgtk.josa.I_GA)
'λ°λ€κ°'
>>> hgtk.josa.attach('νλ', hgtk.josa.EUL_REUL)
'νλμ'
>>> hgtk.josa.attach('λ°λ€', hgtk.josa.EUL_REUL)
'λ°λ€λ₯Ό'
>>> hgtk.josa.attach('νλ', hgtk.josa.GWA_WA)
'νλκ³Ό'
>>> hgtk.josa.attach('λ°λ€', hgtk.josa.GWA_WA)
'λ°λ€μ'
>>> hgtk.josa.attach('νλ', hgtk.josa.IDA_DA)
'νλμ΄λ€'
>>> hgtk.josa.attach('λ°λ€', hgtk.josa.IDA_DA)
'λ°λ€λ€'
>>> hgtk.josa.attach('νλ', hgtk.josa.EURO_RO)
'νλλ‘'
>>> hgtk.josa.attach('λ°λ€', hgtk.josa.EURO_RO)
'λ°λ€λ‘'
>>> hgtk.josa.attach('νμ', hgtk.josa.EURO_RO)
'νμμΌλ‘'
>>> hgtk.josa.attach('λ°©μ΄', hgtk.josa.RYUL_YUL)
'λ°©μ΄μ¨'
>>> hgtk.josa.attach('곡격', hgtk.josa.RYUL_YUL)
'곡격λ₯ '
>>> hgtk.josa.attach('λ°ν', hgtk.josa.RYUL_YUL)
'λ°νμ¨'
CHO: μ΄μ± 리μ€νΈ
JOONG: μ€μ± 리μ€νΈ
JONG: μ’ μ± λ¦¬μ€νΈ, μ’ μ±μ΄ μλ κ²½μ°λ₯Ό λλΉν΄ 곡백 λ¬Έμκ° μΆκ°λ¨
JAMO: 곡백μ μ μΈν λͺ¨λ μλͺ¨(λΉμ‘°ν©λ¬Έμ)
NUM_CHO: μ΄μ± κ°μ
NUM_JOONG: μ€μ± κ°μ
NUM_JONG: μ’ μ± κ°μ
FIRST_HANGUL_UNICODE: μ λμ½λ μμ νκΈ μ½λ(μ‘°ν©λ¬Έμ) μμ μμ
LAST_HANGUL_UNICODE: μ λμ½λ μμ νκΈ μ½λ(μ‘°ν©λ¬Έμ) μ’ λ£ μμ
μμΈ μ²λ¦¬λ₯Ό μν Exceptionλ€, μλ―Έλ 보μ΄λ λλ‘..
##Tested in
python 2.6
python 2.7
python 3.3
python 3.4
python 3.5
python 3.6
python nightly build
PyPy 2.2.5.
Pypy 3 2.4.
PyPy 5.3.1
Apache 2.0 License
FAQs
Toolkit for Hangul composing, decomposing and etc...
We found that hgtk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.