Nov 30, 2017

search to json api

just simple to access :

from Javascript 

<html>
<head>


  <script>
    var HttpClient = function() {

      this.post = function(aUrl, data, aCallback) {
        var httpRequest = new XMLHttpRequest();
        httpRequest.open("POST", aUrl, true);
        httpRequest.onreadystatechange = function() {
          if (httpRequest.readyState == 4 && httpRequest.status == 200)
            aCallback(httpRequest.responseText);
        };
        httpRequest.send(JSON.stringify(data));
      };
    };

    var req = new HttpClient();
    var rURL = 'http://search.rajatrepik.in/d/';
    req.post(rURL, {"query" : 'novanto site:http://detik.com'}, function(response) {
      document.getElementById('main').innerHTML = response;
    });

</script>
</head>
<body>

<div>
Hello world</div>
<div id="main">
</div>
</body>

</html></pre>

from Curl

curl -H "Content-Type: application/json" -X POST -d '{"query":"tangga lagu terbaru site:joox.com"}' http://search.rajatrepik.in/d/

from PHP

$data = array("query" => "kisah kasih pipik sunu");                                                                    
$data_string = json_encode($data);                                                                $ch = curl_init('http://search.rajatrepik.in/d/');                                                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                  curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);                                               curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                   curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($data_string)));                                                                            $result = curl_exec($ch);
print($result);
{ "status" : "ok", "result" :  [{"url": "https://www.youtube.com/watch?v=GY6N_h0Jjbc", "desc": "Mau tahu gosip terpanas seputar selebriti tanah air lainnya? Langsung aja klik http://www.cumicumi ...", "title": "Jalan Panjang Kisah Cinta Rahasia Umi Pipik dan Sunu Matta ..."}, {"url": "https://www.youtube.com/watch?v=0bJ8YaVshSM", "desc": "Kisah Dibalik Kedekatan, Sunu & Umi Pipik Hingga Akhirnya Nikah Siri Nama Sunu Haramain atau ...", "title": "Kisah Dibalik Kedekatan, Sunu & Umi Pipik Hingga Akhirnya Nikah ..."}, {"url": "http://wartakota.tribunnews.com/2017/11/16/dikabarkan-dekat-umi-pipik-sunu-matta-berterima-kasihi", "desc": "16 Nov 2017 - WARTA KOTA, JAKARTA- Pipik Dian Irawati diduga memiliki hubungan asmara dengan mantan vokalis grup band Matta, Sunnu Hermaen.", "title": "Dikabarkan Dekat Umi Pipik, Sunu Matta Berterima Kasih - Wartakota"}, {"url": "https://www.linggars.com/video/mkknpL2ZMQU/pagi-pagi-pasti-happy-ust-derry-klarifikasi-hubungan-umi-pipik-dengan-sunu-131117-part-3.html", "desc": "awalnya sunu pipik nikah siri buat urusan bawah aja, yang penting halalan toyiban, ..... jujur feeling Q ...", "title": "PAGI PAGI PASTI HAPPY - Ust. Derry Klarifikasi Hubungan Umi Pipik ..."}, {"url": "http://www.melodlist.com/index.php?a=search&q=Tangisan%20Istri", "desc": "22 Nov 2017 - Kisah Tauladan, Penyesalan Seorang Istri Yang Menyia-siakan Suami .... BEREDAR FOTO UMI PIPIK DAN USTAD SUNU MENIKAH ~ Gosip Artis .... Renungan,,, Inilah Cerita Sedih Kasih Sayang Istri Untuk Suaminya Yang...", "title": "Tangisan Istri - Melodlist - Online Songs & Music Playlists"}, {"url": "http://hmongbuy.net/video/S-mfLF2obSs", "desc": "Kisah perjalanan Ustadz Jeffry Al Buchory dan Pipik - Was Was 30 April 2013. Share to Facebook HOT ...", "title": "hmongbuy.net - Kisah perjalanan Ustadz Jeffry Al Buchory dan Pipik ..."}, {"url": "http://dreamcareservice.com/video?q=berita-artis-indonesia-terkini-hari-ini", "desc": "02 April 2017 KASIH KABAR ... jangan lupa subscribe dan like ya :) ,cerita artis terkini dan gosip artis terkini hingga gosip panas, selebriti berita dan ... GOSIP NIKAH SIRI UMI PIPIK DAN SUNU TERJAWAB @Gosip Artis Indonesia Terbaru", "title": "Download Full Video Berita Artis Indonesia Terkini Hari Ini Mp3, 3GP ..."}, {"url": "https://www.pinterest.cl/supernewsid/gosip-artis-indonesia/", "desc": "Dikabarkan Menikah Siri Dengan Umi Pipik, Sunu Matta Band Angkat Bicara .... Ahmad Dhani: Habib Rizieq Terlalu Kelamaan, Cukup Kasih Tujuh Hari ... Sinopsis Mohabbatein Episode 1-100 ANTV | Trailer, Rilis, Pemain, Cerita dan .... Nos ponemos en manos de los profesionales para que nos indiquen cmo disimular...", "title": "14 mejores imgenes de Gosip Artis Indonesia en Pinterest | Bikini ..."}, {"url": "http://mediascreenmusic.com/music/sunu.html", "desc": "Download Songs Sunu only for review course, Buy Cassette or CD / VCD original from the album Sunu or use Personal Tone / I-RING / Ring Back Tone in.", "title": "Sunu | MediaScreenMusic.com"}, {"url": "http://www.sitefavori.com/bintang-com/", "desc": "... Pipik Syahnaz Sadiqah Rina Nose Rachmawati Soekarnoputri Cerita Baru SCTV ... Sophia Latjuba Panen Pujian16 Nov 2017 19:25Tony Q Rastafara Apresiasi ... Istri16 Nov 2017 18:15Saran Aura Kasih Sebelum Nonton Film Keluarga Tak ... Pernikahan Siri Umi Pipik dan SunuFoto Mesra dengan Sunu, Umi Pipik: Itu...", "title": "bintang.com - Mes sites favoris"}, {"url": "http://connectyoutube.com/search?q=Berita+infotainment", "desc": "2 months ago - KASIH KABAR ... connectYoutube - SUDAH NIKAHI UMI PIPIK SETAHUN LALU,SUNU MINTA MAAF KE ISTRINYA SUDAH POLIGAMI.", "title": "connectYoutube.com - Search video Berita infotainment"}, {"url": "https://www.pinterest.com.au/pin/664492119989264301/", "desc": "Menanti Kelahiran, Cerita Istri Stefan William soal Calon Bayi .... ada kejadian Kiwil hidup di dunia entertain, glamor, tapi Allah putus yang Dia kasih. Semua ... 6 coisas que voc pode cortar da sua festa de casamento para economizar dinheiro ... Dikabarkan Menikah Siri Dengan Umi Pipik, Sunu Matta Band Angkat Bicara.", "title": "Pernikahan Gilang Dirga - Tampil Mewah Di Pelaminan, Sang ..."}, {"url": "https://www.pinterest.com.mx/pin/664492119989350704/", "desc": "Ahmad Dhani: Habib Rizieq Terlalu Kelamaan, Cukup Kasih Tujuh Hari. MulanBali .... Menanti Kelahiran, Cerita Istri Stefan William soal Calon Bayi .... Dikabarkan Menikah Siri Dengan Umi Pipik, Sunu Matta Band Angkat Bicara  Indonesia ... 10 Clbrits qui prouvent que les amourettes de la vie tudiante peuvent durer.", "title": "Waduh, Zack Lee Adu Jotos dengan Iko Uwais, Ada Apa, ya? - Pinterest"}, {"url": "https://www.pinterest.com.mx/pin/664492119989266847/", "desc": "Ahmad Dhani: Habib Rizieq Terlalu Kelamaan, Cukup Kasih Tujuh Hari ..... 10 Clbrits qui prouvent que les amourettes de la vie tudiante peuvent durer .... Dikabarkan Menikah Siri Dengan Umi Pipik, Sunu Matta Band Angkat Bicara ... Mirip Kisah Jessica, Renata Tak Sadarkan Diri Setelah Minum Kopi Mirip Kisah...", "title": "Ahmad Dhani Calonkan Diri Jadi Wakil Bupati Bekasi, Begini ..."}, {"url": "http://wapka.cakap.biz/site_search.html?get-q=Heboh-Umi-Pipik-Istri-Alm-Uje-Dugem-Tertangkap-Kamera", "desc": "Dapatkan Heboh Umi Pipik Istri Alm Uje Dugem Tertangkap Kamera oleh oleh ... download lagu Kisah perjalanan Ustadz Jeffry Al Buchory dan Pipik - Was Was ... Adik Uje Bocorkan Kabar Pernikahan Umi Pipik Dengan Sunu Selama Ini gratis ... lagu all of me by vjr , dugaan kasih haikal , chunin acoustic cover aremania...", "title": "Heboh Umi Pipik Istri Alm Uje Dugem Tertangkap Kamera Lagu MP3 ..."}, {"url": "http://jpnn.com/index.php?mib=video_detail&video_id=10924&page=898", "desc": "Pemprov Kepulauan Riau Ucapkan Terima Kasih Pada MPR. Kepala Dinas ... Sahabat Umi Pipik-Sunu gak Berani Ngomong - JPNN.COM. Gosip Sabtu, 18...", "title": "Berita Terbaru, Terkini dan Terpopuler Hari Ini - JPNN.COM"}, {"url": "http://m.viva.co.id/sitemap/web/showbiz.xml", "desc": "... .co.id/showbiz/gosip/981193-foto-ini-heboh-aura-kasih-disebut-sedang-merokok .... .id/showbiz/gosip/980853-isu-nikah-siri-dengan-sunu-begini-pesan-umi-pipik ... .co.id/showbiz/serial/980833-terangkanlah-kisah-inspiratif-terbaru-dari-antv ... http://www.viva.co.id/showbiz/musik/980774-kejutan-tony-q-rastarafa-di-jatim-...", "title": "http://www.viva.co.id/showbiz/gosip/981804-amarah-tsania-untuk ..."}] }






