New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kippo Honeypot Detect #174
Conversation
Hi, thanks for your contribution, please add readme file and add a sample usage in it. also fix the config file (check for update should be true). regards. |
@shaddygarg please review @pradeepjairamani's code regarding this PR and confirm if it's ready to merge. |
Sure @Ali-Razmjoo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look at the review comments that I have made and let me know if I got it wrong somewhere!!
@@ -6,6 +6,10 @@ | |||
|
|||
Base = declarative_base() | |||
|
|||
class Update_Log(Base): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pradeepjairamani, please add a docstring for class detailing what is meant to do. And every class in models.py should have a __repr__(self)
function so that its representation is easier to see while debugging, please make one here.
{'HOST': target_to_host(target), 'USERNAME': '', 'PASSWORD': '', 'PORT': '', 'TYPE': 'admin_scan', | ||
'DESCRIPTION': messages(language, "no_open_ports"), 'TIME': now(), 'CATEGORY': "scan", 'SCAN_ID': scan_id, | ||
'SCAN_CMD': scan_cmd}) | ||
'DESCRIPTION': messages(language, "direcroty_file_404").format(target, "default_port"), 'TIME': now(), 'CATEGORY': "scan", 'SCAN_ID': scan_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pradeepjairamani, you have replaced "no_open_ports" with "direcroty_file_404". Is this done intentionally? If so, you have mistyped the spelling for directory as direcroty. Please correct this!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was done intentionally and thanks for letting me know about the spelling mistake
core/update.py
Outdated
except Exception: | ||
save_update_log(language) | ||
logs = (get_update_log(language)) | ||
logs2 = (logs[len(logs)-2].last_update_time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pradeepjairamani, why have you used logs[len(logs)-2]?
Hey @shaddygarg , |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @Ali-Razmjoo I think this can be merged.
core/update.py
Outdated
def _update(__version__, __code_name__, language, socks_proxy): | ||
""" | ||
update the framework | ||
|
||
Args: | ||
Args/: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean Args:
?
__version__: version number | ||
__code_name__: code name | ||
language: language | ||
socks_proxy: socks proxy | ||
|
||
Returns: | ||
Returns: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 spaces?
database/db.py
Outdated
@@ -15,7 +15,7 @@ | |||
from core import compatible | |||
from api.api_core import __structure | |||
from core.config import _database_config | |||
|
|||
from datetime import datetime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from core._time import now
?
import sys | ||
import socket | ||
|
||
def recv_all(s, limit=4196): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may use from lib.payload.scanner.service.engine import recv_all
to prevent duplicated code, I should mention I used duplicate in ics_honeypot
because it's standalone and run from another directory, but since it's a module please use from lib.payload.scanner.service.engine import recv_all
@@ -1,287 +0,0 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you removed the whole file by mistake!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i did but I added it back again.
thanks @pradeepjairamani for your contribution, thanks @shaddygarg for reviewing, PR merged. regards. |
Checklist
Changes proposed in this pull request
Your development environment
Kali
2.0
2.7.3