Welcome to Conpot’s documentation!¶
Conpot is an ICS honeypot with the goal to collect intelligence about the motives and methods of adversaries targeting industrial control systems.
Installation¶
Basics instruction on how to install Conpot:
There are two ways of multiple ways of installing conpot. If you are just tinkering around, it is recommended that you use the quick install method. On the other hand, if you are an advanced user, you should do host installation via pip. This is described as quick install.
Quick Installation using Docker¶
Installation on host using Virtualenv¶
A generic way to keep Python installations separate is using virtualenv. This way you can run conpot on your machine without littering your machine. This guides assumes you have Python 3.6 installed and running on your computer.
Note that this is also the recommended way of installing conpot on a machine. Installation can be done as follows:-
Install dependencies:
apt-get install git libsmi2ldbl smistrip libxslt1-dev python3.5-dev libevent-dev default-libmysqlclient-dev
Create the virtualenv
virtualenv --python=python3.5 conpot
Activate the environment
source conpot/bin/activate
Upgrade any basic tools in the environment and deps
pip install --upgrade pip
pip install --upgrade setuptools
pip install cffi
Install the table version of Conpot from PyPI:
pip install conpot
Conpot concepts¶
<todo: add some data here>
Databus¶
ConpotFS¶
ConpotFS designed to have “safe to use” os.* wrappers that could be used by protocols. We cannot allow chmod() like commands that may allow attackers to make arbitrary system calls.
At the same time - protocols such as FTP need chmod() like methods. Same goes for stat() etc. For this reason, we needed a file system that can operate on a layer above the actual file system and still provide the flexibility/robustness.
The Conpot’s file system solves this problem by proxying the actual files kept at a controlled location.
+---------------+ +----------------------+
| | | |
| | <----------------+ | Actual FileSystem |
| Conpot VFS | Proxy | at |
| | +----------------> | '/tmp/__conpot__*/' |
| | | |
+---------------+ +----------------------+
Consequently, we would keep a cache (a dictionary where we would store all file related data - (information regarding access, permissions, owners, stat etc.). Note that no matter what, we won’t change the actual permissions of the file system.
For the sake of demo, consider the following:
This is what a typical ls -la for a user 1337honey looks like:
total 8
drwxrwxr-x 2 1337honey 1337honey 4096 Jul 9 01:20 .
drwxrwxr-x 4 1337honey 1337honey 4096 Jul 9 01:17 ..
-rw-rw-r-- 1 1337honey 1337honey 0 Jul 9 01:20 hacked.png
Notice the permissions and the user/group.
>>> import conpot.core as conpot_core
>>> conpot_core.initialize_vfs('.', data_fs_path='../data_fs')
>>> vfs = conpot_core.get_vfs()
>>> vfs.listdir('.')
['hacked.png']
>>> [print(i) for i in vfs.format_list('', vfs.listdir('.'))]
rwxrwxrwx 1 root root 0 Jul 08 19:53 hacked.png
As you can see, the permissions have changed and so have the user/groups(By default the uid:gid is 0:0 and permissions is 777 - this is configurable). This is not all. Check this out!
>>> vfs.register_user('attacker', 2000)
>>> vfs.create_group('attacker', 3000)
>>> vfs.chown('/', uid=2000, gid=3000, recursive=True)
>>> vfs.chmod('/', 0o755, recursive=True)
>>> [print(i) for i in vfs.format_list('', vfs.listdir('.'))]
rwxr-xr-x 1 attacker attacker 0 Jul 08 19:53 hacked.png
There is no change with the uid:gid:perms of the actual ‘hacked.png’ file though.
Another big advantage of this approach is : VFS is independent of the physical storage media it is located in. We are currently keeping the contents in ‘/tmp’. But in future if we want to replace this with somewhat better storage media(or location), we can simply detach the VFS - replace it with new storage media URL and it’ll fit right in.
Internal Interface¶
Protocols¶
Proxy Mode¶
Templates¶
Developmental guidelines¶
<todo: add some data here>
Development Guidelines¶
Developers Guide¶
Indentation¶
- We are using 4 tab-spaces
- No one line conditionals
Copyright¶
- If you are adding a file/code which is produced only by you, feel free to add the license information and a notice who holds the copyrights.
Environment¶
- PyCharm is recommended.
Recommended git workflow¶
For contributors¶
0, You can do this step when you are on master, or feature_branch, anytime there are new commits in original project.
Just one-time add of remote:
git remote add mushorg https://github.com/mushorg/conpot.git
And rebase:
git fetch mushorg
git rebase mushorg/master feature_branch
This way, your feature_branch or master will be up-to-date.
1, For every feature, create new branch:
git checkout -b feature_branch
2, State what you do in commit message.
When you create pull request and get review, it is recommended to edit your original commits.
3a, If you want to change the last commit:
(make some changes in files)
git add file1 file2
git commit --amend
3b, If you want to change any of your previous commits:
git rebase -i HEAD~3 (can be HEAD~4, depends which commit you want to change, or you can type hash of previous commit)
change “pick” to “e”:
e e88a2f1 commit 1
pick bfd57e4 commit2
and save.
(make some changes in files)
git add file1 file2
git rebase --continue
Warning: Do not use ‘git commit’ in rebase if you don’t know what you are doing.
4, Look at your changes, and git force push to your branch:
git push -f feature_branch
5, Comment in pull request to let us know about your new code.
For maintainers¶
To avoid additional Merge commits, use cherry-pick:
git checkout master
git remote add user https://github.com/user/conpot.git
git fetch user
(look at 'git log user/feature_branch')
git cherry-pick commit_hash
git push origin master
git remote rm user
Comment on pull request that you added it to master, and close pull request.
This approach is usefull for majority of pull requests (1-3 commits).
If you expect conflicts (a lot of commits in feature branch with a lot of changes) you can use GitHub Merge button.
Revert will be easier too.
Conflicts should not happen, if feature branch is rebased on current master.
Usage and Frequently asked questions¶
<todo: add some data here>
Frequently Asked Questions¶
Sharing Data¶
With whom do we share?
Everyone who is interested and potentially shares data, results or helps improving the tool.
What’s the data volume?
Conpot has build-in support for HPFeeds, a generic data sharing protocol we are using in the Honeynet Project. This means that potentially we are going to get all the data from every sensor with HPFeeds enabled.
Right now there is only a very small number of deployed sensors. HPFeeds is not enabled by default and probably nobody is using a HMI to attract adversaries yet. So if you are lucky you will see an event every other day. We know that with a HMI the traffic will be significantly higher as your sensor will be found using search engines.
What is the data format?
Raw data in JSON formatting.
How do I get the data?
There is a Python client which uses the HPFeeds library. About 40 lines of code. From there it’s quite easy to write the data to a database. You can find an explanation on how it works here.
What do I have to do?
If you want to have access to the Conpot data, you have to create a HPFriends account. As soon as you accept the share, you can create an authkey. You can modify the client with the auth keys credentials. The client should be self explaining. You can extend the client so it fits your needs (e.g. logging to a database).
How do I test this?
As soon as you have Conpot set-up it should be easy to create some traffic for testing.
API reference¶
API Reference¶
conpot package¶
Subpackages¶
conpot.core package¶
-
class
conpot.core.filesystem.
AbstractFS
(src_path: str, create_mode: int = 511, temp_dir: Optional[str] = None, identifier: Optional[str] = '__conpot__', auto_clean: Optional[bool] = True, ignore_clean_errors: Optional[bool] = True)¶ Bases:
fs.wrapfs.WrapFS
AbstractFS distinguishes between “real” filesystem paths and “virtual” ftp paths emulating a UNIX chroot jail where the user can not escape its home directory (example: real “/home/user” path will be seen as “/” by the client)
This class exposes common fs wrappers around all os.* calls involving operations against the filesystem like creating files or removing directories (such as listdir etc.)
Implementation Note: When doing I/O - Always with the check_access and set_access context managers for safe operations.
-
access
(path: str, name_or_id: Union[int, str] = None, required_perms: str = None)¶ Returns bool w.r.t the a user/group has permissions to read/write/execute a file. This is a wrapper around os.access. But it would accept name or id instead of of just ids. Also it can accept required permissions in the form of strings rather than os.F_OK, os.R_OK, os.W_OK etc.
Implementation Note: First we would check whether the current user has the required permissions. If not, then we check the group to which this user belongs to. Finally if the user’s group also does not meet the perms we check for other permissions.
-
add_users_to_group
(gid: int, uids: List[T]) → None¶ Add list of users to an existing group :param gid: Group id of the group. :param uids: List of registers users that belong to this group
-
check_access
(path=None, user=None, perms=None)¶ Checks whether the current user has permissions to do a specific operation. Raises FSOperationNotPermitted exception in case permissions are not satisfied. Handy utility to check whether the user with uid provided has permissions specified. Examples:
>>> import conpot.core as conpot_core >>> _vfs, _ = conpot_core.get_vfs('ftp') >>> with _vfs.check_access(path='/', user=13, perms='rwx'): >>> _vfs.listdir('/')
>>> with _vfs.check_access(path='/', user=45, perms='w'): >>> with _vfs.open('/test', mode='wb') as _file: >>> _file.write(b'Hello World!')
-
chmod
(path: str, mode: oct, recursive: bool = False) → None¶ Change file/directory mode. :param path: Path to be modified. :param mode: Operating-system mode bitfield. Must be in octal’s form. Eg: chmod with (mode=0o755) = Permissions(user=’rwx’, group=’rx’, other=’rx’) :param recursive: If the path is directory, setting recursive to true would change permissions to sub folders and contained files. :type recursive: bool
-
chown
(fs_path: str, uid: int, gid: int, recursive: Optional[bool] = False) → None¶ Change the owner of a specified file. Wrapper for os.chown :param fs_path: path or directory in the VFS where chown would be executed. :param uid: The uid of the user. **User must be a registered user on the filesystem or an exception would be thrown. :param gid: The gid of the group **Group must be a registered group on the filesystem or an exception would be thrown. :param recursive: If the given path is directory, then setting the recursive option to true would walk down the tree and recursive change permissions in the cache.
** fs_path needs to be the absolute path w.r.t to the vfs. If you are in a sub file system, please use subvfs.getcwd() to get the current directory. **
-
clean
()¶ Clean (delete) temporary files created by this filesystem.
-
copy
(src_path, dst_path, overwrite=False)¶ Copy file contents from
src_path
todst_path
.- Arguments:
src_path (str): Path of source file. dst_path (str): Path to destination file. overwrite (bool): If True, overwrite the destination file
if it exists (defaults to False).- Raises:
- fs.errors.DestinationExists: If
dst_path
exists, - and
overwrite
is False. - fs.errors.ResourceNotFound: If a parent directory of
dst_path
does not exist.
- fs.errors.DestinationExists: If
-
create_group
(name: str, gid: int) → None¶ Store all group related data for the file system. :param name: Name of the group :param gid: gid of the group
-
create_jail
(path)¶ Returns chroot jail sub system for a path
-
format_list
(basedir, listing)¶ Return an iterator object that yields the entries of given directory emulating the “/bin/ls -lA” UNIX command output. This is how output should appear: -rw-rw-rw- 1 owner group 7045120 Sep 02 3:47 music.mp3 drwxrwxrwx 1 owner group 0 Aug 31 18:50 e-books -rw-rw-rw- 1 owner group 380 Sep 02 3:40 module.py
Parameters: - basedir – (str) must be protocol relative path
- listing – (list) list of files to needed for output.
-
get_permissions
(path)¶ Get permissions for a particular user on a particular file/directory in ‘rwxrx—’ format
-
getcwd
()¶
-
getfile
(path, file, chunk_size=None, **options)¶ Copies a file from the filesystem to a file-like object.
This may be more efficient that opening and copying files manually if the filesystem supplies an optimized method.
- Arguments:
path (str): Path to a resource. file (file-like): A file-like object open for writing in
binary mode.- chunk_size (int, optional): Number of bytes to read at a
- time, if a simple copy is used, or None to use sensible default.
- **options: Implementation specific options required to open
- the source file.
Note that the file object
file
will not be closed by this method. Take care to close it after this method completes (ideally with a context manager).- Example:
>>> with open('starwars.mov', 'wb') as write_file: ... my_fs.download('/movies/starwars.mov', write_file)
- Note:
Deprecated since version 2.2.0: Please use ~download
-
getinfo
(path: str, get_actual: bool = False, namespaces=None)¶ Get information about a resource on a filesystem.
- Arguments:
path (str): A path to a resource on the filesystem. namespaces (list, optional): Info namespaces to query
(defaults to [basic]).- Returns:
- ~fs.info.Info: resource information object.
For more information regarding resource information, see info.
-
getmeta
(namespace='standard')¶ Get meta information regarding a filesystem.
- Arguments:
- namespace (str): The meta namespace (defaults
- to
"standard"
).
- Returns:
- dict: the meta information.
Meta information is associated with a namespace which may be specified with the
namespace
parameter. The default namespace,"standard"
, contains common information regarding the filesystem’s capabilities. Some filesystems may provide other namespaces which expose less common or implementation specific information. If a requested namespace is not supported by a filesystem, then an empty dictionary will be returned.The
"standard"
namespace supports the following keys:key Description case_insensitive True if this filesystem is case insensitive. invalid_path_chars A string containing the characters that may not be used on this filesystem. max_path_length Maximum number of characters permitted in a path, or None for no limit. max_sys_path_length Maximum number of characters permitted in a sys path, or None for no limit. network True if this filesystem requires a network. read_only True if this filesystem is read only. supports_rename True if this filesystem supports an os.rename operation. Most builtin filesystems will provide all these keys, and third- party filesystems should do so whenever possible, but a key may not be present if there is no way to know the value.
- Note:
- Meta information is constant for the lifetime of the filesystem, and may be cached.
-
getmtime
(path)¶ Return the last modified time as a number of seconds since the epoch.
-
groups
¶
-
listdir
(path)¶ Get a list of the resource names in a directory.
This method will return a list of the resources in a directory. A resource is a file, directory, or one of the other types defined in ~fs.ResourceType.
- Arguments:
- path (str): A path to a directory on the filesystem
- Returns:
- list: list of names, relative to
path
. - Raises:
- fs.errors.DirectoryExpected: If
path
is not a directory. fs.errors.ResourceNotFound: Ifpath
does not exist.
-
makedir
(path, permissions=None, recreate=True)¶ Make a directory.
- Arguments:
path (str): Path to directory from root. permissions (~fs.permissions.Permissions, optional): a
Permissions instance, or None to use default.- recreate (bool): Set to True to avoid raising an error if
- the directory already exists (defaults to False).
- Returns:
- ~fs.subfs.SubFS: a filesystem whose root is the new directory.
- Raises:
- fs.errors.DirectoryExists: If the path already exists. fs.errors.ResourceNotFound: If the path is not found.
-
mount_fs
(dst_path: str, fs_url: str = None, owner_uid: Optional[int] = 0, group_gid: Optional[int] = 0, perms: Union[fs.permissions.Permissions, int, None] = 493) → fs.subfs.SubFS¶ To be called to mount individual filesystems. :param fs_url: Location/URL for the file system that is to be mounted. :param dst_path: Place in the Conpot’s file system where the files would be placed. This should be relative to FS root. :param owner_uid: The owner user UID of the directory and the sub directory. Default is root/ :param group_gid: The group ‘group` to which the directory beings. Defaults to root. :param perms: Permission UMASK
-
move
(src_path, dst_path, overwrite=False)¶ Move a file from
src_path
todst_path
.- Arguments:
src_path (str): A path on the filesystem to move. dst_path (str): A path on the filesystem where the source
file will be written to.- overwrite (bool): If True, destination path will be
- overwritten if it exists.
- Raises:
- fs.errors.FileExpected: If
src_path
maps to a - directory instead of a file.
- fs.errors.DestinationExists: If
dst_path
exists, - and
overwrite
is False. - fs.errors.ResourceNotFound: If a parent directory of
dst_path
does not exist.
- fs.errors.FileExpected: If
-
norm_path
(path)¶
-
open
(path, mode='r', buffering=-1, encoding=None, newline='', line_buffering=False, **options)¶ Open a file.
- Arguments:
path (str): A path to a file on the filesystem. mode (str): Mode to open the file object with
(defaults to r).- buffering (int): Buffering policy (-1 to use
- default buffering, 0 to disable buffering, 1 to select line buffering, of any positive integer to indicate a buffer size).
- encoding (str): Encoding for text files (defaults to
utf-8
)- errors (str, optional): What to do with unicode decode errors
- (see codecs module for more information).
newline (str): Newline parameter. **options: keyword arguments for any additional information
required by the filesystem (if any).- Returns:
- io.IOBase: a file-like object.
- Raises:
fs.errors.FileExpected: If the path is not a file. fs.errors.FileExists: If the file exists, and exclusive mode
is specified (x
in the mode).fs.errors.ResourceNotFound: If the path does not exist.
-
openbin
(path, mode='r', buffering=-1, **options)¶ Open a file in the ConpotFS in binary mode.
-
opendir
(path, factory=<class 'conpot.core.fs_utils.SubAbstractFS'>)¶ Get a filesystem object for a sub-directory.
- Arguments:
path (str): Path to a directory on the filesystem. factory (callable, optional): A callable that when invoked
with an FS instance andpath
will return a new FS object representing the sub-directory contents. If nofactory
is supplied then ~fs.subfs.SubFS will be used.- Returns:
- ~fs.subfs.SubFS: A filesystem representing a sub-directory.
- Raises:
- fs.errors.DirectoryExpected: If
dst_path
does not - exist or is not a directory.
- fs.errors.DirectoryExpected: If
-
readlink
(path)¶ Perform a readlink() system call. Return a string representing the path to which a symbolic link points. :param path: (str) must be protocol relative path
-
register_user
(name: str, uid: int) → None¶ Store all user related data for the file system.
-
remove
(path)¶ Remove a file from the file system.
-
removedir
(path, rf=True)¶ Remove a directory from the file system. :param path: directory path :param rf: remove directory recursively and forcefully. This removes directory even if there is any data in it. If set to False, an exception would be raised
-
root
¶ The root directory - where the filesystem is stored
-
setbinfile
(path, file)¶ Set a file to the contents of a binary file object.
This method copies bytes from an open binary file to a file on the filesystem. If the destination exists, it will first be truncated.
- Arguments:
path (str): A path on the filesystem. file (io.IOBase): a file object open for reading in
binary mode.- chunk_size (int, optional): Number of bytes to read at a
- time, if a simple copy is used, or None to use sensible default.
- **options: Implementation specific options required to open
- the source file.
Note that the file object
file
will not be closed by this method. Take care to close it after this method completes (ideally with a context manager).- Example:
>>> with open('~/movies/starwars.mov', 'rb') as read_file: ... my_fs.upload('starwars.mov', read_file)
- Note:
Deprecated since version 2.2.0: Please use ~upload
-
setinfo
(path, info)¶ Higher level function to directly change values in the file system. Dictionary specified here changes cache values. :param path: path of the file that is to be changed :param info: Raw Info object. Please check pyfilesystem2’s docs for more info.
-
settimes
(path, accessed=None, modified=None)¶ Set the accessed and modified time on a resource.
- Arguments:
path: A path to a resource on the filesystem. accessed (datetime, optional): The accessed time, or
None (the default) to use the current time.- modified (datetime, optional): The modified time, or
- None (the default) to use the same time as the
accessed
parameter.
-
stat
(path)¶ Perform a stat() system call on the given path. :param path: (str) must be protocol relative path
-
take_snapshot
()¶ Take snapshot of entire filesystem. :rtype: dict
-
user_groups
¶ gid: {set of uid of users.}
-
users
¶
-
Utils related to ConpotVFS
-
exception
conpot.core.fs_utils.
FSOperationNotPermitted
(msg=None)¶ Bases:
fs.errors.FSError
Custom class for filesystem-related exceptions.
-
exception
conpot.core.fs_utils.
FilesystemError
(msg=None)¶ Bases:
fs.errors.FSError
Custom class for filesystem-related exceptions.
-
class
conpot.core.fs_utils.
SubAbstractFS
(parent_fs, path)¶ Bases:
fs.subfs.SubFS
,typing.Generic
Creates a chroot jail sub file system. Each protocol can have an instance of this class. Use AbstractFS’s create_jail method to access this. You won’t be able to cd into an up directory.
-
access
(path: str, name_or_id: Union[int, str] = None, required_perms: str = None)¶
-
check_access
(path=None, user=None, perms=None)¶
-
chmod
(path: str, mode: oct, recursive: bool = False) → None¶
-
chown
(fs_path: str, uid: int, gid: int, recursive: Optional[bool] = False)¶
-
default_gid
¶
-
default_group
¶
-
default_perms
¶
-
default_uid
¶
-
default_user
¶
-
format_list
(basedir, listing)¶
-
get_permissions
(path)¶
-
getcwd
()¶
-
getinfo
(path: str, get_actual: bool = False, namespaces=None)¶ Get information about a resource on a filesystem.
- Arguments:
path (str): A path to a resource on the filesystem. namespaces (list, optional): Info namespaces to query
(defaults to [basic]).- Returns:
- ~fs.info.Info: resource information object.
For more information regarding resource information, see info.
-
getmtime
(path)¶
-
move
(src_path, dst_path, overwrite=True)¶ Move a file from
src_path
todst_path
.- Arguments:
src_path (str): A path on the filesystem to move. dst_path (str): A path on the filesystem where the source
file will be written to.- overwrite (bool): If True, destination path will be
- overwritten if it exists.
- Raises:
- fs.errors.FileExpected: If
src_path
maps to a - directory instead of a file.
- fs.errors.DestinationExists: If
dst_path
exists, - and
overwrite
is False. - fs.errors.ResourceNotFound: If a parent directory of
dst_path
does not exist.
- fs.errors.FileExpected: If
-
readlink
(path)¶
-
remove
(path)¶ Remove a file from the filesystem.
- Arguments:
- path (str): Path of the file to remove.
- Raises:
- fs.errors.FileExpected: If the path is a directory. fs.errors.ResourceNotFound: If the path does not exist.
-
removedir
(path, rf=False)¶ Remove a directory from the filesystem.
- Arguments:
- path (str): Path of the directory to remove.
- Raises:
- fs.errors.DirectoryNotEmpty: If the directory is not empty (
- see ~fs.base.FS.removetree for a way to remove the directory contents.).
- fs.errors.DirectoryExpected: If the path does not refer to
- a directory.
- fs.errors.ResourceNotFound: If no resource exists at the
- given path.
- fs.errors.RemoveRootError: If an attempt is made to remove
- the root directory (i.e.
'/'
)
-
root
¶
-
stat
(path)¶
-
-
conpot.core.fs_utils.
copy_files
(source, dest, buffer_size=1048576)¶ Copy a file from source to dest. source and dest must be file-like objects.
-
class
conpot.core.internal_interface.
DotDict
¶ Bases:
dict
-
class
conpot.core.internal_interface.
Network
¶ Bases:
object
-
class
conpot.core.virtual_fs.
VirtualFS
(data_fs_path=None)¶ Bases:
object
Conpot’s virtual file system. Based on Pyfilesystem2, it would allow us to have arbitrary file uploads while sand boxing them for later analysis. This is how it should look like:
Parameters: data_fs_path – Path for storing data_fs. A dictionary with attribute name _protocol_vfs stores all the fs folders made by all the individual protocols. :type data_fs_path: fs.open_fs
-
add_protocol
(protocol_name: str, data_fs_subdir: str, vfs_dst_path: str, src_path=None, owner_uid=0, group_gid=0, perms=493) -> (<class 'conpot.core.fs_utils.SubAbstractFS'>, <class 'fs.subfs.SubFS'>)¶ Method that would be used by protocols to initialize vfs. May be called by each protocol individually. This creates a chroot jail sub file system env which makes easier handling. It also creates a data_fs sub file system for managing protocol specific uploads. :param protocol_name: name of the protocol for which VFS is being created. :param data_fs_subdir: sub-folder name within data_fs that would be storing the uploads for later analysis :param vfs_dst_path: protocol specific sub-folder path in the fs. :param src_path: Source from where the files are to copied. :param owner_uid: UID of a registered user. This is the default owner in the sub file system :param group_gid: GID of a existing group. :param perms: Default permissions of the sub file system. :return: fs object
Note: The owner_uid and group_gid must be already registered with the fs. Otherwise an exception would be raised.
-
close
(force=False)¶ Close the filesystem properly. Better and more graceful than __del__ :param force: Force close. This would close the AbstractFS instance - without close closing data_fs File Systems
-
initialize_vfs
(fs_path=None, data_fs_path=None, temp_dir=None)¶
-
-
conpot.core.
add_protocol
(protocol_name: str, data_fs_subdir: str, vfs_dst_path: str, src_path=None, owner_uid: Optional[int] = 0, group_gid: Optional[int] = 0, perms: Optional[oct] = 493) → Tuple¶
-
conpot.core.
close_fs
()¶ Close the file system. Remove all the temp files.
-
conpot.core.
get_databus
()¶
-
conpot.core.
get_interface
()¶
-
conpot.core.
get_session
(*args, **kwargs)¶
-
conpot.core.
get_sessionManager
()¶
-
conpot.core.
get_vfs
(protocol_name: Optional[str] = None) → Union[conpot.core.filesystem.AbstractFS, Tuple]¶ Get the File System. :param protocol_name: Name of the protocol to be fetched
-
conpot.core.
initialize_vfs
(fs_path=None, data_fs_path=None, temp_dir=None)¶
conpot.emulators package¶
conpot.protocols package¶
-
class
conpot.protocols.IEC104.DeviceDataController.
DeviceDataController
(template)¶ Bases:
object
-
check_registers
()¶
-
get_object_from_reg
(obj_addr)¶
-
get_registers
()¶
-
set_object_val
(obj_addr, val)¶
-
-
conpot.protocols.IEC104.DeviceDataController.
addr_in_hex
(address)¶
-
conpot.protocols.IEC104.DeviceDataController.
hex_in_addr
(hex_addr)¶
-
conpot.protocols.IEC104.DeviceDataController.
inro_response
(sorted_reg, asdu_type)¶
-
class
conpot.protocols.IEC104.IEC104.
IEC104
(device_data_controller, sock, address, session_id)¶ Bases:
object
-
disconnect
()¶
-
static
get_infoobj_list
(frame)¶
-
handle_double_command46
(container)¶
-
handle_i_frame
(frame)¶
-
handle_inro_command100
(container)¶
-
handle_s_frame
(frame)¶
-
handle_setpointfloatpoint_command50
(container)¶
-
handle_setpointscaled_command49
(container)¶
-
handle_single_command45
(container)¶
-
handle_u_frame
(frame)¶
-
increment_sendseq
()¶
-
recvseq_increment
()¶
-
restart_t1
()¶
-
send_104frame
(frame)¶
-
send_frame_imm
(frame)¶
-
show_send_list
()¶
-
-
exception
conpot.protocols.IEC104.errors.
FrameError
(*args)¶ Bases:
Exception
This error is raised if the IEC104 frame is wrong or ain’t a IEC104 packet at all
-
exception
conpot.protocols.IEC104.errors.
InvalidFieldValueException
(*args)¶ Bases:
ValueError
This error is raised if a field value is not allowed
-
exception
conpot.protocols.IEC104.errors.
Timeout_t1
¶ Bases:
BaseException
Base class for exceptions in this module.
-
exception
conpot.protocols.IEC104.errors.
Timeout_t1_2nd
¶ Bases:
BaseException
Base class for exceptions in this module.
-
exception
conpot.protocols.IEC104.errors.
Timeout_t3
¶ Bases:
BaseException
Base class for exceptions in this module.
-
class
conpot.protocols.IEC104.frames.
BCR
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.BCR'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (BCR).Value>, <Field (BCR).IV>, <Field (BCR).CA>, <Field (BCR).CY>, <Field (BCR).SeqNr>]¶
-
payload_guess
= [({}, <class 'scapy.packet.Padding'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
BSI
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.BSI'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (BSI,asdu_infobj_7,asdu_infobj_8,asdu_infobj_51,asdu_infobj_64).BSI>]¶
-
-
class
conpot.protocols.IEC104.frames.
CP16Time
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.CP16Time'>, <class 'scapy.packet.Packet'>]¶
-
extract_padding
(p)¶ DEV: to be overloaded to extract current layer’s padding.
Parameters: s (str) – the current layer Returns: a couple of strings (actual layer, padding)
-
fields_desc
= [<Field (CP16Time,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40).Ms>]¶
-
-
class
conpot.protocols.IEC104.frames.
CP24Time
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.CP24Time'>, <class 'scapy.packet.Packet'>]¶
-
extract_padding
(p)¶ DEV: to be overloaded to extract current layer’s padding.
Parameters: s (str) – the current layer Returns: a couple of strings (actual layer, padding)
-
fields_desc
= [<Field (CP24Time).Ms>, <Field (CP24Time).Min>]¶
-
-
class
conpot.protocols.IEC104.frames.
CP56Time
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.CP56Time'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (CP56Time).Ms>, <Field (CP56Time).Min>, <Field (CP56Time).Hour>, <Field (CP56Time).Day>, <Field (CP56Time).Month>, <Field (CP56Time).Year>]¶
-
-
class
conpot.protocols.IEC104.frames.
DIQ
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.DIQ'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (DIQ).IV>, <Field (DIQ).NT>, <Field (DIQ).SB>, <Field (DIQ).BL>, <Field (DIQ).Padding>, <Field (DIQ).DPI>]¶
-
payload_guess
= [({}, <class 'scapy.packet.Padding'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
FloatField
(name, default)¶ Bases:
scapy.fields.Field
-
class
conpot.protocols.IEC104.frames.
IOA
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.IOA'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>]¶
-
-
class
conpot.protocols.IEC104.frames.
LESignedShortField
(name, default)¶ Bases:
scapy.fields.Field
-
class
conpot.protocols.IEC104.frames.
NVA
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.NVA'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (NVA,asdu_infobj_9,asdu_infobj_10,asdu_infobj_21,asdu_infobj_34,asdu_infobj_48,asdu_infobj_61).NVA>]¶
-
-
class
conpot.protocols.IEC104.frames.
NormValueField
(name, default)¶ Bases:
conpot.protocols.IEC104.frames.LESignedShortField
-
i2repr
(pkt, x)¶ Convert internal value to a nice representation
-
-
class
conpot.protocols.IEC104.frames.
OCI
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.OCI'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (OCI).Padding>, <Field (OCI).CL3>, <Field (OCI).CL2>, <Field (OCI).CL1>, <Field (OCI).GC>]¶
-
-
class
conpot.protocols.IEC104.frames.
QDP
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.QDP'>, <class 'scapy.packet.Packet'>]¶
-
extract_padding
(p)¶ DEV: to be overloaded to extract current layer’s padding.
Parameters: s (str) – the current layer Returns: a couple of strings (actual layer, padding)
-
fields_desc
= [<Field (QDP).IV>, <Field (QDP).NT>, <Field (QDP).SB>, <Field (QDP).BL>, <Field (QDP).EI>, <Field (QDP).Padding>]¶
-
payload_guess
= [({}, <class 'scapy.packet.Padding'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
QDS
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.QDS'>, <class 'scapy.packet.Packet'>]¶
-
extract_padding
(p)¶ DEV: to be overloaded to extract current layer’s padding.
Parameters: s (str) – the current layer Returns: a couple of strings (actual layer, padding)
-
fields_desc
= [<Field (QDS).IV>, <Field (QDS).NT>, <Field (QDS).SB>, <Field (QDS).BL>, <Field (QDS).Padding>, <Field (QDS).OV>]¶
-
payload_guess
= [({}, <class 'scapy.packet.Padding'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
QOS
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.QOS'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (QOS).S/E>, <Field (QOS).QL>]¶
-
payload_guess
= [({}, <class 'scapy.packet.Padding'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
SCD
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.SCD'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (SCD).Status>, <Field (SCD).StatChaDet>]¶
-
-
class
conpot.protocols.IEC104.frames.
SEP
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.SEP'>, <class 'scapy.packet.Packet'>]¶
-
extract_padding
(p)¶ DEV: to be overloaded to extract current layer’s padding.
Parameters: s (str) – the current layer Returns: a couple of strings (actual layer, padding)
-
fields_desc
= [<Field (SEP).IV>, <Field (SEP).NT>, <Field (SEP).SB>, <Field (SEP).BL>, <Field (SEP).EI>, <Field (SEP).Padding>, <Field (SEP).ES>]¶
-
payload_guess
= [({}, <class 'scapy.packet.Padding'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
SIQ
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.SIQ'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (SIQ).IV>, <Field (SIQ).NT>, <Field (SIQ).SB>, <Field (SIQ).BL>, <Field (SIQ).Padding>, <Field (SIQ).SPI>]¶
-
payload_guess
= [({}, <class 'scapy.packet.Padding'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
SPE
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.SPE'>, <class 'scapy.packet.Packet'>]¶
-
extract_padding
(p)¶ DEV: to be overloaded to extract current layer’s padding.
Parameters: s (str) – the current layer Returns: a couple of strings (actual layer, padding)
-
fields_desc
= [<Field (SPE).Padding>, <Field (SPE).SRD>, <Field (SPE).SIE>, <Field (SPE).SL3>, <Field (SPE).SL2>, <Field (SPE).SL2>, <Field (SPE).GS>]¶
-
payload_guess
= [({}, <class 'scapy.packet.Padding'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
SVA
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.SVA'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (SVA,asdu_infobj_11,asdu_infobj_12,asdu_infobj_35,asdu_infobj_49,asdu_infobj_62).SVA>]¶
-
-
class
conpot.protocols.IEC104.frames.
VTI
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.VTI'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (VTI).T>, <Field (VTI).Value>]¶
-
payload_guess
= [({}, <class 'scapy.packet.Padding'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_head
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_head'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (asdu_head).TypeID>, <Field (asdu_head).SQ>, <Field (asdu_head).NoO>, <Field (asdu_head).T>, <Field (asdu_head).PN>, <Field (asdu_head).COT>, <Field (asdu_head).OrigAddr>, <Field (asdu_head).Addr>]¶
-
guess_payload_class
(payload)¶ DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.
Parameters: payload (str) – the layer’s payload Returns: the payload class
-
payload_guess
= [({'TypeID': 1}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_1'>), ({'TypeID': 2}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_2'>), ({'TypeID': 3}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_3'>), ({'TypeID': 4}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_4'>), ({'TypeID': 5}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_5'>), ({'TypeID': 6}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_6'>), ({'TypeID': 7}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_7'>), ({'TypeID': 8}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_8'>), ({'TypeID': 9}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_9'>), ({'TypeID': 10}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_10'>), ({'TypeID': 11}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_11'>), ({'TypeID': 12}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_12'>), ({'TypeID': 13}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_13'>), ({'TypeID': 14}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_14'>), ({'TypeID': 15}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_15'>), ({'TypeID': 16}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_16'>), ({'TypeID': 17}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_17'>), ({'TypeID': 18}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_18'>), ({'TypeID': 19}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_19'>), ({'TypeID': 20}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_20'>), ({'TypeID': 21}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_21'>), ({'TypeID': 30}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_30'>), ({'TypeID': 31}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_31'>), ({'TypeID': 32}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_32'>), ({'TypeID': 33}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_33'>), ({'TypeID': 34}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_34'>), ({'TypeID': 35}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_35'>), ({'TypeID': 36}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_36'>), ({'TypeID': 37}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_37'>), ({'TypeID': 38}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_38'>), ({'TypeID': 39}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_39'>), ({'TypeID': 40}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_40'>), ({'TypeID': 45}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_45'>), ({'TypeID': 46}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_46'>), ({'TypeID': 47}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_47'>), ({'TypeID': 48}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_48'>), ({'TypeID': 49}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_49'>), ({'TypeID': 50}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_50'>), ({'TypeID': 51}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_51'>), ({'TypeID': 58}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_58'>), ({'TypeID': 59}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_59'>), ({'TypeID': 60}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_60'>), ({'TypeID': 61}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_61'>), ({'TypeID': 62}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_62'>), ({'TypeID': 63}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_63'>), ({'TypeID': 64}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_64'>), ({'TypeID': 100}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_100'>), ({'TypeID': 101}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_101'>), ({'TypeID': 102}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_102'>), ({'TypeID': 103}, <class 'conpot.protocols.IEC104.frames.asdu_infobj_103'>)]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_1
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_1'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_1).SIQ>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_10
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_10'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (NVA,asdu_infobj_9,asdu_infobj_10,asdu_infobj_21,asdu_infobj_34,asdu_infobj_48,asdu_infobj_61).NVA>, <Field (asdu_infobj_10).QDS>, <Field (asdu_infobj_10).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_100
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_100'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (asdu_infobj_100).IOA>, <Field (asdu_infobj_100).QOI>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_101
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_101'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (asdu_infobj_101).IOA>, <Field (asdu_infobj_101).QCC>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_102
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_102'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (asdu_infobj_102).IOA>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_103
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_103'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (asdu_infobj_103).IOA>, <Field (asdu_infobj_103).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_11
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_11'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (SVA,asdu_infobj_11,asdu_infobj_12,asdu_infobj_35,asdu_infobj_49,asdu_infobj_62).SVA>, <Field (asdu_infobj_11).QDS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_12
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_12'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (SVA,asdu_infobj_11,asdu_infobj_12,asdu_infobj_35,asdu_infobj_49,asdu_infobj_62).SVA>, <Field (asdu_infobj_12).QDS>, <Field (asdu_infobj_12).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_13
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_13'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_13).FPNumber>, <Field (asdu_infobj_13).QDS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_14
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_14'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_14).FPNumber>, <Field (asdu_infobj_14).QDS>, <Field (asdu_infobj_14).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_15
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_15'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_15).BCR>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_16
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_16'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_16).BCR>, <Field (asdu_infobj_16).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_17
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_17'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_17).SEP>, <Field (CP16Time,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40).Ms>, <Field (asdu_infobj_17).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_18
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_18'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_18).SPE>, <Field (asdu_infobj_18).QDP>, <Field (CP16Time,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40).Ms>, <Field (asdu_infobj_18).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_19
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_19'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_19).OCI>, <Field (asdu_infobj_19).QDP>, <Field (CP16Time,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40).Ms>, <Field (asdu_infobj_19).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_2
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_2'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_2).SIQ>, <Field (asdu_infobj_2).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_20
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_20'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_20).SCD>, <Field (asdu_infobj_20).QDS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_21
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_21'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (NVA,asdu_infobj_9,asdu_infobj_10,asdu_infobj_21,asdu_infobj_34,asdu_infobj_48,asdu_infobj_61).NVA>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_3
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_3'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_3).DIQ>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_30
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_30'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_30).SIQ>, <Field (asdu_infobj_30).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_31
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_31'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_31).DIQ>, <Field (asdu_infobj_31).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_32
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_32'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_32).VTI>, <Field (asdu_infobj_32).QDS>, <Field (asdu_infobj_32).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_33
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_33'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_33).BSI>, <Field (asdu_infobj_33).QDS>, <Field (asdu_infobj_33).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_34
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_34'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (NVA,asdu_infobj_9,asdu_infobj_10,asdu_infobj_21,asdu_infobj_34,asdu_infobj_48,asdu_infobj_61).NVA>, <Field (asdu_infobj_34).QDS>, <Field (asdu_infobj_34).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_35
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_35'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (SVA,asdu_infobj_11,asdu_infobj_12,asdu_infobj_35,asdu_infobj_49,asdu_infobj_62).SVA>, <Field (asdu_infobj_35).QDS>, <Field (asdu_infobj_35).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_36
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_36'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_36).FPNumber>, <Field (asdu_infobj_36).QDS>, <Field (asdu_infobj_36).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_37
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_37'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_37).BCR>, <Field (asdu_infobj_37).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_38
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_38'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_38).SEP>, <Field (CP16Time,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40).Ms>, <Field (asdu_infobj_38).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_39
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_39'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_39).SPE>, <Field (asdu_infobj_39).QDP>, <Field (CP16Time,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40).Ms>, <Field (asdu_infobj_39).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_4
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_4'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_4).DIQ>, <Field (asdu_infobj_4).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_40
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_40'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_40).OCI>, <Field (asdu_infobj_40).QDP>, <Field (CP16Time,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40).Ms>, <Field (asdu_infobj_40).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_45
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_45'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_45).QOC>, <Field (asdu_infobj_45).Padding>, <Field (asdu_infobj_45).SCS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_46
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_46'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_46).QOC>, <Field (asdu_infobj_46).DCS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_47
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_47'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_47).QOC>, <Field (asdu_infobj_47).RCS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_48
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_48'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (NVA,asdu_infobj_9,asdu_infobj_10,asdu_infobj_21,asdu_infobj_34,asdu_infobj_48,asdu_infobj_61).NVA>, <Field (asdu_infobj_48).QOS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_49
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_49'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (SVA,asdu_infobj_11,asdu_infobj_12,asdu_infobj_35,asdu_infobj_49,asdu_infobj_62).SVA>, <Field (asdu_infobj_49).QOS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_5
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_5'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_5).VTI>, <Field (asdu_infobj_5).QDS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_50
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_50'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_50).FPNumber>, <Field (asdu_infobj_50).QOS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_51
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_51'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (BSI,asdu_infobj_7,asdu_infobj_8,asdu_infobj_51,asdu_infobj_64).BSI>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_58
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_58'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_58).QOC>, <Field (asdu_infobj_58).Padding>, <Field (asdu_infobj_58).SCS>, <Field (asdu_infobj_58).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_59
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_59'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_59).QOC>, <Field (asdu_infobj_59).DCS>, <Field (asdu_infobj_59).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_6
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_6'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_6).VTI>, <Field (asdu_infobj_6).QDS>, <Field (asdu_infobj_6).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_60
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_60'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_60).QOC>, <Field (asdu_infobj_60).RCS>, <Field (asdu_infobj_60).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_61
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_61'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (NVA,asdu_infobj_9,asdu_infobj_10,asdu_infobj_21,asdu_infobj_34,asdu_infobj_48,asdu_infobj_61).NVA>, <Field (asdu_infobj_61).QOS>, <Field (asdu_infobj_61).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_62
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_62'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (SVA,asdu_infobj_11,asdu_infobj_12,asdu_infobj_35,asdu_infobj_49,asdu_infobj_62).SVA>, <Field (asdu_infobj_62).QOS>, <Field (asdu_infobj_62).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_63
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_63'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (asdu_infobj_63).FPNumber>, <Field (asdu_infobj_63).QOS>, <Field (asdu_infobj_63).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_64
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_64'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (BSI,asdu_infobj_7,asdu_infobj_8,asdu_infobj_51,asdu_infobj_64).BSI>, <Field (asdu_infobj_64).QOS>, <Field (asdu_infobj_64).CP56Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_7
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_7'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (BSI,asdu_infobj_7,asdu_infobj_8,asdu_infobj_51,asdu_infobj_64).BSI>, <Field (asdu_infobj_7).QDS>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_8
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_8'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (BSI,asdu_infobj_7,asdu_infobj_8,asdu_infobj_51,asdu_infobj_64).BSI>, <Field (asdu_infobj_8).QDS>, <Field (asdu_infobj_8).CP24Time>]¶
-
-
class
conpot.protocols.IEC104.frames.
asdu_infobj_9
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.asdu_infobj_9'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (IOA,asdu_infobj_1,asdu_infobj_2,asdu_infobj_3,asdu_infobj_4,asdu_infobj_5,asdu_infobj_6,asdu_infobj_7,asdu_infobj_8,asdu_infobj_9,asdu_infobj_10,asdu_infobj_11,asdu_infobj_12,asdu_infobj_13,asdu_infobj_14,asdu_infobj_15,asdu_infobj_16,asdu_infobj_17,asdu_infobj_18,asdu_infobj_19,asdu_infobj_20,asdu_infobj_21,asdu_infobj_30,asdu_infobj_31,asdu_infobj_32,asdu_infobj_33,asdu_infobj_34,asdu_infobj_35,asdu_infobj_36,asdu_infobj_37,asdu_infobj_38,asdu_infobj_39,asdu_infobj_40,asdu_infobj_45,asdu_infobj_46,asdu_infobj_47,asdu_infobj_48,asdu_infobj_49,asdu_infobj_50,asdu_infobj_51,asdu_infobj_58,asdu_infobj_59,asdu_infobj_60,asdu_infobj_61,asdu_infobj_62,asdu_infobj_63,asdu_infobj_64).IOA>, <Field (NVA,asdu_infobj_9,asdu_infobj_10,asdu_infobj_21,asdu_infobj_34,asdu_infobj_48,asdu_infobj_61).NVA>, <Field (asdu_infobj_9).QDS>]¶
-
-
conpot.protocols.IEC104.frames.
calctime
()¶
-
class
conpot.protocols.IEC104.frames.
i_frame
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.i_frame'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (i_frame).Start>, <Field (i_frame).LenAPDU>, <Field (i_frame).SendSeq>, <Field (i_frame).RecvSeq>]¶
-
payload_guess
= [({}, <class 'conpot.protocols.IEC104.frames.asdu_head'>)]¶
-
post_build
(p, pay)¶ DEV: called right after the current layer is build.
Parameters: - pkt (str) – the current packet (build by self_buil function)
- pay (str) – the packet payload (build by do_build_payload function)
Returns: a string of the packet with the payload
-
-
class
conpot.protocols.IEC104.frames.
s_frame
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.s_frame'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (s_frame).Start>, <Field (s_frame).LenAPDU>, <Field (s_frame).Type>, <Field (s_frame).Default>, <Field (s_frame).RecvSeq>]¶
-
-
class
conpot.protocols.IEC104.frames.
u_frame
(_pkt=b'', post_transform=None, _internal=0, _underlayer=None, **fields)¶ Bases:
scapy.packet.Packet
-
aliastypes
= [<class 'conpot.protocols.IEC104.frames.u_frame'>, <class 'scapy.packet.Packet'>]¶
-
fields_desc
= [<Field (u_frame).Start>, <Field (u_frame).LenAPDU>, <Field (u_frame).Type>, <Field (u_frame).Default>]¶
-
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_1
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_100
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_11
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_12
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_13
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_14
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_2
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_3
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_30
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_31
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_35
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_36
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_4
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_45
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_46
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_47
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_48
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_49
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_50
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_asdu_51
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_command
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_information_with_time
(frame, direction)¶
-
conpot.protocols.IEC104.i_frames_check.
check_information_without_time
(frame, direction)¶
-
class
conpot.protocols.bacnet.bacnet_app.
BACnetApp
(device, datagram_server)¶ Bases:
bacpypes.app.BIPSimpleApplication
BACnet device emulation class. BACnet properties are populated from the template file. Services are defined. Conpot implements a smart sensor and hence - DM-RP-B (execute ReadProperty) - DM-DDB-B (execute Who-Is, initiate I-Am) - DM-DOB-B (execute Who-Has, initiate I-Have) services are supported.
-
add_object
(obj)¶ Add an object to the local collection.
-
add_property
(prop_name, prop_value)¶
-
get_objects_and_properties
(dom)¶ parse the bacnet template for objects and their properties
-
iAm
(*args)¶
-
iHave
(*args)¶
-
indication
(apdu, address, device)¶ logging the received PDU type and Service request
-
readProperty
(request, address, invoke_key, device)¶
-
response
(response_apdu, address)¶
-
whoHas
(request, address, invoke_key, device)¶
-
whoIs
(request, address, invoke_key, device)¶
-
-
class
conpot.protocols.ftp.ftp_base_handler.
FTPHandlerBase
(request, client_address, server)¶ Bases:
socketserver.BaseRequestHandler
Base class for a full duplex connection
-
authentication_ok
(user_pass)¶ Verifies authentication and sets the username of the currently connected client. Returns True or False Checks user names and passwords pairs. Sets the current user and uid.
-
config
= None¶
-
class
false_request
¶ Bases:
object
-
finish
()¶ End this client session
-
ftp_path
(path)¶ Clean and sanitize ftp paths relative fs instance it is hosted in.
-
handle
()¶ Actual FTP service to which the user has connected.
-
handle_cmd_channel
()¶ Read data from the socket and add it to the _command_channel_input_q for processing
-
handle_data_channel
()¶
-
host
= None¶
-
port
= None¶
-
process_ftp_command
()¶
-
push_data
(data)¶ Handy utility to push some data using the data channel
-
recv_file
(_file, _file_pos=0, cmd='STOR')¶ Receive a file - to be used with STOR, REST and APPE. A copy would be made on the _data_fs. :param _file: File Name to the file that would be written to fs. :param _file_pos: Seek file to position before receiving. :param cmd: Command used for receiving file.
-
respond
(response)¶ Send processed command/data as reply to the client
-
send_file
(file_name)¶ Handy utility to send a file using the data channel
-
setup
()¶ Connect incoming connection to a FTP session
-
start_data_channel
(send_recv='send')¶ Starts the data channel. To be called from the command process greenlet. :param send_recv: Whether the event is a send event or recv event. When set to ‘send’ data channel’s socket writes data in the output queues else when set to ‘read’ data channel’s socket reads data into the input queue. :type send_recv: str
-
stop_data_channel
(abort=False, purge=False, reason=None)¶
-
classmethod
stream_server_handle
(sock, address)¶ Translate this class for use in a StreamServer
-
-
class
conpot.protocols.ftp.ftp_handler.
FTPCommandChannel
(request, client_address, server)¶ Bases:
conpot.protocols.ftp.ftp_base_handler.FTPHandlerBase
FTP Command Responder. Implementation of RFC 959.
-
do_ABOR
(arg)¶ Aborts a file transfer currently in progress.
-
do_ALLO
(arg)¶ Allocate bytes for storage (noop).
-
do_APPE
(file)¶ Append data to an existing file on the server. On success return the file path, else None.
-
do_BYE
(arg)¶
-
do_CDUP
(arg)¶ Change into the parent directory. On success return the new directory, else None.
-
do_CWD
(path)¶ Change the current working directory.
-
do_DELE
(path)¶ Delete the specified file.
-
do_HELP
(arg)¶ Return help text to the client.
-
do_LIST
(path)¶
-
do_MDTM
(path)¶ Return last modification time of file to the client as an ISO 3307 style timestamp (YYYYMMDDHHMMSS) as defined in RFC-3659. On success return the file path, else None.
-
do_MKD
(path)¶ Create the specified directory. On success return the directory path, else None.
-
do_MODE
(line)¶ Set data transfer mode (“S” is the only one supported (noop)).
-
do_NLST
(path)¶ Return a list of files in the specified directory in a compact form to the client.
-
do_NOOP
(arg)¶ Do nothing. No params required. No auth required and no permissions required.
-
do_PASS
(arg)¶
-
do_PASV
(arg)¶ Starts a Passive Data Channel using IPv4. We don’t actually need to start the full duplex connection here. Just need to figure the host ip and the port. The DTP connection would start in each command.
-
do_PORT
(arg)¶ Starts an active data channel by using IPv4. We don’t actually need to start the full duplex connection here. Just need to figure the host ip and the port. The DTP connection would start in each command.
-
do_PWD
(arg)¶ Return the name of the current working directory to the client.
-
do_QUIT
(arg)¶
-
do_REIN
(arg)¶ Reinitialize user’s current session.
-
do_REST
(line)¶ Restart a file transfer from a previous mark.
-
do_RETR
(arg)¶ Fetch and send a file. :param arg: Filename that is to be retrieved
-
do_RMD
(path)¶ Remove the specified directory. On success return the directory path, else None.
-
do_RNFR
(path)¶ Rename the specified (only the source name is specified here, see RNTO command)
-
do_RNTO
(dst_path)¶ Rename file (destination name only, source is specified with RNFR).
-
do_SITE_CHMOD
(path, mode)¶ Change file mode. On success return a (file_path, mode) tuple.
-
do_SITE_HELP
(line)¶ Return help text to the client for a given SITE command.
-
do_SIZE
(path)¶ Return size of file in a format suitable for using with RESTart as defined in RFC-3659.
-
do_STAT
(path)¶ If invoked without parameters, returns general status information about the FTP server process. If a parameter is given, acts like the LIST command, except that data is sent over the command channel (no PORT or PASV command is required).
-
do_STOR
(file, mode='w')¶ Store a file (transfer from the client to the server).
-
do_STOU
(line)¶ Store a file on the server with a unique name.
-
do_STRU
(line)¶ Set file structure (“F” is the only one supported (noop)).
-
do_SYST
(arg)¶ Return system type (always returns UNIX type: L8).
-
do_TYPE
(line)¶ Set current type data type to binary/ascii
-
do_USER
(arg)¶ USER FTP command. If the user is already logged in, return 530 else 331 for the PASS command :param arg: username specified by the client/attacker
-
do_XCUP
(arg)¶ Change into the parent directory. On success return the new directory, else None.
-
do_XCWD
(path)¶ Change the current working directory.
-
do_XMKD
(path)¶ Create the specified directory. On success return the directory path, else None.
-
do_XPWD
(arg)¶ Return the name of the current working directory to the client.
-
do_XRMD
(path)¶ Remove the specified directory. On success return the directory path, else None.
-
process_ftp_command
()¶ Handle an incoming handle request - pick and item from the input_q, reads the contents of the message and dispatch contents to the appropriate do_* method. :param: (bytes) line - incoming request :return: (bytes) response - reply in respect to the request
-
-
exception
conpot.protocols.ftp.ftp_utils.
FTPException
¶ Bases:
Exception
General FTP related exceptions.
-
exception
conpot.protocols.ftp.ftp_utils.
FTPMaxLoginAttemptsExceeded
¶
-
exception
conpot.protocols.ftp.ftp_utils.
FTPPrivilegeException
¶
-
conpot.protocols.ftp.ftp_utils.
get_data_from_iter
(iterator)¶ This utility function generates data from iterators and returns them as string
Service support based on gaspot.py [https://github.com/sjhilt/GasPot] Original authors: Kyle Wilhoit and Stephen Hilt
-
class
conpot.protocols.http.command_responder.
CommandResponder
(host, port, template, docpath)¶ Bases:
object
-
serve_forever
()¶
-
stop
()¶
-
-
class
conpot.protocols.http.command_responder.
HTTPServer
(request, client_address, server)¶ Bases:
http.server.BaseHTTPRequestHandler
-
do_GET
()¶ Handle GET requests
-
do_HEAD
()¶ Handle HEAD requests.
-
do_OPTIONS
()¶ Handle OPTIONS requests.
-
do_POST
()¶ Handle POST requests
-
do_TRACE
()¶ Handle TRACE requests.
-
get_entity_headers
(rqfilename, headers, configuration)¶
-
get_entity_trailers
(rqfilename, configuration)¶
-
get_status_headers
(status, headers, configuration)¶
-
get_status_trailers
(status, configuration)¶
-
get_trigger_appendix
(rqfilename, rqparams, configuration)¶
-
load_entity
(requeststring, headers, configuration, docpath)¶ Retrieves status, headers and payload for a given entity, that can be stored either local or on a remote system
-
load_status
(status, requeststring, requestheaders, headers, configuration, docpath, method='GET', body=None)¶ Retrieves headers and payload for a given status code. Certain status codes can be configured to forward the request to a remote system. If not available, generate a minimal response
-
log
(version, request_type, addr, request, response=None)¶
-
send_chunked
(chunks, payload, trailers)¶ Send payload via chunked transfer encoding to the client, followed by eventual trailers.
-
send_error
(code, message=None)¶ Send and log an error reply. This method is overloaded to make use of load_status() to allow handling of “Unsupported Method” errors.
-
send_response
(code, message=None)¶ Send the response header and log the response code. This function is overloaded to change the behaviour when loggers and sending default headers.
-
substitute_template_fields
(payload)¶
-
-
class
conpot.protocols.http.command_responder.
SubHTTPServer
(server_address, RequestHandlerClass, template, docpath)¶ Bases:
conpot.protocols.http.command_responder.ThreadedHTTPServer
this class is necessary to allow passing custom request handler into the RequestHandlerClass
-
config_sanitize_tarpit
(value)¶
-
daemon_threads
= True¶
-
do_tarpit
(delay)¶
-
-
class
conpot.protocols.http.command_responder.
TemplateParser
(data)¶ Bases:
html.parser.HTMLParser
-
handle_startendtag
(tag, attrs)¶ handles template tags provided in XHTML notation.
Expected format: <condata source=”(engine)” key=”(descriptor)” /> Example: <condata source=”databus” key=”SystemDescription” />
at the moment, the parser is space- and case-sensitive(!), this could be improved by using REGEX for replacing the template tags with actual values.
-
-
class
conpot.protocols.http.command_responder.
ThreadedHTTPServer
(server_address, RequestHandlerClass, bind_and_activate=True)¶ Bases:
socketserver.ThreadingMixIn
,http.server.HTTPServer
Handle requests in a separate thread.
-
class
conpot.protocols.ipmi.fakesession.
FakeSession
(bmc, userid, password, port)¶ Bases:
pyghmi.ipmi.private.session.Session
-
send_data
(packet, address)¶
-
send_ipmi_response
(data=None, code=0)¶
-
send_payload
(payload=(), payload_type=None, retry=True, delay_xmit=None, needskeepalive=False)¶ Send payload over the IPMI Session
Parameters: - needskeepalive – If the payload is expected not to count as ‘active’ by the BMC, set this to True to avoid Session considering the job done because of this payload. Notably, 0-length SOL packets are prone to confusion.
- timeout – Specify a custom timeout for long-running request
-
-
class
conpot.protocols.ipmi.ipmi_server.
IpmiServer
(template, template_directory, args)¶ Bases:
object
-
close_server_session
()¶
-
handle
(data, address)¶
-
handle_client_request
(request)¶
-
initiate_session
(data, address, session)¶
-
send_auth_cap
(myaddr, mylun, clientaddr, clientlun, sockaddr)¶
-
start
(host, port)¶
-
stop
()¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
AccessControlCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= '\r\n{access_control_status} \r\n [1] {access_control_1}\r\n [2] {access_control_2}\r\n [3] {access_control_3}\r\n [4] {access_control_4}\r\n [5] {access_control_5}\r\n'¶
-
HELP_MESSAGE
= "!AC: Access control.\r\n Used for simple IP address firewall filtering.\r\n If enabled only the listed IP's can assess this module.\r\n Format: !AC [En/Dis [ID IP]]\r\n Example: !AC\r\n Lists the setup.\r\n Example: !AC 0\r\n Disables the filter allowing everybody to access.\r\n Example: !AC 0 1 192.168.1.211\r\n !AC 0 2 10.0.0.1\r\n !AC 0 3 195.215.168.45\r\n !AC 1\r\n Only connections from 192.168.1.211, \r\n 10.0.0.1 or 195.215.168.45 are possible.\r\n"¶
-
run
(params=None)¶
-
set_access_ip
(number, ip_string)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
AlarmServerCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= '\r\nAlarm server: {alarm_server_output} '¶
-
HELP_MESSAGE
= '!AS: Alarm Server.\r\n Used to set IP and port of server to handle alarm notifications.\r\n Format: !AS [SrvIP [SrvPort]]\r\n Example: !AS 195.215.168.45 \r\n Alarms are sent to 195.215.168.45.\r\n Example: !AS 195.215.168.45 4000\r\n Alarms are sent to to port 4000 on 195.215.168.45.\r\n Example: !AS 0.0.0.0\r\n Alarm reporting is disabled.\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
BaseCommand
¶ Bases:
object
-
CMD_OUTPUT
= ''¶
-
HELP_MESSAGE
= ''¶
-
INVALID_PARAMETER
= "\r\n? Invalid parameter.\r\nTry 'H cmd' for specific help.\r\n Ie: H !SC\r\n"¶
-
help
()¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
GetConfigCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= 'Device Name : {device_name}\r\nUse DHCP : {use_dhcp}\r\nIP addr. : {ip_addr}\r\nIP Subnet : {ip_subnet}\r\nGateway addr. : {ip_gateway}\r\nService server addr.: {service_server_ip}\r\nService server hostname.: {service_server_host}\r\nDNS Server No. 1: {nameserver_1}\r\nDNS Server No. 2: {nameserver_2}\r\nDNS Server No. 3: {nameserver_3}\r\nMAC addr. (HEX) : {mac_address}\r\nChannel A device meterno.: {channel_a_meternumber}\r\nChannel B device meterno.: {channel_b_meternumber}\r\nKeep alive timer (flash setting): ENABLED 10\r\nKeep alive timer (current setting): ENABLED 10\r\nHas the module received acknowledge from the server: {kap_ack_server}\r\nKAP Server port: {kap_a_server_port}\r\nKAP Local port: {kap_local_port}\r\nSoftware watchdog: ENABLED 3600\r\n'¶
-
HELP_MESSAGE
= '!GC: Get Config.\r\n Returns the module configuration.\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
HelpCommand
(commands)¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= '==============================================================================\r\nService Menu\r\n==============================================================================\r\nH: Help [cmd].\r\nQ: Close connection.\r\n!AC: Access control.\r\n!AS: Alarm Server.\r\n!GC: Get Config.\r\n!GV: Software version.\r\n!SA: Set KAP Server IP and port (*1).\r\n!SB: Set 2nd KAP Server IP and port.\r\n!SC: Set Config (*1).\r\n!SD: Set device name (*1).\r\n!SH: Set KAP Server lookup (DNS or DHCP)\r\n!SI: Set IP (enter either valid IP or 0 to force DHCP)(*1).\r\n!SK: Set KAP watchdog timeout(WDT).\r\n!SN: Set IP for DNS Name servers to use.\r\n!SP: Set IP Ports\r\n!SS: Set Serial Settings.\r\n!RC: Request connect\r\n!RR: Request restart (*1).\r\n!WM: Wink module.\r\n==============================================================================\r\n(*1) Forces system restart\r\n==============================================================================\r\nKamstrup (R)\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
RequestConnectCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
HELP_MESSAGE
= '!RC: Request connect\r\n Makes the module crate a ChA or ChB socket to a remote server.\r\n Format: !RC Action [IP [Port]]\r\n Example: !RC A 195.215.168.45 200\r\n Example: !RC B 195.215.168.45 201\r\n Example: !RC D\r\n Disconnects both A and B if open.\r\n Example: !RC\r\n Status only.\r\n'¶
-
run
(params)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
RequestRestartCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
HELP_MESSAGE
= '!RR: Request restart (*1).\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetConfigCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= '\r\nService server hostname.: {}\r\n'¶
-
HELP_MESSAGE
= '!SC: Set Config (*1).\r\n Configures the module.\r\n Format: !SC DHCP IP SUB GW DNS1 DNS2 DNS3 SRV_IP DEVICENAME SRV_DNS\r\n DHCP 1 for DHCP, 0 for static IP.\r\n IP.. Static IP settings.\r\n SRV_IP IP of remote server (Only if SRV_DNS is 0).\r\n DEVICENAME User label for for individual naming.\r\n SRV_DNS DNS name of remote server (0 to disable DNS lookup)\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetDeviceNameCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
HELP_MESSAGE
= '!SD: Set device name (*1).\r\n Option for individual naming of the module (0-20 chars).\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetIPCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= '\r\nUse DHCP : {use_dhcp}\r\n\r\nIP addr. : {ip_addr}\r\n'¶
-
HELP_MESSAGE
= "!SI: Set IP (enter either valid IP or 0 to force DHCP)(*1).\r\n Used for changing the module IP.\r\n (Use !SC if you need to change subnet/Gateway too).\r\n Entering a '0' will enable DHCP.\r\n Format: !SI IP\r\n Example: !SI 0\r\n The module will reboot and acuire the IP settings using DHCP.\r\n Example: !SI 192168001200\r\n The module will reboot using static IP addr 192.168.1.200.\r\n (SUB, GW and DNS unchanged)\r\n Example: !SI 192.168.1.200\r\n Same as !SI 192168001200.\r\n"¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetKap1Command
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= '\r\nService server addr.: {kap_a_output}\r\n'¶
-
HELP_MESSAGE
= '!SA: Set KAP Server IP and port (*1).\r\n Used for setting the IP of the Server to receive KAP-pacakeges.\r\n UDP port on server can be provided optionally.\r\n Format: !SA SrvIP [SrvPort]\r\n Example: !SA 195215168045 \r\n KAP packages are hereafter sent to 195.215.168.45.\r\n Example: !SA 195.215.168.45 \r\n Same result as "!SA 195215168045".\r\n Example: !SA 192168001002 61000\r\n KAP packages are hereafter sent to 192.168.1.2:61000\r\n from module port 8000.\r\n Example: !SA 0.0.0.0 \r\n Disables KAP.\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetKap2Command
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT_DOUBLE
= '\r\n{}\r\nService server addr.: {}:{} (from DNS)\r\nand fallback KAP to: {}:{}\r\n'¶
-
CMD_OUTPUT_SINGLE
= '\r\n{}\r\nService server addr.: {}:{} (from DNS)\r\nNo redundancy.'¶
-
HELP_MESSAGE
= '!SB: Set 2nd KAP Server IP and port.\r\n Used for redundancy with two KAP servers.\r\n When enabled every second KAP is send to the IP defined by !SB.\r\n NB: The KAP interval to each individual server is half of KAPINT\r\n defined by !SK.\r\n NB: !SA must be enabled (not 0.0.0.0) \r\n Format: !SB SrvIP [SrvPort]\r\n Example: !SB 195.215.168.45 \r\n KAP packages are hereafter also sent to 195.215.168.45.\r\n Example: !SB 0.0.0.0 \r\n Disabled.\r\n Example: !SB 192.168.1.2 61000\r\n KAP packages are hereafter sent to 192.168.1.2:61000\r\n from module port 8000.\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetLookupCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
HELP_MESSAGE
= '!SH: Set KAP Server lookup (DNS or DHCP)\r\n Used for setting the DNS name of the Server to receive KAP-pacakeges.\r\n Using the keyword "DHCP_OPTION:xxx" makes the module request the IP using DHCP option xxx.\r\n The settings are first activated when the module is reset (using !RR).\r\n Example: !SH 0 \r\n Lookup Disabled.\r\n The module will send KAP to the IP listed by !SA. \r\n Example: !SH hosting.kamstrup_meter.dk \r\n Use DNS lookup.\r\n The module will send KAP to the IP listed by !SA until it resolves the DNS,\r\n hereafter the KAP will be sent to hosting.kamstrup_meter.dk\r\n Example: !SH DHCP_OPTION:129\r\n Use DHCP Option.\r\n The module will send KAP to the IP provided by DHCP (in this case option 129).\r\n The module uses the IP provided by !SA if the DHCP offer dos not include option xxx data.\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetNameserverCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
HELP_MESSAGE
= '!SN: Set IP for DNS Name servers to use.\r\n Format: !SN DNS1 DNS2 DNS3\r\n Example: !SN 192168001200 192168001201 000000000000\r\n Example: !SN 172.16.0.83 172.16.0.84 0.0.0.0\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetPortsCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= '\r\n{}\r\nKAP on server: {}\r\nChA on module: {}\r\nChB on module: {}\r\nCfg on module: {}\r\n'¶
-
HELP_MESSAGE
= '!SP: Set IP Ports\r\n Format: !SP [KAP CHA CHB CFG]\r\n Example: !SP 333\r\n KAP packages are hereafter sent to port 333 on the server.\r\n Example: !SP 50 1025 1026 50100\r\n KAP packages are sent to port 50.\r\n Direct connections to UART channel A is on port 1025, B on 1026.\r\n Config connection on port 50100.\r\n (default values)\r\n Example: !SP 0 0 80\r\n UART channel B is on port 80 (KAP and ChA is ingored - unchanged).\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetSerialCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
HELP_MESSAGE
= "!SS: Set Serial Settings.\r\n Used for setting the serial interface for channel A or B.\r\n Format: !SS [Channel Baud,DataBits,Parity,StopBits[,Ctrl]]\r\n Example: !SS A Auto\r\n Example: !SS A 9600,8,N,2\r\n Example: !SS B 115200,8,E,1\r\n Example: !SS B 115200,8,E,1,I\r\n Example: !SS B 115200,8,E,1,L\r\n The ctrl flag can be 'C'(check), 'I' (ignore framing errors) or 'L' (Link, ChB only).\r\n Chanel A supports auto mode (Also enables load profile logger in old E-Meters).\r\n"¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SetWatchdogCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= 'Software watchdog: {0}\r\nKAP Missing warning: {1}\r\nKeep alive timer (flash setting): {2}\r\n'¶
-
HELP_MESSAGE
= '!SK: Set KAP watchdog timeout(WDT).\r\n Used for setting KeepAlive watchdog timing.\r\n Format: !SK [WDT] [MISSING] [KAPINT]\r\n Example: !SK\r\n Example: !SK 3600\r\n Example: !SK 3600 60 10\r\n WDT The module reboots after WDT?KAPINT seconds\r\n without an ACK from the server.\r\n 0 = disable WDT.\r\n MISSING After MISSING?KAPINT seconds without an ACK,\r\n the Err LED starts blinking.\r\n (Used for indication of missing link to the server)\r\n KAPINT Interval in seconds for how often KeepAlivePackages\r\n are send to the KAP server.\r\n The WDT and MISSING timeout counts are both reset by an ACK from the server. \r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
SoftwareVersionCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= '\r\nSoftware Version: {software_version}\r\n'¶
-
HELP_MESSAGE
= '!GV: Software version.\r\n Returns the software revision of the module.\r\n'¶
-
run
(params=None)¶
-
-
class
conpot.protocols.kamstrup.management_protocol.commands.
WinkModuleCommand
¶ Bases:
conpot.protocols.kamstrup.management_protocol.commands.BaseCommand
-
CMD_OUTPUT
= '\r\n\r\nOK\r\n'¶
-
HELP_MESSAGE
= '!WM: Wink module.\r\n Causes the WINK LED on the module to blink for physical identification.\r\n'¶
-
-
conpot.protocols.kamstrup.management_protocol.commands.
parse_ip
(ip_string)¶
-
conpot.protocols.kamstrup.management_protocol.commands.
parse_port
(port_string)¶
-
conpot.protocols.kamstrup.management_protocol.commands.
try_parse_uint
(uint_string, min_value=0, max_value=254)¶
-
class
conpot.protocols.kamstrup.meter_protocol.decoder_382.
Decoder382
¶ Bases:
object
-
REGISTERS
= {1: 'Energy in', 2: 'Energy out', 13: 'Energy in hi-res', 14: 'Energy out hi-res', 51: 'Meter number', 1001: 'Meter serialnumber', 1047: 'Time zone', 1054: 'Voltage p1', 1055: 'Voltage p2', 1056: 'Voltage p3', 1076: 'Current p1', 1077: 'Current p2', 1078: 'Current p3', 1080: 'Power p1', 1081: 'Power p2', 1082: 'Power p3', 1126: 'Meter type', 1268: 'M-bus address', 1271: 'KMP address', 6026: 'Firmware revision A', 6031: 'Firmware revision B'}¶
-
decode_in
(data)¶
-
decode_out
(data)¶
-
classmethod
valid_crc
(message)¶
-
-
class
conpot.protocols.kamstrup.meter_protocol.messages.
KamstrupProtocolBase
(communication_address)¶ Bases:
object
-
class
conpot.protocols.kamstrup.meter_protocol.messages.
KamstrupRequestBase
(communication_address, command, message_bytes)¶ Bases:
conpot.protocols.kamstrup.meter_protocol.messages.KamstrupProtocolBase
-
class
conpot.protocols.kamstrup.meter_protocol.messages.
KamstrupRequestGetRegisters
(communication_address, command_byte, message_bytes)¶ Bases:
conpot.protocols.kamstrup.meter_protocol.messages.KamstrupRequestBase
-
command_byte
= 16¶
-
-
class
conpot.protocols.kamstrup.meter_protocol.messages.
KamstrupRequestUnknown
(communication_address, command_byte, message_bytes)¶ Bases:
conpot.protocols.kamstrup.meter_protocol.messages.KamstrupRequestBase
-
class
conpot.protocols.kamstrup.meter_protocol.messages.
KamstrupResponseBase
(communication_address)¶ Bases:
conpot.protocols.kamstrup.meter_protocol.messages.KamstrupProtocolBase
-
classmethod
escape
(message)¶
-
serialize
(message)¶
-
classmethod
-
class
conpot.protocols.kamstrup.meter_protocol.messages.
KamstrupResponseRegister
(communication_address)¶ Bases:
conpot.protocols.kamstrup.meter_protocol.messages.KamstrupResponseBase
-
add_register
(register)¶
-
serialize
(message=None)¶
-
-
class
conpot.protocols.kamstrup.meter_protocol.register.
KamstrupRegister
(name, units, length, unknown, databus_key)¶ Bases:
object
-
class
conpot.protocols.misc.ascii_decoder.
AsciiDecoder
¶ Bases:
conpot.emulators.proxy.ProxyDecoder
-
decode_in
(data)¶ Decode data that goes into the proxied device
-
decode_out
(data)¶ Decode data that goes out from the proxied device to the connected client(attacker).
-
-
class
conpot.protocols.modbus.modbus_block_databus_mediator.
ModbusBlockDatabusMediator
(databus_key, starting_address)¶ Bases:
object
This class represents the values for a range of addresses
-
is_in
(starting_address, size)¶ Returns true if a block with the given address and size would overlap this block
-
-
class
conpot.protocols.modbus.slave.
MBSlave
(slave_id, dom)¶ Bases:
modbus_tk.modbus.Slave
Customized Modbus slave representation extending modbus_tk.modbus.Slave
-
add_block
(block_name, block_type, starting_address, size)¶ Add a new block identified by its name
-
handle_request
(request_pdu, broadcast=False)¶ parse the request pdu, makes the corresponding action and returns the response pdu
-
-
class
conpot.protocols.modbus.slave_db.
SlaveBase
(template)¶ Bases:
modbus_tk.modbus.Databank
Database keeping track of the slaves.
-
add_slave
(slave_id, unsigned=True, memory=None)¶ Add a new slave with the given id
-
handle_request
(query, request, mode)¶ Handles a request. Return value is a tuple where element 0 is the response object and element 1 is a dictionary of items to log.
-
-
class
conpot.protocols.s7comm.cotp.
COTP
(tpdu_type=0, opt_field=0, payload='', trailer='')¶ Bases:
object
-
pack
()¶
-
parse
(packet)¶
-
-
class
conpot.protocols.s7comm.cotp.
COTPConnectionPacket
(dst_ref=0, src_ref=0, opt_field=0, src_tsap=0, dst_tsap=0, tpdu_size=0)¶ Bases:
object
-
dissect
(packet)¶
-
-
class
conpot.protocols.s7comm.cotp.
COTP_ConnectionConfirm
(dst_ref=0, src_ref=0, opt_field=0, src_tsap=0, dst_tsap=0, tpdu_size=0)¶ Bases:
conpot.protocols.s7comm.cotp.COTPConnectionPacket
-
assemble
()¶
-
-
class
conpot.protocols.s7comm.cotp.
COTP_ConnectionRequest
(dst_ref=0, src_ref=0, opt_field=0, src_tsap=0, dst_tsap=0, tpdu_size=0)¶ Bases:
conpot.protocols.s7comm.cotp.COTPConnectionPacket
-
assemble
()¶
-
-
exception
conpot.protocols.s7comm.exceptions.
AssembleException
(protocol, reason, payload='')¶ Bases:
Exception
-
exception
conpot.protocols.s7comm.exceptions.
ParseException
(protocol, reason, payload='')¶ Bases:
Exception
-
class
conpot.protocols.s7comm.s7.
S7
(pdu_type=0, reserved=0, request_id=0, result_info=0, parameters='', data='')¶ Bases:
object
-
handle
(current_client=None)¶
-
pack
()¶
-
parse
(packet)¶
-
plc_stop_signal
(current_client)¶
-
request_diagnostics
()¶
-
request_not_implemented
()¶
-
request_ssl_17
(data_ssl_index)¶
-
request_ssl_28
(data_ssl_index)¶
-
ssl_lists
= {}¶
-
-
conpot.protocols.s7comm.s7_server.
cleanse_byte_string
(packet)¶
-
conpot.protocols.snmp.build_pysnmp_mib_wrapper.
compile_mib
(mib_name, output_dir)¶ Compiles the given mib_name if it is found in the internal MIB file map. If the MIB depends on other MIBs, these will get compiled automatically. :param mib_name: Name of mib to compile (string). :param output_dir: Output directory (string).
-
conpot.protocols.snmp.build_pysnmp_mib_wrapper.
find_mibs
(raw_mibs_dirs, recursive=True)¶ Scans for MIB files and populates an internal MIB->path mapping. :param raw_mibs_dirs: Directories to search for MIB files (list of strings). :param recursive: If True raw_mibs_dirs will be scanned recursively. :return: A list of found MIB names (list of strings).
-
conpot.protocols.snmp.build_pysnmp_mib_wrapper.
generate_dependencies
(data, mib_name)¶ Parses a MIB for dependencies and populates an internal dependency map. :param data: A string representing an entire MIB file (string). :param mib_name: Name of the MIB (string).
-
conpot.protocols.snmp.build_pysnmp_mib_wrapper.
mib2pysnmp
(mib_file, output_dir)¶ The ‘build-pysnmp-mib’ script we previously used is no longer available Latest pysmi has the ability to generate a .py file from .mib automatically
Parameters: - mib_file – path to the .mib file we want to compile
- output_dir – path to the output directory
Returns: True if we successfully compile the .mib to a .py
-
class
conpot.protocols.snmp.command_responder.
CommandResponder
(host, port, mibpaths)¶ Bases:
object
-
addSocketTransport
(snmpEngine, transportDomain, transport)¶ Add transport object to socket dispatcher of snmpEngine
-
has_mib
(mibname)¶
-
register
(mibname, symbolname, instance, value, profile_map_name)¶ Register OID
-
serve_forever
()¶
-
stop
()¶
-
-
class
conpot.protocols.snmp.command_responder.
SNMPDispatcher
¶ Bases:
gevent.server.DatagramServer
-
getTimerResolution
()¶
-
handle
(msg, address)¶
-
registerRecvCbFun
(recvCbFun, recvId=None)¶
-
registerTimerCbFun
(timerCbFun, tickInterval=None)¶
-
registerTransport
(tDomain, transport)¶
-
sendMessage
(outgoingMessage, transportDomain, transportAddress)¶
-
-
class
conpot.protocols.snmp.conpot_cmdrsp.
c_BulkCommandResponder
(snmpEngine, snmpContext, databus_mediator, host, port)¶ Bases:
pysnmp.entity.rfc3413.cmdrsp.BulkCommandResponder
,conpot.protocols.snmp.conpot_cmdrsp.conpot_extension
-
handleMgmtOperation
(snmpEngine, stateReference, contextName, PDU, acInfo)¶
-
-
class
conpot.protocols.snmp.conpot_cmdrsp.
c_GetCommandResponder
(snmpEngine, snmpContext, databus_mediator, host, port)¶ Bases:
pysnmp.entity.rfc3413.cmdrsp.GetCommandResponder
,conpot.protocols.snmp.conpot_cmdrsp.conpot_extension
-
handleMgmtOperation
(snmpEngine, stateReference, contextName, PDU, acInfo)¶
-
-
class
conpot.protocols.snmp.conpot_cmdrsp.
c_NextCommandResponder
(snmpEngine, snmpContext, databus_mediator, host, port)¶ Bases:
pysnmp.entity.rfc3413.cmdrsp.NextCommandResponder
,conpot.protocols.snmp.conpot_cmdrsp.conpot_extension
-
handleMgmtOperation
(snmpEngine, stateReference, contextName, PDU, acInfo)¶
-
-
class
conpot.protocols.snmp.conpot_cmdrsp.
c_SetCommandResponder
(snmpEngine, snmpContext, databus_mediator, host, port)¶ Bases:
pysnmp.entity.rfc3413.cmdrsp.SetCommandResponder
,conpot.protocols.snmp.conpot_cmdrsp.conpot_extension
-
handleMgmtOperation
(snmpEngine, stateReference, contextName, PDU, acInfo)¶
-
-
class
conpot.protocols.tftp.tftp_handler.
TFTPContextServer
(host, port, timeout, root, dyn_file_func=None, upload_open=None)¶ Bases:
tftpy.TftpContexts.TftpContextServer
Simple TFTP server handler wrapper. Use conpot’s filesystem wrappers rather than os.*
-
end
()¶ Finish up the context.
-
file_path
= None¶
-
start
(buffer)¶ Start the state cycle. Note that the server context receives an initial packet in its start method. Also note that the server does not loop on cycle(), as it expects the TftpServer object to manage that.
-
-
class
conpot.protocols.tftp.tftp_handler.
TFTPServerState
(context)¶ Bases:
conpot.protocols.tftp.tftp_handler.TFTPState
The base class for server states.
-
data_fs
= None¶
-
full_path
= None¶
-
handle
(pkt, raddress, rport)¶ An abstract method for handling a packet. It is expected to return a TftpState object, either itself or a new state.
-
serverInitial
(pkt, raddress, rport)¶
-
vfs
= None¶
-
-
class
conpot.protocols.tftp.tftp_handler.
TFTPState
(context)¶ Bases:
tftpy.TftpStates.TftpState
-
handle
(pkt, raddress, rport)¶ An abstract method for handling a packet. It is expected to return a TftpState object, either itself or a new state.
-
-
class
conpot.protocols.tftp.tftp_handler.
TFTPStateServerRecvRRQ
(context)¶ Bases:
conpot.protocols.tftp.tftp_handler.TFTPServerState
-
handle
(pkt, raddress, rport)¶ Handle an initial RRQ packet as a server.
-
-
class
conpot.protocols.tftp.tftp_handler.
TFTPStateServerRecvWRQ
(context)¶ Bases:
conpot.protocols.tftp.tftp_handler.TFTPServerState
This class represents the state of the TFTP server when it has just received a WRQ packet.
-
handle
(pkt, raddress, rport)¶ Handle an initial WRQ packet as a server.
-
make_subdirs
()¶ The purpose of this method is to, if necessary, create all of the subdirectories leading up to the file to the written.
-
-
class
conpot.protocols.tftp.tftp_handler.
TFTPStateServerStart
(context)¶ Bases:
conpot.protocols.tftp.tftp_handler.TFTPState
The start state for the server. This is a transitory state since at this point we don’t know if we’re handling an upload or a download. We will commit to one of them once we interpret the initial packet.
-
handle
(pkt, raddress, rport)¶ Handle a packet we just received.
-
conpot.tests package¶
-
conpot.tests.helpers.s7comm_client.
AddOptions
(parser)¶
-
conpot.tests.helpers.s7comm_client.
BruteTsap
(ip, port, src_tsaps=(256, 512), dst_tsaps=(258, 512, 513))¶
-
class
conpot.tests.helpers.s7comm_client.
COTPConnectionPacket
(dst_ref=0, src_ref=0, dst_tsap=0, src_tsap=0, tpdu_size=0)¶ Bases:
object
COTP Connection Request or Connection Confirm packet (ISO on TCP). RFC 1006
-
pack
()¶ make Connection Request Packet
-
unpack
(packet)¶ parse Connection Confirm Packet (header only)
-
-
class
conpot.tests.helpers.s7comm_client.
COTPDataPacket
(data='')¶ Bases:
object
COTP Data packet (ISO on TCP). RFC 1006
-
pack
()¶
-
unpack
(packet)¶
-
-
conpot.tests.helpers.s7comm_client.
GetIdentity
(ip, port, src_tsap, dst_tsap)¶
-
exception
conpot.tests.helpers.s7comm_client.
S7Error
(code)¶ Bases:
Exception
-
class
conpot.tests.helpers.s7comm_client.
S7Packet
(_type=1, req_id=0, parameters='', data='')¶ Bases:
object
S7 packet
-
pack
()¶
-
unpack
(packet)¶
-
-
exception
conpot.tests.helpers.s7comm_client.
S7ProtocolError
(message, packet='')¶ Bases:
Exception
-
conpot.tests.helpers.s7comm_client.
Scan
(ip, port)¶
-
conpot.tests.helpers.s7comm_client.
Split
(ar, size)¶ split sequence into blocks of given size
-
conpot.tests.helpers.s7comm_client.
StripUnprintable
(msg)¶
-
class
conpot.tests.helpers.s7comm_client.
TPKTPacket
(data='')¶ Bases:
object
TPKT packet. RFC 1006
-
pack
()¶
-
unpack
(packet)¶
-
-
class
conpot.tests.helpers.s7comm_client.
s7
(ip, port, src_tsap=512, dst_tsap=513, timeout=8)¶ Bases:
object
-
Connect
()¶ Establish ISO on TCP connection and negotiate PDU
-
Function
(_type, group, function, data='')¶
-
NegotiatePDU
(pdu=480)¶ Send negotiate pdu request and receive response. Reply no matter
-
ReadSZL
(szl_id)¶
-
Request
(_type, parameters='', data='')¶ Send s7 request and receive response
-
plc_stop_function
()¶
-
-
class
conpot.tests.helpers.snmp_client.
SNMPClient
(host, port)¶ Bases:
object
-
cbFun
(sendRequestHandle, errorIndication, errorStatus, errorIndex, varBindTable, cbCtx)¶
-
get_command
(OID=((1, 3, 6, 1, 2, 1, 1, 1, 0), None), callback=None)¶
-
set_command
(OID, callback=None)¶
-
walk_command
(OID, callback=None)¶
-
-
class
conpot.tests.test_bacnet_server.
TestBACnetServer
(methodName='runTest')¶ Bases:
unittest.case.TestCase
All tests are executed in a similar way. We initiate a service request to the BACnet server and wait for response. Instead of decoding the response, we create an expected response. We encode the expected response and compare the two encoded data.
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_no_response_requests
()¶ When the request has apduType not 0x01, no reply should be returned from Conpot
-
test_readProperty
()¶
-
test_whoHas
()¶
-
test_whoIs
()¶
-
-
class
conpot.tests.test_enip_server.
TestENIPServer
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
attribute_operations
(paths, int_type=None, **kwds)¶
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_list_identity_tcp
()¶
-
test_list_identity_udp
()¶
-
test_list_interfaces_tcp
()¶
-
test_list_interfaces_udp
()¶
-
test_list_services_tcp
()¶
-
test_list_services_udp
()¶
-
test_malformend_request_tcp
()¶
-
test_malformend_request_udp
()¶
-
-
class
conpot.tests.test_ext_ip_util.
TestExtIPUtil
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_ext_util
()¶
-
test_fetch_ext_ip
()¶
-
test_ip_verify
()¶
-
-
class
conpot.tests.test_ftp.
TestFTPServer
(methodName='runTest')¶ Bases:
unittest.case.TestCase
All tests are executed in a similar way. We run a valid/invalid FTP request/command and check for valid response. Testing is done by sending/receiving files in data channel related commands. Implementation Note: There are no explicit tests for active/passive mode. These are covered in list and nlst tests
-
refresh_client
()¶ Disconnect and reconnect a client
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_abor
()¶
-
test_allo
()¶
-
test_appe
()¶
-
test_auth
()¶ Test for user, pass and quit commands.
-
test_cwd
()¶
-
test_dele
()¶
-
test_file_rename
()¶
-
test_help
()¶
-
test_list
()¶
-
test_max_retries
()¶ client should raise an error when max retries are reached.
-
test_mdtm
()¶
-
test_mkd
()¶
-
test_mode
()¶
-
test_nlist
()¶
-
test_noop
()¶
-
test_pwd
()¶
-
test_rein
()¶
-
test_rest
()¶
-
test_retr
()¶ Test retr or downloading a file from the server.
-
test_rmd
()¶
-
test_site
()¶
-
test_site_chmod
()¶
-
test_site_help
()¶
-
test_size
()¶
-
test_stat
()¶
-
test_stor
()¶
-
test_stou
()¶
-
test_stru
()¶
-
test_syst
()¶
-
test_type
()¶
-
-
class
conpot.tests.test_guardian_ast.
TestGuardianAST
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_I20100
()¶
-
test_I20200
()¶
-
test_I20300
()¶
-
test_I20400
()¶
-
test_I20500
()¶
-
test_S60200
()¶
-
test_S60201
()¶
-
test_S60202
()¶
-
test_S60203
()¶
-
test_S60204
()¶
-
test_ast_error
()¶
-
-
class
conpot.tests.test_http_server.
TestHTTPServer
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_do_HEAD
()¶ Objective: Test the web server by sending a HTTP HEAD request. Should be responded back by the valid HTTP headers
-
test_do_OPTIONS
()¶ Objective: Test the web server by sending a valid OPTIONS HTTP request
-
test_do_POST
()¶ Objective: send a POST request to a invalid URI. Should get a 404 response
-
test_do_TRACE
()¶ Objective: Test the web server with a trace request
-
test_http_backend_databus
()¶ Objective: Test if http backend is able to retrieve data from databus
-
test_http_backend_tarpit
()¶ Objective: Test if http tarpit delays responses properly
-
test_http_request_base
()¶ Objective: Test if http service delivers data on request
-
test_http_subselect_trigger
()¶ Objective: Test if http subselect triggers work correctly
-
test_not_implemented_method
()¶ Objective: PUT HTTP method is not implemented in Conpot, should raise 501
-
-
class
conpot.tests.test_iec104_server.
TestIEC104Server
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_startdt
()¶ Objective: Test if answered correctly to STARTDT act
-
test_testfr
()¶ Objective: Test if answered correctly to TESTFR act
-
test_write_for_non_existing
()¶ Objective: Test answer for a command to a device that doesn’t exist (Correct behaviour of the IEC104 protocol is not known exactly. Other case is test for no answer)
-
test_write_no_relation_for_existing
()¶ Objective: Test answer for a correct command to a device that does exist and has no related sensor (Actuator 22_19 (Type 45: Single Command) will be tested, the corresponding(!) sensor is not existent)
-
test_write_relation_for_existing
()¶ Objective: Test answer for a correct command to a device that does exist and has a related sensor (Actuator 22_20 (Type 45: Single Command) will be tested, the corresponding(!) sensor 13_20 (Type 1: Single Point Information) changes the value and the termination confirmation is returned)
-
test_write_wrong_type_for_existing
()¶ Objective: Test answer for a command of wrong type to a device that does exist (Actuator 22_20 (Type 45: Single Command) will be tested, but a wrong command type (Double Commands instead of Single Command) is sent to device)
-
-
class
conpot.tests.test_ipmi_server.
TestIPMI
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_boot_device
()¶ Objective: test boot device get and set
-
test_channel_get_access
()¶
-
test_chassis_status
()¶
-
test_misc
()¶
-
test_power_state
()¶ Objective: test power on/off/reset/cycle/shutdown
-
test_user_list
()¶
-
-
conpot.tests.test_ipmi_server.
run_cmd
(cmd, port)¶
-
class
conpot.tests.test_kamstrup_management_protocol.
TestKamstrupManagementProtocol
(methodName='runTest')¶ Bases:
unittest.case.TestCase
All tests work in similar way. We send a get command check for a valid reply. We send in set command and expect things to change in the databus.
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_access_control_command
()¶
-
test_alarm_server_command
()¶
-
test_get_config_command
()¶
-
test_get_software_version_command
()¶
-
test_help_command
()¶
-
test_request_connect_command
()¶
-
test_set_config_command
()¶
-
test_set_device_name_command
()¶
-
test_set_ip_command
()¶
-
test_set_kap1_command
()¶
-
test_set_kap2_command
()¶
-
test_set_lookup_command
()¶
-
test_set_name_server_command
()¶
-
test_set_ports_command
()¶
-
test_set_serial_command
()¶
-
test_set_watchdog_command
()¶
-
-
conpot.tests.test_kamstrup_management_protocol.
check_command_resp_help_message
(packet_type, help_msg_command, packet_msg_command, kamstrup_management_server)¶
-
class
conpot.tests.test_mac_addr.
TestMacAddrUtil
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_mac
()¶ Objective: Test if the spoofer is able to change MAC address
-
-
class
conpot.tests.test_modbus_server.
TestModbusServer
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_modbus_logging
()¶ Objective: Test if modbus generates log messages as expected. Expected output is a dictionary with the following structure: {‘timestamp’: datetime.datetime(2013, 4, 23, 18, 47, 38, 532960),
‘remote’: (‘127.0.0.1’, 60991), ‘data_type’: ‘modbus’, ‘id’: ‘01bd90d6-76f4-43cb-874f-5c8f254367f5’, ‘data’: {‘function_code’: 1,
‘slave_id’: 1, ‘request’: ‘0100010080’, ‘response’: ‘0110ffffffffffffffffffffffffffffffff’}}
-
test_read_coils
()¶ Objective: Test if we can extract the expected bits from a slave using the modbus protocol.
-
test_read_nonexistent_slave
()¶ Objective: Test if the correct exception is raised when trying to read from nonexistent slave.
-
test_report_slave_id
()¶ Objective: Test conpot for function code 17.
-
test_response_function_43_device_info
()¶
-
test_write_read_coils
()¶ Objective: Test if we can change values using the modbus protocol.
-
-
class
conpot.tests.test_pysnmp_wrapper.
TestPySNMPWrapper
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
test_compile
()¶ Tests that the wrapper can output mib files.
-
test_find
()¶ Tests that the wrapper can find mib files.
-
test_wrapper_output
()¶ Tests that the wrapper generates output that can be consumed by the command responder.
-
test_wrapper_processing
()¶ Tests that the wrapper can process a valid mib file without errors.
-
-
conpot.tests.test_pysnmp_wrapper.
check_content
(pyfile)¶
-
class
conpot.tests.test_s7_server.
TestS7Server
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_s7
()¶ Objective: Test if the S7 server returns the values expected.
-
-
class
conpot.tests.test_snmp_server.
TestSNMPServer
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
mock_callback
(sendRequestHandle, errorIndication, errorStatus, errorIndex, varBindTable, cbCtx)¶
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_snmp_get
()¶ Objective: Test if we can get data via snmp_get
-
test_snmp_set
()¶ Objective: Test if we can set data via snmp_set
-
-
class
conpot.tests.test_taxii.
TestLoggers
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
test_stix_transform
()¶ Objective: Test if our STIX xml can be validated.
-
test_taxii
()¶ Objective: Test if we can transmit data to MITRE’s TAXII test server. Note: This actually also tests the StixTransformer since the event is parsed by the transformer before transmission.
-
-
class
conpot.tests.test_tftp.
TestTFTPServer
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_mkdir_upload
()¶ Testing TFTP upload files - while recursively making directories as per the TFTP path.
-
test_tftp_download
()¶
-
test_tftp_upload
()¶ Testing TFTP upload files.
-
Test core features for Conpot’s virtual file system
-
class
conpot.tests.test_vfs.
TestFileSystem
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests related to Conpot’s virtual file system.
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_access
()¶
-
test_chmod
()¶
-
test_chown
()¶
-
test_copydir
()¶
-
test_copyfile
()¶
-
test_format_list
()¶
-
test_get_cwd
()¶
-
test_get_permissions
()¶
-
test_getmtime
()¶
-
test_jail
()¶ Test for checking chroot jail a subfilesystem
-
test_listdir
()¶
-
test_mkdir
()¶
-
test_mkdirs
()¶
-
test_movedir
()¶
-
test_movefile
()¶
-
test_open_dir
()¶
-
test_open_file
()¶
-
test_openbin_file
()¶
-
test_readlink
()¶
-
test_remove
()¶
-
test_removedir
()¶
-
test_snapshot
()¶
-
test_stat
()¶
-
test_utime
()¶
-
-
class
conpot.tests.test_vfs.
TestSubFileSystem
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests related to Conpot’s virtual sub file system. This would test fs generated folders for each and every protocol.
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_access
()¶
-
test_chmod
()¶
-
test_chown
()¶
-
test_format_list
()¶
-
test_get_cwd
()¶
-
test_get_permissions
()¶
-
test_listdir
()¶
-
test_mkdir
()¶
-
test_mkdirs
()¶
-
test_open_file
()¶
-
test_readlink
()¶
-
test_remove
()¶
-
test_removedir
()¶
-
test_set_time
()¶ Test for changing time in the file system.
-
test_stat
()¶
-
test_utime
()¶
-
conpot.utils package¶
-
conpot.utils.ext_ip.
get_ext_ip
(config=None, urls=None)¶
-
conpot.utils.ext_ip.
get_interface_ip
(destination_ip: str)¶
-
conpot.utils.mac_addr.
change_mac
(iface=None, mac=None, config=None, revert=None)¶
-
conpot.utils.mac_addr.
revert_mac
(iface)¶
Submodules¶
conpot.helpers module¶
Some python3 fixtures - helper methods for handy conversions + fix ssl
-
conpot.helpers.
chr_py3
(x)¶
-
conpot.helpers.
fix_sslwrap
()¶
-
conpot.helpers.
number_to_bytes
(x)¶
-
conpot.helpers.
pack_short_int
(x)¶
-
conpot.helpers.
sanitize_file_name
(name, host, port)¶ Ensure that file_name is legal. Slug the filename and store it onto the server. This would ensure that there are no duplicates as far as writing a file is concerned. Also client addresses are noted so that one can verify which client uploaded the file. :param name: Name of the file :param host: host/client address :param port port/client port :type name: str
-
conpot.helpers.
str_to_bytes
(x)¶
-
conpot.helpers.
unpack_short_int
(x)¶