all about scrapy 
scrapy crawl keywordSpider -a keyword=Man-midle-attack -a se=google -a pages=2


 ======  :  =================  :   ==================
deploy : scrapyd-deploy default  -p seCrawler 
Packing version 1512005704
Deploying to project "seCrawler" in http://localhost:6800/addversion.json
Server response (200):
{"status": "ok", "project": "seCrawler", "version": "1512005704", "spiders": 2, "node_name": "seceng"}



list project : curl http://localhost:6800/listprojects.json 
{"status": "ok", "projects": ["seCrawler"], "node_name": "seceng"}

run project : curl http://localhost:6800/schedule.json -d project=seCrawler -d spider=keywordSpider -d keyword=Spider-Man -d se=google -d pages=2

del project : curl http://localhost:6800/delproject.json -d project=seCrawler

 
 curl http://localhost:6800/schedule.json -d project=seCrawler -d spider=keywordSpider -a keyword=Spider-Man -a se=google -a pages=2
 
 

Read more ...

Nov 28, 2017

install archipel ubuntu

NOTE:
bold is important

1. setup hostname
hostname icloud.blackonsole.org
echo icloud.blackonsole.org > /etc/hostname


2. install some packages
apt-get install -y git ejabberd build-essential qemu-kvm libvirt-bin libvirt-dev python-setuptools python-numpy python-imaging python-apscheduler python-sqlalchemy python-libvirt subversion python-dev vim python-magic

