Posts

Showing posts from June, 2016

Automount partition in Ubuntu with fstab

Before use Ubuntu, i installed windows OS. I had 2 partitions in nfts, its not auto mount, only mount when i click in local disk icon. So i need auto load it, to run many application in this partitions. First, i need find ssid of partition in: /dev/disk/by-uuid. Then, edit /etc/fstab. Add:  UUID=327E4E257E4DE1E9 /mnt/sdb1/ ntfs   rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0 UUID=38D822D9D82294E2   /mnt/sdb2/      ntfs    rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000   0       0 Whit UUID i founded, and uid is id of my user. To add this location to menu bar, use "Bookmark this location" of Gnome. ---------------------------------------------------------- Thanks for reading -------------------------------------------------------------------------- Security Research SecurityLab - Linux Lab -- Window and Cisco Lab to be continued - I will update more.

Some experience while working with ElasticSearch, Angular

In this week, i join one project need program web portal. My hobby is Python so i chose Flask, Angular JS. I`m using bootstrap to make css template. My DB is ElasticSearch. I don`t use http request to make query ES, i used python-es lib. So, when use ES, i have some problems. 1. Sort in ES:             data = self.es.search(index=self.indexName, doc_type=self.docType,                                   body={"query": {                                       "filtered": {                                           "query": {                                               "bool": {                                                   "must": mustDict,                                               },                                           }                                       }                                   },                                       "size": size, "from": from_, "sort": {"ti

Popup interactive in Selenimum

When develop AWATT tool, i got this problem: after click, pop up alert windows show and must confirm (accept, dismiss) to continue. You can not use selector of selenium to control it. This is  solution: from selenium import webdriver import time url = "http://www.javascripter.net/faq/alert.htm" driver = webdriver.Firefox() driver.get(url) element = driver.find_element_by_xpath("//input[@type='button']") element.click() alert = driver.switch_to_alert() time.sleep(2) alert.accept() # alert.dismiss() ---------------------------------------------------------- Thanks for reading -------------------------------------------------------------------------- Security Research SecurityLab - Linux Lab -- Window and Cisco Lab to be continued - I will update more.

File Upload with Selenium

Yesterday, my brother asked me: "How to automatic upload a file with Selenium". Today, i had free time to solve it. Try this code. I used python blinding: from selenium import webdriver url = "https://encodable.com/uploaddemo/" driver = webdriver.Firefox() driver.get(url) element = driver.find_element_by_id("uploadname1") element.send_keys("/home/habachnam/a.txt") ---------------------------------------------------------- Thanks for reading -------------------------------------------------------------------------- Security Research SecurityLab - Linux Lab -- Window and Cisco Lab to be continued - I will update more.