顯示文章

這裡允許您檢視這個會員的所有文章。請注意, 您只能看見您有權限閱讀的文章。


文章 - shinhrn

頁: [1] 2
1
PHP程式設計討論區 / preg_match_all 問題
« 於: 2015-10-19 15:51 »
$emailstr=' b@b.com 123456789012345678 b.bb@bbb.com ';
$pattern = '/([a-zA-Z0-9]+[_.+-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[-.]?)+[a-zA-Z0-9]+/';
if (preg_match_all($pattern, $emailstr, $matches)){
   foreach($matches[0] as $email) {
      echo $email,'<BR>';
   }
}
找不出匹配???


$emailstr=' b@b.com 12345678901234567 b.bb@bbb.com ';
就可以...請問各位大大這是什麼原因阿?

2
PHP程式設計討論區 / Re: php curl 使用
« 於: 2015-10-19 15:37 »
google 會擋非瀏覽器行為的爬蟲
採 cookie 和 IP 雙驗證
請問你知道他如何查知 擋非瀏覽器行為的爬蟲?
我把 cookie 刪除 和 IP (ADSL) 換一個它好像都記得住耶!!!真是奇怪!!!!

3
我有一台機器使用 廢除密碼登錄, 強迫使用 RSA 驗證的shh連接
我由windows 使用SSH Secure Shell 連接ok
可是我由Linux 2.6.15-1.2054_FC5 卻不行?
OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
debug1: identity file /home/testuse/.ssh/identity type -1
debug1: identity file /home/testuse/.ssh/id_rsa type 1
debug1: identity file /home/testuse/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_2.5.1p2
debug1: match: OpenSSH_2.5.1p2 pat OpenSSH_2.5.0*,OpenSSH_2.5.1*,OpenSSH_2.5.2*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD(1024) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Found key in /home/testuse/.ssh/known_hosts:5
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/testuse/.ssh/identity
debug1: Offering public key: /home/testuse/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/testuse/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).
請問會是拿邊的問題??

4
Linux 討論版 / 影片播放問題
« 於: 2007-08-24 11:27 »
引述: "shihyu"
果然可以~ 請問為什麼會這樣?
謝謝

就她壓了2次阿...第一次壓完她把1.RAR改成1.MPG....然後再壓一次....所以......

5
Linux 討論版 / 影片播放問題
« 於: 2007-08-23 14:17 »
你把1.MPG改成1.RAR再解一次就成了...

6
引述: "jou"
是!
或則用 aliases 或 .forward 轉到一般的使用者收信。

了解謝謝

testsaslauthd
Aug 15 17:52:24 nat saslauthd[12684]: do_auth         : auth failure: [user=test] [service=imap] [realm=] [mech=pam] [reason=PAM auth error]
Aug 16 08:59:01 nat saslauthd[12684]: do_auth         : auth failure: [user=test] [service=dovecot] [realm=] [mech=pam] [reason=PAM auth error]

7
引述: "netman"
root 本來就不能用來 pop 的啊。

是喔..那root的信只能用MAIL收嘍...

8
引述: "日京三子"
引述: "shinhrn"
引述: "日京三子"
你是用什麼作業系統? 版本是?

testsaslauthd 執行結果如何?

Linux 2.6.15-1.2054_FC5

testsaslauthd 執行結果 root跟一般帳號都是
connect() : No such file or directory

不好意思.現在是root才不行啦...
用root試.現在出現
-ERR [IN-USE] Internal login failure. Refer to server log for more information.
Connection closed by foreign host.
1. 請啟動 saslauthd 。
2. 不要用root 帳號測試,請使用一般使用者帳號。

啟動 saslauthd
0: NO "authentication failed"

SO....一般使用者帳號可以了...

9
引述: "日京三子"
你是用什麼作業系統? 版本是?

testsaslauthd 執行結果如何?

Linux 2.6.15-1.2054_FC5