3. edit : vim /etc/ejabberd/ejabberd.yml  (please check, sometimes the name is ejabberd.CFG)
if you are still use .cfg, you need to change with other source ejabberd.

echo "deb https://apt.jabber.at trusty ejabberd" > /etc/apt/sources.list.d/jabber.at.list
wget -qO- https://apt.jabber.at/gpg-key | apt-key add -
apt-get update
apt-get install -y git ejabberd



###
###             ejabberd configuration file
###         Archipel Sample default condiguration

###     =========
###     DEBUGGING

# Increase this if you want sone insane erlang debug
loglevel: 3

###     ================
###     SERVED HOSTNAMES

# Change it for you icloud.blackonsole.org
hosts:
    - "icloud.blackonsole.org"

###     ===============
###     LISTENING PORTS

listen:
    -
      #it's a good idea to put xmlrpc behing a reverse proxy
      #because you can't use tls directly, make it listen to localhost
      #ip : 127.0.0.1
      # and read the Security section on the wiki
      port: 4560
      module: ejabberd_xmlrpc
      access_commands:
            xmlrpcaccess:
                all : []

## ejabberd c2s
    -
      port: 5222
      module: ejabberd_c2s
      ##
      ## If you installed a SSL
      ## certificate, specify the full path to the
      ## file and uncomment this line:
      ##
      ## certfile: "/etc/ejabberd/ejabberd.pem"
      ## starttls: true
      max_stanza_size: 65536000
      shaper: c2s_shaper
      access: c2s

