This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. . . | |
Reading package lists... Done | |
W: GPG error: http://ftp.daum.net trusty-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 | |
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5 | |
. . . | |
Reading package lists... Done | |
W: There is no public key available for the following key IDs: | |
3B4FE6ACC0B21F32 | |
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install language-pack-ko | |
$ sudo apt-get install language-pack-ko-base | |
$ sudo apt-get install localepurge | |
In the progress of installing of `localepurge`, setting script will be excuted. Then you must check `ko_KR.EUC-KR`. | |
If the script will not be excuted, type command `sudo dpkg-reconfigure localeconf`. Then you can do it. | |
After check it and push `Enter` button, window will be moved to option settings window. Then just push `Enter`. | |
Next, | |
$ sudo echo "ko_KR.EUC-KR EUC-KR" >> /var/lib/locales/supported.d/ko | |
$ sudo locale-gen --purge | |
$ sudo dpkg-reconfigure locales |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
from functools import wraps | |
from flask import abort, request | |
def is_json_request(): | |
""" | |
Returns True if the request is json request else False. | |
For example:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# alarm() doesn't work in nsjail. So you need to add -t option | |
nsjail -d --log /var/log/nsjail/contact -Ml --port 10001 -u 65534:10001 -g 65534:10001 \ | |
--disable_clone_newnet -R /opt/challenges/contact -E PATH=/usr/local/bin:/usr/bin:/bin \ | |
-E HOME=/opt/challenges/contact -R /bin/ -R /lib/ -R /lib32/ -R /lib64/ -R /usr/ -R /sbin/ \ | |
-T /dev -R /dev/urandom -R /etc/ssl/certs -R /etc/resolv.conf -R /run/resolvconf/ -T /tmp/ \ | |
-t 300 -- /opt/challenges/contact/contact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
class Foo(object): | |
def __init__(self): | |
self.__private_foo = 'private foo' | |
def decorator(self, option): | |
print 'decorator argument:', option | |
print self.__private_foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias pip-upgrade-all="pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U" | |
alias p="python" | |
alias l="ls" |
OpenSCADA is platform which supports high fidelity emulation of IEC 6111-3 compliant PLCs and SCADA protocols. You can check details at OpenSCADA documentation.
- Ubuntu 18.04.3 LTS (x86_64)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Network(Base, IdMixin, TimestampMixin): | |
ip_address = sa.Column(IPAddressType, nullable=False) | |
netmask = sa.Column(IPAddressType, nullable=False) | |
name = sa.Column(sa.String(64), nullable=False, default=lambda: str(uuid.uuid4()), unique=True) | |
class Host(Base, IdMixin, TimestampMixin): | |
name = sa.Column(sa.String(64), nullable=False) | |
addr = sa.Column(sa.String(256), nullable=False) | |
is_compromised = sa.Column(sa.Boolean, nullable=False, default=False) |
OlderNewer