testsaslauthd 執行結果 root跟一般帳號都是
connect() : No such file or directory

不好意思.現在是 root 才不行啦...
用root試.出現
-ERR [IN-USE] Internal login failure. Refer to server log for more information.
Connection closed by foreign host.

10
網路上找到這篇
http://newweb.syups.tp.edu.tw/documents/memo/postfix/postfix.htm

AUTH PLAIN  //提出純文字認證要求
+
USER shane //送出登入帳號
-ERR Authentication failed.
連帳號都過不去???

11
引述: "paulso"
dovecot 預設是使用 linux 系統賬戶
/var/log/dovecot.log 有什麼看

我是用系統內的帳號阿...
我沒有 /var/log/dovecot.log耶
secure紀錄如下
Aug 14 12:08:41 nat dovecot-auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser= rhost=127.0.0.1  user=xxxxx

用root試.現在出現
-ERR [IN-USE] Internal login failure. Refer to server log for more information.
Connection closed by foreign host.
之前是跟一般帳號一樣authentication failure...奇怪??整麼變了...

請問paulso大大如果要有 /var/log/dovecot.log 那/etc/syslog.conf要如何設??

12
我依鳥哥的私房菜理的修改 /etc/dovecot.conf後啟動 啟動 pop3
[root@linux ~]# vi /etc/dovecot.conf
protocols = pop3
pop3_listen = *
為何會Authentication failed.我確定帳號密碼都對阿...還有拿理要改嗎??

[root@linux ~]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK dovecot ready.
user xxxxx
+OK
pass xxxx
-ERR Authentication failed.

13
Linux 討論版 / fc5 的samba error
« 於: 2007-06-15 11:31 »
引述: "longlife"
試試:
代碼: [選擇]

printcap name = /etc/printcap
load printers = no
printing =

假如沒有 /etc/printcap 此檔,就 touch /etc/printcap 建立空檔。

ok了.可以.謝謝...

14
Linux 討論版 / fc5 的samba error
« 於: 2007-06-15 11:01 »
請問為何 我fc5的 samba 每次啟動時都會有以下訊息??
Jun 15 10:32:17 nat smbd[11977]: [2007/06/15 10:32:17, 0] printing/print_cups.c:cups_cache_reload(85)
Jun 15 10:32:17 nat smbd[11977]: Unable to connect to CUPS server localhost - Connection refused

我想關掉 CUPS功能.不知要從拿裡設定??

smb.conf
我只查到有 load printers 可是
load printers = no
沒用..

15
之前發文居然是亂碼...真不好意思..再補一下..請各位大大幫忙..

16
我有一台供內部使用的機器
RedHat 6.2
OpenSSH_2.5.1p2

我想依
http://www.study-area.org/tips/ssh_tips.htm
設定
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no
可是都無效??
不知是否是版本太舊了 Crying or Very sad

ps:我試過3台fedora core 1,RedHat 9.0都可以
不知有什麼方式可以達成??

May 24 11:12:50 www PAM_pwdb[26172]: (su) session opened for user root by users001(uid=507)
May 24 11:12:56 www modprobe: modprobe: Can't locate module net-pf-10
May 24 11:12:56 www sshd[26208]: fatal: Cannot bind any address.
May 24 11:20:39 www sshd[26337]: Failed none for users001 from 192.168.1.1 port 4690 ssh2
May 24 11:20:39 www sshd[26337]: Failed keyboard-interactive for users001 from 192.168.1.1 port 4690 ssh2
May 24 11:20:40 www sshd[26337]: Received disconnect from 192.168.1.1: 13: Authentication cancelled by user.
May 24 11:39:49 www sshd[26572]: error: setsockopt SO_KEEPALIVE: Socket operation on non-socket
May 24 11:39:49 www sshd[26572]: warning: can't get client address: Socket operation on non-socket
May 24 11:39:49 www sshd[26572]: refused connect from unknown
May 24 12:19:55 www sshd[27232]: Failed publickey for users001 from 192.168.1.1 port 2438 ssh2
May 24 12:19:55 www sshd[27232]: Failed none for users001 from 192.168.1.1 port 2438 ssh2
May 24 12:19:55 www sshd[27232]: Failed keyboard-interactive for users001 from 192.168.1.1 port 2438 ssh2
May 24 12:20:14 www sshd[27256]: Accepted password for users001 from 192.168.1.1 port 2445 ssh2