## ejabbed s2s
    -
      port: 5269
      module: ejabberd_s2s_in
      max_stanza_size: 65536000

## ejabberd http/s and websocket/s
    -
      port: 5280
      module: ejabberd_http
      request_handlers:
        "/xmpp": ejabberd_http_ws
      # if you want to use starttls with websock
      # the URI will be wss://
      # please be sure that the certificate belong
      # to a trusted AC in your browser
      # certfile: "/etc/ejabberd/ejabberd.pem"
      # tls: true
      web_admin: true
      http_bind: true

###     ===
###     S2S
s2s_policy: s2s_access
s2s_use_starttls: optional
#s2s_certfile: "/etc/ejabberd/ejabberd.pem"

## domain_certfile: Specify a different certificate for each served hostname.
##
## host_config:
##   "example.org":
##     domain_certfile: "/path/to/example_org.pem"
##   "example.com":
##     domain_certfile: "/path/to/example_com.pem"

###     ==============
###     AUTHENTICATION

auth_method: internal

###     ===============
###     TRAFFIC SHAPERS

shaper:
  # in B/s
  normal: 1000
  fast: 50000000

###     ====================
###     ACCESS CONTROL LISTS

acl:
    admin:
        user:
            - "admin": "icloud.blackonsole.org"
    local:
        user_regexp: ""


###     ============
###     ACCESS RULES

access:
    max_user_sessions:
        all: 10
    local:
        local: allow
    c2s:
        blocked: deny
        all: allow
    c2s_shaper:
        admin: none
        all: fast
    s2s_shaper:
        all: fast
    s2s_access:
        all: allow
    announce:
        admin: allow
    configure:
        admin: allow
    muc_admin:
        admin: allow
    muc_create:
        local: allow
    muc:
        all: allow
    pubsub_createnode:
        all: allow
    register:
        all: allow
    xmlrpcaccess:
        admin : allow

### Frequency of account registration
registration_timeout: infinity

###     ================
###     DEFAULT LANGUAGE

language: "en"

###     =======
###     MODULES

modules:
    mod_adhoc: []
    mod_announce:
        access: announce
    mod_caps: []
    mod_configure: []
    mod_disco: []
    mod_http_bind:
        max_inactivity: 400 # timeout valie for BOSH usefull for a large number of VM
    mod_irc: []
    mod_last: []
    mod_muc:
        access: muc
        access_create: muc_create
        access_persistent: muc_create
        access_admin: muc_admin
    mod_offline: []
    mod_privacy: []
    mod_private: []
    mod_pubsub:
        access_createnode: pubsub_createnode
        ignore_pep_from_offline: true
        last_item_cache: false
        max_items_node: 1000
        plugins:
            - "flat"
            - "hometree"
            - "pep"
    mod_register:
        access: register
    mod_roster: []
    mod_shared_roster: []
    mod_time: []
    mod_vcard: []
    mod_version: []
    mod_admin_extra: []

