寄件者: dsmmssqladmin@dnb.com 寄件日期: 2016年(馬賽克) 收件者: (馬賽克) 主旨: D-U-N-S Number Request/Update Completed your D-U-N-S Number request/update submitted on (馬賽克) with ID Number (馬賽克) has been completed. You may start using your number in 14 days. D-U-N-S Number: (馬賽克) Resolution Description: New Record Created The following information was submitted as part of your request:Business Name: (馬賽克) Co., Ltd. City: (馬賽克) Thank you for using D&B's Mini Investigation Service. Country: TAIWAN
/* Run this script every 5 minutes (or 1 hour, is up to you) using a cron task */ // ref: https://gist.github.com/agarzon/2431219 /* Edit this data*/ $domain = "網域名稱 example.com "; $pass = "密碼"; $host = "A紀錄名稱"; // Optional, for additional hosts names like: ftp., mail. or any sub-domains. // 底下三行僅供參考 //file_get_contents("http://dynamic.name-services.com/interface.asp?command=SetDNSHost&Zone=@.$domain&DomainPassword=$pass"); //file_get_contents("http://dynamic.name-services.com/interface.asp?command=SetDNSHost&Zone=www.$domain&DomainPassword=$pass"); //file_get_contents("http://dynamic.name-services.com/interface.asp?command=SetDNSHost&Zone=*.$domain&DomainPassword=$pass"); // 寫入 api service ,執行完後去查查看是否有這個 A 紀錄,或是 ip 更新了 file_get_contents("http://dynamic.name-services.com/interface.asp?command=SetDNSHost&Zone=$host.$domain&DomainPassword=$pass"); ?>
說明: http://php.net/manual/en/function.session-write-close.php
Session data is usually stored after your script terminated without the need to call session_write_close(), but as session data is locked to prevent concurrent writes only one script may operate on a session at any time. When using framesets together with sessions you will experience the frames loading one by one due to this locking. You can reduce the time needed to load all the frames by ending the session as soon as all changes to session variables are done.
Porxy 服務早期是因為網路頻寬小,通常在區網內把重複的流量用 proxy 來取代。
現在則變成一種可以欺騙 web server 客戶端來源 IP 的一個小技巧,有人用於當 bot 爬網站,有人用於分散流量抓迷片。而今天,我把它用來服務 pokemon bot client ,因為一個 bot 抓太慢拉!!! XDXD
* 安裝及設定 Linux 的 Proxy 服務
# 安裝 squid yum install squid -y
# 編輯設定檔 /etc/squid/squid.conf
nano /etc/squid/squid.conf
# 在這段之後
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# 放入下面三行規格, ip 請自行更動 acl mynet src 111.32.141.0/24 acl mynet src 111.32.141.0/24 http_access allow mynet
範例SQL: SELECT id, transaction_time,to_char((transaction_time AT TIME ZONE 'CCT') , 'YYYY-MM-DD HH24:MI:SS' ) as cct_transaction_time, to_char((transaction_time AT TIME ZONE 'EST') , 'YYYY-MM-DD HH24:MI:SS' ) as est_transaction_time FROM root_memberdepositpassbook WHERE member_id = '45' ORDER BY est_transaction_time DESC LIMIT 10;
-- 北京時間 SELECT enrollmentdate, to_char((enrollmentdate AT TIME ZONE 'posix/Etc/GMT-8'),'YYYY-MM-DD HH24:MI:SS') as enrollmentdate_tz FROM root_member WHERE id = '45';
-- 美東時間 SELECT enrollmentdate, to_char((enrollmentdate AT TIME ZONE 'posix/Etc/GMT+5'),'YYYY-MM-DD HH24:MI:SS') as enrollmentdate_tz FROM root_member WHERE id = '45';
-- 東京時間 SELECT enrollmentdate, to_char((enrollmentdate AT TIME ZONE 'posix/Etc/GMT-9'),'YYYY-MM-DD HH24:MI:SS') as enrollmentdate_tz FROM root_member WHERE id = '45';
-- 列出目前系統的時區列表 ,指列出標準 postfix 的資訊。 select * from pg_timezone_names where name like '%posix/Etc/GMT%'
在 time with timezone 格式中,如果這樣表示時區 +08 的紀錄
2016-07-23 04:24:33.503622+08 * 如果要分別生成屬於美東時間 UTC-05 * 以及中原標準時間 UTC +08 * 東京時間 UTC +09
那使用的 timezone addrev 對照的欄位,帶入前面的 參數。 * 中原標準時間 UTC +08 對應 posix/Etc/GMT-8 * 美東時間 UTC-05 對應 posix/Etc/GMT+5 * 東京時間 UTC +09 對應 posix/Etc/GMT-9
一開始是想要參考別人 API 怎麼寫的!!!
沒想到先看到 pokemon api , 各種版本都有, 少說有 6 種以上語言支持。
PoMG API by python 2.7 https://github.com/PokeAPI/pokeapi
https://pokeapi.co/docsv2/
如果有 google map API key ,可以走道路不會亂走,
裡面有很多細項的參數,例如隨機速度 max and min ,間隔休息,
還有很多 pokemon 的管理、升級、進化等功能都可以操作, IV 值也可以線上直接看。
google map key 可以到 https://console.developers.google.com 申請一個, server key 就可以用了, 如不申請也是可以用的。各位可以試試看巴。
-------- Catchem-PoGo for win
--------
這個大概是目前做的最好的 bot ,可以支援多組設定檔,及更多的設定細節。
可以自動走路的路徑,人性化的參數。且支援多個圖資 API ,還可以透過 Telegram bot 來控制 bot .....天呀!太強大了!!!!!
官方網站: https://github.com/Lunat1q/Catchem-PoGo/releases
TIP:
-------
1. 在高雄的話,美術館,是個很棒的起點。 GPS地標: 22.655, 120.284
2. 等級練到 20 後,觀看 IV 值再來決定升 powerup 及 進化 evolvable 的順序。
3. 使用 bot 很容易被鎖帳號,所以還是出去走走巴,鍵盤訓練師是無法道館對戰的。
4. 容易被 ban 的行為: 在同一個 IP 執行超過一個程序,會被 banned 。但是換個 IP 就可以,過段時間也就會放這個 ip 出來,可以透過 proxy 服務來避開。不要很快時間的切換帳號在同一個 IP 上面,否則也是被 banned 。
5. 飛人的行為,我感覺沒那麼好抓。我猜可以是資料量太大,官方對於太小移動,或是頻率不高的飛人不好判斷,所以不會那樣快抓到。
6. 不要連續使用 bot 超過 24HR 那一定會出問題,另外不要用 google account 掛 bot ,可能讓你的 google account 被盜帳號。然後不要長時間移動太快, 例如平均 50KM/HR 的行走不間斷。
Pokemon GO in Linux
---------------------------------
至於 Linux 勒,請自行參考....
https://github.com/mchristopher/PokemonGo-DesktopMap
http://blog.pokemongofun.com/resolved-encrypt-so-is-not-found-please-place-it-in-the-bots-root-directory/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 效能測試
# redis-benchmark -a '123456' -h 111.111.22.22 -c 1000 -n 100 -q
PING_INLINE: 3703.70 requests per second
PING_BULK: 7692.31 requests per second
SET: 4347.83 requests per second
GET: 8333.33 requests per second
INCR: 11111.11 requests per second
LPUSH: 8333.33 requests per second
LPOP: 3703.70 requests per second
SADD: 9090.91 requests per second
SPOP: 8333.33 requests per second
LPUSH (needed to benchmark LRANGE): 4347.83 requests per second
LRANGE_100 (first 100 elements): 3448.28 requests per second
LRANGE_300 (first 300 elements): 9090.91 requests per second
LRANGE_500 (first 450 elements): 8333.33 requests per second
LRANGE_600 (first 600 elements): 7142.86 requests per second
MSET (10 keys): 8333.33 requests per second
* 使用 redis 來當成 php session handler in Ubuntu
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-redis-server-as-a-session-handler-for-php-on-ubuntu-14-04
(2) 建立的 SQL 範例 , 需要一行一行填入. 預設不允許多行一起進入 sql -- 建立使用者 CREATE USER 帳號 WITH PASSWORD '密碼'; -- 建立資料庫 CREATE DATABASE 帳號(同DB) WITH OWNER 帳號 ENCODING 'UTF8' TEMPLATE hadoop; -- 註解 DB , 方便找人 COMMENT ON DATABASE 帳號 IS '使用者資訊註解'; -- 授權 GRANT ALL PRIVILEGES ON DATABASE 帳號 to 帳號(同DB);
(3) sql 範例如下: CREATE USER b004021234 WITH PASSWORD '1234atl1234'; CREATE DATABASE b004021234 WITH OWNER b004021234 ENCODING 'UTF8' TEMPLATE hadoop; COMMENT ON DATABASE b004021234 IS '蔡ooxx 0926123456'; GRANT ALL PRIVILEGES ON DATABASE b004021234 to b004021234;
將 CSV 檔案加上 UTF BOM 讓它可以在 Windows 被 EXCEL 正確的開啟沒有亂碼的問題
在 UTF-8 文件中放置 BOM 主要是微軟系統的習慣。但是真的沒有必要帶拉!!!!
http://stackoverflow.com/questions/2223882/whats-different-between-utf-8-and-utf-8-without-bom
According to the Unicode standard, the BOM for UTF-8 files is not recommended: