2018年9月16日 星期日

[Android] Stored your customized data object in Spinner with Kotlin

If you want to make the list of your customized data objects be stored in Spinner. Try this...
Step:
      1. write your own data class
      2. override the toString() method of your data class
      3. add it to mutable list
      4. write on onItemSelected listener
      5. get selected item, and retrieval the object of your data class

2018年7月14日 星期六

Django 2.0.7 deploy to Heroku

I create a Django 2.0.7 app to deploy to Heroku.

https://devcenter.heroku.com/articles/django-app-configuration

settings.py
import django_heroku
....
....
# Activate Django-Heroku
django_heroku.settings(locals())
And when I run it with debug mode in local web app, it's running well.
But it always shows error when I deploy it to Heroku.

"relation "auth_user" does not exist"

2017年6月1日 星期四

install w3af in kali linux (rolling)

for Kali Linux latest version 20170601
Kali Linux has been installed some packages for fill the requirements of w3af.

  • openssl ==> 16.2.0 
  • lxml ==> 3.7.1 
Preparing install:
sudo apt install -y python-pybloomfiltermmap

  • pybloomfiltermmap ==> 0.3.15

install openvas9 in kali linux (rolling)

最近需要利用open source software做網站主機的滲透測試,
一開始是自行安裝ubuntu 16.04 LTS,然後安裝openvas和w3af,
然後針對已經開發中的web site測試,後來又找了一些其它的工具,
最後就找到了 Kali Linux (一個以Debian Linux為基礎開發的滲透測試系統)

原本Kali linux上是已經安裝了OpenVAS和w3af...等工具,但我安裝的是最新版的kali linux(rolling),也就是以後kali linux不會有版本的概念,會不斷的更新。
OpenVAS由於佔用空間太大,預設情況下不會安裝,而w3af則是因為相關的package只支援python2,所以被移除了,等w3af完全支援python3才會再被重新加入Kali Linux
官方也建議每次使用時都取得最新的版本,透過apt update和apt dist-upgrade

2016年5月28日 星期六

刪除終端機存取中斷的python debug web server

適用情況:
遠端登入建立virtual environment,並啟動web server後,終端機斷線
在這種狀況下,web server還是在running state,所以port被佔住,無法debug

解決方法:
pkill -f "python manage.py runserver"