4. restart ejaberd
/etc/init.d/ejabberd restart

5. install archipel agent
cd /usr/local/src
git clone https://github.com/ArchipelProject/Archipel.git
cd Archipel
./pull.sh
easy_install apscheduler sqlalchemy numpy
cd ArchipelAgent
./buildAgent -d
archipel-initinstall


6. edit apparmor privileges 
Add "m" to /etc/apparmor.d/usr.sbin.ejabberdctl's "su" subprofile on /bin/su line:
                /bin/su rm,

7. register user

ejabberdctl register admin icloud.blackonsole.org 4dMinPassWD
archipel-tagnode -j admin@icloud.blackonsole.org -p 4dMinPassWD --create
archipel-rolesnode -j admin@icloud.blackonsole.org -p 4dMinPassWD --create
archipel-adminaccounts -j admin@icloud.blackonsole.org -p 4dMinPassWD --create

8. set agent
vim /etc/archipel/archipel.conf


#
# archipel.conf
#
# Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu>
#               2014 Cyril Peponnet <cyril@peponnet.fr>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <//www.gnu.org/licenses/>.


###############################################################################
###############################################################################

#
# General configuration. You should just need to edit these values
#
[DEFAULT]

# the default XMPP server to user
xmpp_server                 = icloud.blackonsole.org

# archipel's data folder
archipel_folder_lib         = /var/lib/archipel/

# this UUID will be used to identify the hypervisor
# internally. It MUST be different foreach one over
# your platform. You can generate a new one using
# uuidgen command
archipel_general_uuid       = b01ae4ae-0497-4356-b958-daHQ223B4jqJ

# the base working folder, where virtual machine related
# stuff will be stored
archipel_folder_data        = /vm/



###############################################################################
###############################################################################

#
# This is the main configuration parameters
#
[GLOBAL]

# jid of the xmpp pubsub server
xmpp_pubsub_server          = pubsub.%(xmpp_server)s

# jids of the root administrator separated with spaces
archipel_root_admins        = admin@%(xmpp_server)s tox@%(xmpp_server)s

# the ip of this machine. It can be :
# - auto : the IP if found using a Internet request.
# - gateway_interface : Using ip address configured on default gateway interface
# - X.X.X.X : manual ip
machine_ip                  = 1.2.3.4

# if set to True, XMPP layer uses avatars
use_avatar                  = True

# Folder of the avatars
machine_avatar_directory    = %(archipel_folder_lib)s/avatars

# the uri of hypervisor
libvirt_uri                 = qemu:///system

# [OPTIONAL] if set, this parameter is send to other hypervisors as migration UI
# migration_uri               = qemu+ssh://mydomain/system

# path were modules configuration are stored (*.conf)
modules_configuration_path = /etc/archipel/modules.d/

# default loading module policy
# - permissive : if no entry are found in the conf file in section MODULES, the module will be loaded anyway
# - restrictive: you need to explicitely declare what modules to load in MODULES
module_loading_policy       = restrictive

# [OPTIONAL] This parameters makes Archipel able to run in stateless mode.
# stateless mode needs some kernel parameters. please read the documentation (which is not available now :)
# about it, or leave it set to False
stateless_node              = False

#
# VCARD information - They CANNOT be empty
#
[VCARD]
orgname     = Archipel Corp
orgunit     = Dev
userid      = contact@archipelproject.org
locality    = San Francisco
url         = //archipelproject.org
categories  = Archipel


#
# The hypervisor configuration
#
[HYPERVISOR]

# the JID of this hypervisor. It MUST be different foreach one over
# your platform.
# If this account not exists, it will be created on the fly
hypervisor_xmpp_jid         = icloud@%(xmpp_server)s

# the XMPP password of this hypervisor
hypervisor_xmpp_password    = uFp97vJ7U6

