Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clientbot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aleajactaest
clientbot
Commits
7501c7fc
Commit
7501c7fc
authored
Nov 28, 2020
by
aleajactaest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update databasexml conversion
parent
1886443d
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
184 additions
and
34 deletions
+184
-34
README.md
README.md
+41
-1
tools/CGenericMultiPartTemp.py
tools/CGenericMultiPartTemp.py
+1
-1
tools/DecodeDatabase.py
tools/DecodeDatabase.py
+141
-31
tools/Impulse.py
tools/Impulse.py
+1
-1
No files found.
README.md
View file @
7501c7fc
# clientbot
Emulate Client (Python Script)
\ No newline at end of file
Emulate Client (Python Script)
# spykhanat.py
Convert pcap (capture network) on yaml file to see communication between server and client.
## Usage
### Launch network capture
sudo tcpdump -i [networkd card] -w [Pcap output]
ex.: sudo tcpdump -i eth0 -w capture-2020-11-28-17-37-57.pcap
### Extract information
python3 spykhanat.py -m [localization msg.xml] --yaml [Yaml Output file] -w [localisation database.xml] -p [Pcap input] --filter-host-service='[Ip address: Port server khaganat]'
Ex.: python3 spykhanat.py -m ~/khanat/khanat-opennel-code/code/ryzom/common/data_common/msg.xml --yaml capture-2020-11-28-17-37-57.yml -w ~/khanat/khanat-opennel-code/code/ryzom/common/data_common/database.xml -p capture-2020-11-28-17-37-57.pcap --filter-host-service='127.0.0.1:47851'
### Analyze result
you can see the result in yaml output
Field:
*
packet : raw data
*
block_Client : data sent by client
*
block_Server : data sent by server
*
state : message docoded or partially decoded)
*
impulse : impulse message
*
impulseserver : message impulse server decoded
*
Message : Message analyzed (one line by block)
Detail message format (ex.:
<
0
:31
>
(Sint32) CurrentSendNumber => 42 : 00000000000000000000000000101010)
<Position
data
>
(Type) [Function] => Value : [Value in binary] [(optional) value real]
*
position data : Begin:End
*
Format data (Signed/Unsigned Integer, String, Number of bit)
*
Function (type of value, function in khaganat)
*
Value : value in integer
*
Value in binary
*
Value convert for khaganat (sometimes is keyword)
tools/CGenericMultiPartTemp.py
View file @
7501c7fc
...
...
@@ -66,7 +66,7 @@ class CGenericMultiPartTemp():
ret
=
decodeImpulse
.
execute
(
bms
,
world
)
except
:
logging
.
getLogger
(
LOGGER
).
error
(
"CGenericMultiPartTemp : Error to decode - Number:%d len:%d/%d msg:%s"
%
(
Number
,
len
(
self
.
block
),
self
.
NbBlock
,
bms
.
showAllData
()))
#return ret
#
#return ret
raise
ValueError
logging
.
getLogger
(
LOGGER
).
debug
(
"CGenericMultiPartTemp : data : %s"
%
bms
.
showAllData
())
self
.
MsgDecoded
=
bms
...
...
tools/DecodeDatabase.py
View file @
7501c7fc
This diff is collapsed.
Click to expand it.
tools/Impulse.py
View file @
7501c7fc
...
...
@@ -670,7 +670,7 @@ class impulseDatabaseInitPlayer(ImpulseBase):
if
msgin
.
needRead
()
>
5
:
logging
.
getLogger
(
LOGGER
).
debug
(
msgin
.
showAllData
())
logging
.
getLogger
(
LOGGER
).
debug
(
msgin
.
showAllData
())
raise
"TODO"
#
raise "TODO"
class
ImpulseConnectionDeleteChar
(
ImpulseBase
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment