mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-02-19 21:34:31 +01:00
Add support for fake client IP address (Janne Snabb)
git-svn-id: https://kippo.googlecode.com/svn/trunk@176 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
@@ -13,9 +13,11 @@ private_key = private.key
|
||||
password = 123456
|
||||
;out_addr = 0.0.0.0
|
||||
;sensor_name=myhostname
|
||||
;fake_addr = 192.168.66.254
|
||||
|
||||
;[database_mysql]
|
||||
;host = localhost
|
||||
;database = kippo
|
||||
;username = kippo
|
||||
;password = secret
|
||||
|
||||
|
||||
@@ -160,7 +160,16 @@ class HoneyPotProtocol(recvline.HistoricRecvLine):
|
||||
# You are in a maze of twisty little passages, all alike
|
||||
p = self.terminal.transport.session.conn.transport.transport.getPeer()
|
||||
|
||||
self.clientIP = p.host
|
||||
# real source IP of client
|
||||
self.realClientIP = p.host
|
||||
|
||||
# source IP of client in user visible reports (can be fake or real)
|
||||
cfg = config()
|
||||
if cfg.has_option('honeypot', 'fake_addr'):
|
||||
self.clientIP = cfg.get('honeypot', 'fake_addr')
|
||||
else:
|
||||
self.clientIP = self.realClientIP
|
||||
|
||||
self.logintime = time.time()
|
||||
|
||||
self.keyHandlers.update({
|
||||
|
||||
Reference in New Issue
Block a user