# the vCard name of hypervisor. if set to "auto"
# the hostname is used
hypervisor_name             = auto

# the sqlite3 db file to store hypervisor informations
hypervisor_database_path    = %(archipel_folder_lib)s/hypervisor.sqlite3

# the default avatar to use for hypervisor, relative to
# GLOBAL:machine_avatar_directory and if GLOBAL:use_avatar is set to True
hypervisor_default_avatar   = defaulthypervisor.png

# the file contaning auto generated names for virtual machine creation
# must be a text file containing one name per line
name_generation_file        = %(archipel_folder_lib)s/names.txt

# the database file for storing permissions (full path required)
hypervisor_permissions_database_path = %(archipel_folder_lib)s/permissions.sqlite3

#
# The virtual machines configuration
#
[VIRTUALMACHINE]

# the base folder to use to store virtual machine's own
# informations (drives, etc...)
vm_base_path                    = %(archipel_folder_data)s/drives

# [OPTIONAL] the base folder to store virtual machine permissions
# if not set, permissions are stored in the base folder
# vm_perm_path                    = %(archipel_folder_data)s/drives

# the default avatar to use for virtual machine, relative to
# GLOBAL:machine_avatar_directory and if GLOBAL:use_avatar is set to True
vm_default_avatar               = defaultvm.png

# the size of the random generated XMPP password
xmpp_password_size              = 32

# the maximum lifetime of a lock (in seconds)
maximum_lock_time               = 1

# the database file for storing permissions (relative path required)
vm_permissions_database_path    = /permissions.sqlite3

# if set to false, all space in virtual machine names will be replaced by a '-'
# note that for xen backend this option has no effect as xen does'nt handle spaces in names.
allow_blank_space_in_vm_name    = True

# [OPTIONAL] this will allow to block access to block devices
# when defining virtual machines
enable_block_device_access      = True

# [OPTIONAL] this will disable the screenshot feature. Libvirt 0.9.5+ is bugged
# If you use these versions, set this value to True. Default value (i.e not set) is False
disable_screenshot              = False



#
# Logging configuration
#
[LOGGING]

# minimal log level. it can be in order:
# - debug
# - info
# - warning
# - error
# - critical
logging_level               = debug

# max life time of a log node in the pubsub
log_pubsub_item_expire      = 3600

# max number of stored log in the pubsub log node
log_pubsub_max_items        = 1000

# the path of file to store logs
logging_file_path           = /var/log/archipel/archipel.log

# max size in bytes of a log file before rotation
logging_max_bytes           = 5000000

# number of log backup file to keep
logging_backup_count        = 5

# the date format to use in log file.
# See //docs.python.org/library/logging.html#formatter-objects
logging_date_format         = %Y-%m-%d %H:%M:%S

# the log format to use in log file.
# See //docs.python.org/library/datetime.html?highlight=date#strftime-and-strptime-behavior
logging_formatter           = %(levelname)s::%(asctime)s.%(msecs)03d::%(filename)s:%(lineno)s::%(message)s

# If this is True, xmpppy will be in debug mode
xmpppy_debug                = False

[MODULES]

action_scheduler            = True
centraldb                   = True
geolocalization             = True
hypervisor_health           = True
hypervisor_network          = True
hypervisor_vmcasts          = True
iphone_notification         = False
oomkiller                   = True
snapshoting                 = True
storage                     = True
virtualmachine_appliance    = True
vnc                         = True
xmppserver                  = True
vmparking                   = True  # needs centraldb to be activated

[CENTRALAGENT]
# centralagent can be :
#  - auto (default) : will be central agent if there is none already started
#  - force : will be central agent (be careful to configure only one of your hypervisors this way)
centralagent               = auto

[VNC]
vnc_certificate_file                        = None
vnc_only_ssl                                = False
vnc_enable_websocket_debug                  = True

10. restart archipel
/etc/init.d/archipel restart