17
lib/util_sock.c:read_socket_data
我的機器也不時會出現耶..不過我查不是IP的問題...:(

18
引述: "paulso"
我是使用 denyhosts 來檔的, 不過唯一的缺點是要使用 python 2.3 或以上
centos 3.5 的 python 2.2 也不行, 需要 centos 4

所以其他的 server, 我自己寫了個 script, 定時把 /var/log/message authentication failure 的 ip 以 iptables 擋掉

我想要這個方法FTP的連線攻擊擋掉.可以給我參考嗎??

19
引述: "tony"
引述: "shinhrn"
qmail-1.05 + ucspi-tcp-0.88 + vpopmail-5.0.1 + courier-imap-1.5.1 + imap-2002.RC6
horde-2.2.5 + imp-3.2.3 + turba-1.2.2

以上是我的環境資料,請問我要設定使用者的信箱容量要重拿裡著手??
因為帳號是放在mysql裡自行控制.並沒有使用系統帳號耶..
所以不能使用 quota 作容量管理


嗯~
你可以直接用vpopmail來管quota就可以了.
另外小弟有一個疑問,不知為何你既然己用courier-imap了,但又為何又用imap-2002.RC6呢?那倒底是那一個Server來提供imap及pop3服務呢?


不好意思.vpopmail..我沒找到設定檔耶.
./configure  --enable-hardquota=52428800
只有configure時有hardquota..不知你說的是不是這個???

20
引述: "tony"
引述: "shinhrn"
qmail-1.05 + ucspi-tcp-0.88 + vpopmail-5.0.1 + courier-imap-1.5.1 + imap-2002.RC6
horde-2.2.5 + imp-3.2.3 + turba-1.2.2

以上是我的環境資料,請問我要設定使用者的信箱容量要重拿裡著手??
因為帳號是放在mysql裡自行控制.並沒有使用系統帳號耶..
所以不能使用 quota 作容量管理


嗯~
你可以直接用vpopmail來管quota就可以了.
另外小弟有一個疑問,不知為何你既然己用courier-imap了,但又為何又用imap-2002.RC6呢?那倒底是那一個Server來提供imap及pop3服務呢?

不好意思.那是前輩留下的資料我還在研究中...謝謝你的回答啦...

21
Linux 討論版 / 如何管制qmail的信箱容量??
« 於: 2006-11-02 13:47 »
qmail-1.05 + ucspi-tcp-0.88 + vpopmail-5.0.1 + courier-imap-1.5.1 + imap-2002.RC6
horde-2.2.5 + imp-3.2.3 + turba-1.2.2

以上是我的環境資料,請問我要設定使用者的信箱容量要重拿裡著手??
因為帳號是放在mysql裡自行控制.並沒有使用系統帳號耶..
所以不能使用 quota 作容量管理

22
Linux 討論版 / messge log中看不懂的訊息
« 於: 2006-11-01 15:33 »
引述: "longlife"
我試過 fc6, /etc/selinux/config 中 SELINUX=disabled 是有效的(reboot),
有人說無效,那您試過沒?

我也不知道阿..裝了一個月.只出過一次那種訊息.我也不知是什麼意思.所以off也不知有沒有效阿....ps:一定要reboot嗎??還有可以說一下下那是什麼意思嗎??謝謝啦..

23
Linux 討論版 / Re: messge log中看不懂的訊息
« 於: 2006-11-01 14:06 »
引述: "longlife"
引述: "shinhrn"
Oct 27 04:02:39 nat kernel: audit(1161892959.776:2): avc:  granted  { execstack } for  pid=28256 comm="ld-linux.so.2" scontext=user_u:system_r:unconfined_t:s0 tcontext=user_u:system_r:unconfined_t:s0 tclass=process

如果對 SELinux 不熟可以關閉它,否則就去 K SELinux。

/etc/selinux/config
SELINUX=disabled
不知對不對

因為看這篇中..有人說無效??http://phorum.study-area.org/viewtopic.php?t=41717&highlight=SELinux

24
Linux 討論版 / messge log中看不懂的訊息
« 於: 2006-11-01 11:41 »
昨天我的fc-5機器message 上出現了10幾行同樣的訊息.
我看不懂意思.也不知是拿支程式產生的.請問各位大大可以幫我解說一下嗎??謝謝...
Oct 27 04:02:39 nat kernel: audit(1161892959.776:2): avc:  granted  { execstack } for  pid=28256 comm="ld-linux.so.2" scontext=user_u:system_r:unconfined_t:s0 tcontext=user_u:system_r:unconfined_t:s0 tclass=process


這是令一台的log..這我也看不懂.... :oops:
Oct 11 14:22:17 fs01 kernel: usb-uhci.c: $Revision: 1.275 $ time 15:50:32 Oct 29 2003
Oct 11 14:52:52 fs01 kernel: Linux version 2.4.22-1.2115.nptl (bhcompile@daffy.perf.redhat.com) (gcc version 3.2.3 20030422 (Red Hat Linux 3.2.3-6)) #1 Wed Oct 29 15:42:51 EST 2003

25
Linux 討論版 / 請問一下關於irq6
« 於: 2006-10-20 14:59 »
因該正常吧..我的也看不到阿.

26
引述: "twu2"
不想換到 2.6, 就把 ram 加大, 把 max 的限制提高.

已調至81920了.因該夠用..只是不想紀錄5天了連接.根本用不到吧??
謝謝你的回答啦...
對了..順便一問  kernel 可以由 2.4 直接昇至 2.6??
會不會差太多??

27
引述: "twu2"
那個是一個 .o 檔吧. 如果你要研究, 至少去看 .c 的 source code.
netfilter 是 linux kernel 處理 nat, filter 的 module.

2.4 與 2.6 的版本是不一樣的. 自己看兩個版本的 source code 吧.

SO..那就是不行嘍??我還以為有雷.只是要設定.原來那個不是喔...
那只有升級喔??

28
引述: "twu2"
只有 kernel 2.6 的 netfilter 才有吧.

/lib/modules/2.4.18-3/kernel/net/ipv4/netfilter/iptable_filter.o
這個不是嗎??

29
解決 Linux NAT ip_conntrack: table full 的方法
============================
解決方法 (1): 加大 ip_conntrack_max 值
指令: cat /proc/sys/net/ipv4/ip_conntrack_max

解決方法 (2): 降低 ip_conntrack timeout 時間
重設 ip_conntrack_tcp_timeout_established (原值: 432000, 單位: 秒)
例如: echo "600" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established

==============================
其中第一個方法我試可以.

可是第2個方法.
bash: /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established: No such file or directory
只會show以上訊息.我查過 我的機器
2.4.18-3
2.4.22-1.2115.nptl
2.4.20-8
3個版本都沒有這個目錄耶
請問我是拿裡沒設到嗎??

30
Linux 討論版 / ucd-snmp的問題.
« 於: 2006-08-23 10:24 »
請教一個問題..

我使用ucd-snmp來繪製mrtg圖..
但是在log/messages裡面一直重複這些訊息
ucd-snmp[949]: Connection from 127.0.0.1
last message repeated 7 times
不知道要如何解決才可以讓這些訊息消失..
因為messgaes中都是這些訊息..無法看到其他的訊息..

謝謝..

頁: [1] 2