11. adding iso
mkdir /vm/iso/
chmod 777 /vm/iso
cd /vm/iso
wget //de.releases.ubuntu.com/14.04.3/ubuntu-14.04.3-server-amd64.iso


12. install client 

wget //nightlies.archipelproject.org/latest-archipel-client.tar.gz
tar -xzf latest-archipel-client.tar.gz
cd Archipel/
python -m SimpleHTTPServer


13. Play with Archipel Client
Open //localhost:8000 in web browser.
0. Log in with admin@ user in installation
1. Add contact and then add icloud@icloud.blackonsole.org
2. Create VM in Archipel VMs
3. Configure hdd, cdrom, Nic for VM
4. Run the VM


in some distro, you need to set user on sudo vim /etc/libvirt/qemu.conf  



refs :
0. https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/599910  
1. https://blackonsole.org/how-to-install-archipel-on-linux-ubuntu/
2. https://bugs.launchpad.net/ubuntu/+source/ejabberd/+bug/1659801 
3. https://www.digitalocean.com/community/tutorials/how-to-install-ejabberd-xmpp-server-on-ubuntu
Read more ...

Nov 14, 2017

android yowsup get password registration and login


edit android env

sudo vim /usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/env/env_android.py

class AndroidYowsupEnv(YowsupEnv):
    _SIGNATURE = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNV" \
        "BAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJ" \
        "pYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5" \
        "pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEg" \
        "YDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEm" \
        "aUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCN" \
        "VQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jr" \
        "qgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO" \
        "8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaS" \
        "HBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRW" \
        "YHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXd" \
        "KtOrNTQcc0e+t"

    _MD5_CLASSES = "3jYxFPSrhqjabEm5b2sXhA==" # ry9Xz6kVioQctwA3G9z62Q=="
    _KEY = "eQV5aq/Cg63Gsq1sshN9T3gh+UUp0wIw0xgHYT1bnCjEqOJQKCRrWxdAe2yvsDeCJL+Y4G3PRD2HUF7oUgiGo8vGlNJOaux26k+A2F3hj8A=" #eQV5aq/Cg63Gsq1sshN9T3gh+UUp0wIw0xgHYT1bnCjEqOJQKCRrWxdAe2yvsDeCJL+Y4G3PRD2HUF7oUgiGo8vGlNJOaux26k+A2F3hj8A="

    _VERSION = "2.17.279" #2.12.556"
    _OS_NAME = "Android"
    _OS_VERSION = "4.3"
    _DEVICE_NAME = "armani"
    _MANUFACTURER = "Xiaomi"
    _BUILD_VERSION = "JLS36C"

    _AXOLOTL = True



request register :
yowsup-cli registration --requestcode sms -m 504 -n 01 --phone 6285xxx --cc 62 --mcc 510 --mnc 852 --env android

yowsup-cli  v2.0.15
yowsup      v2.5.2

Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate


INFO:yowsup.common.http.warequest:b'{"login":"6285xxx","status":"sent","length":6,"method":"sms","retry_after":65,"sms_wait":65,"voice_wait":65}\n'
status: b'sent'
retry_after: 65
length: 6
method: b'sms'
login: b'6285xxx'


register :
yowsup-cli registration --register 535-804 -m 504 -n 01 --phone 6285xxx --cc 62 --mcc 510 --mnc 852 --env android

yowsup-cli  v2.0.15
yowsup      v2.5.2

Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate


INFO:yowsup.common.http.warequest:b'{"status":"ok","login":"6285xxx","type":"existing","pw":"NSFit709bWoiXstG8CS3N18yZ8E=","expiration":4444444444.0,"kind":"free","price":"$0.99","cost":"0.99","currency":"USD","price_expiration":1511231163}\n'
login: b'6285xxx'
kind: b'free'
status: b'ok'
price_expiration: 1511231163
expiration: 4444444444.0
currency: b'USD'
pw: b'NSFit709bWoiXstG8CS3N18yZ8E='
price: b'$0.99'
type: b'existing'
cost: b'0.99'

you can login and send WA message via command line then.


Read more ...