연결된 서버 "SERVER_NAME"에 대한 OLE DB 공급자 "OraOLEDB.Oracle"의 인스턴스를 만들 수 없습니다. (Microsoft SQL Server, 오류: 7302) 도움말을 보려면 다음을 클릭하십시오:
이 사이트에서 해결책 확인
오라클 클라이언트 설치 후 SQLSERVER 재시작 해야됨.;;
연결된 서버 "SERVER_NAME"에 대한 OLE DB 공급자 "OraOLEDB.Oracle"의 인스턴스를 만들 수 없습니다. (Microsoft SQL Server, 오류: 7302) 도움말을 보려면 다음을 클릭하십시오:
Oct 11 11:27:54 mail vpopmail[27836]: vchkpw-pop3: vpopmail user not found admin12@domain.com:109.104.203.62
Oct 11 15:02:11 mail vpopmail[15277]: vchkpw-pop3: password fail (pass: 'e603f6c507b3993651f0439553584c50') acount@domain.com:110.70.15.59
#/bin/bash
help()
{
echo ""
echo "/var/log/maillog is default"
echo "iptable apply is not default"
echo "banCount 100 is default"
echo "-a : iptable applied"
echo "-f : maillog FILE PATH"
echo "-c : ban count"
echo ""
echo "Usae : $0 -a -c 100 -f /var/log/maillog "
exit 0
}
ignoreIPs=("222.222.222.222" "111.111.111.111")
maillog="/var/log/maillog"
banCount=100
fw=false
while getopts ac:f: opt
do
case $opt in
a)
fw=true
;;
c)
banCount=$OPTARG
;;
f)
maillog=$OPTARG
;;
*)
help
exit 0
;;
esac
done
banIPs=`grep -E 'user not found|password fail' ${maillog} | awk -F: '{print $NF}' | sort | uniq -dc | awk '{if ($1 > '"${banCount}"') print $NF}'`
for banIP in $banIPs
do
for ignoreIP in ${ignoreIPs[@]}
do
if [ $ignoreIP == $banIP ]
then
# echo "ignore IP: ${ignoreIP}"
# echo "ban IP : $banIP"
break
fi
done
echo "ban IP : $banIP ,whois : $(geoiplookup $banIP)"
if [ $fw = true ] ; then
iptables -A INPUT -s ${banIP}/24 -j DROP
fi
done
if [ $fw = true ] ; then
#remove duplicate iptables rules
#http://www.krazyworks.com/remove-duplicate-iptables-rules/
/sbin/service iptables save
/sbin/iptables-save | awk '!x[$0]++' > /tmp/iptables.conf
/sbin/iptables -F
/sbin/iptables-restore < /tmp/iptables.conf
/sbin/service iptables save
/sbin/service iptables restart
if [ -f /tmp/iptables.conf ] ; then /bin/rm -f /tmp/iptables.conf ; fi
fi
yum -y install mysql-devel
[root@localhost src]# find / -name mysql.h /usr/include/mysql/mysql.h
<!--#include virtual="/lgdacom/md5.asp" -->
<!--#include virtual="/Class/json2.asp"-->
<%
Class clsNaverOAuth
Private Sub Class_Initialize()
End Sub
private m_clientId
private m_clientSecret
private m_redirectUrl
private m_state
private m_session
private m_code '로그인 인증 요청 API 호출에 성공하고 리턴받은 인증코드값 (authorization code)
private m_refreshToken '갱신 때 필수 - 네이버 사용자 인증에 성공하고 발급받은 갱신 토큰(refresh token)
private m_accessToken '삭제 때 필수 - 기 발급받은 접근 토큰으로 URL 인코딩을 적용한 값을 사용
Public Property Get clientId()
clientId = m_clientId
End Property
Public Property Let clientId(value)
m_clientId = value
End Property
Public Property Get clientSecret()
clientSecret = m_clientSecret
End Property
Public Property Let clientSecret(value)
m_clientSecret = value
End Property
Public Property Get redirectUrl()
redirectUrl = m_redirectUrl
End Property
Public Property Let redirectUrl(value)
m_redirectUrl = value
End Property
Public Property Get state()
state = m_state
End Property
Public Property Let state(value)
m_state = value
End Property
Public Property Get session()
session = m_session
End Property
Public Property Let session(value)
m_session = value
End Property
Public Property Get refreshToken()
refreshToken = m_refreshToken
End Property
Public Property Let refreshToken(value)
m_refreshToken = value
End Property
Public Property Get accessToken()
accessToken = m_accessToken
End Property
Public Property Let accessToken(value)
m_accessToken = value
End Property
Public Property Get code()
code = m_code
End Property
Public Property Let code(value)
m_code = value
End Property
Public Property Get generate_state
Dim rand, mt, state,returnVal
Randomize
rand = Int((999999 * Rnd) + 111111)
mt = Timer
generate_state = md5( mt & rand )
End Property
Public Property Get authQueryString()
authQueryString = "response_type=code"
authQueryString = authQueryString + "&client_id=" + m_clientId
authQueryString = authQueryString + "&redirect_uri=" + Server.URLEncode(m_redirectUrl)
authQueryString = authQueryString + "&state=" + Server.URLEncode(m_state)
End Property
Public Property Get tokenAuthQueryString()
tokenAuthQueryString = "client_id=" + m_clientId
tokenAuthQueryString = tokenAuthQueryString + "&client_secret=" + m_clientSecret
tokenAuthQueryString = tokenAuthQueryString + "&grant_type=authorization_code"
tokenAuthQueryString = tokenAuthQueryString + "&state=" + m_state '발급시
tokenAuthQueryString = tokenAuthQueryString + "&code=" + m_code '발급시
End Property
Public Property Get tokenRefreshQueryString()
tokenRefreshQueryString = "client_id=" + m_clientId
tokenRefreshQueryString = tokenRefreshQueryString + "&client_secret=" + m_clientSecret
tokenRefreshQueryString = tokenRefreshQueryString + "&grant_type=refresh_token"
tokenRefreshQueryString = tokenRefreshQueryString + "&refresh_token=" + m_refreshToken '갱신시
End Property
Public Property Get tokenDeleteQueryString()
tokenDeleteQueryString = "client_id=" + m_clientId
tokenDeleteQueryString = tokenDeleteQueryString + "&client_secret=" + m_clientSecret
tokenDeleteQueryString = tokenDeleteQueryString + "&grant_type=delete"
tokenDeleteQueryString = tokenDeleteQueryString + "&access_token=" + m_accessToken '삭제시
tokenDeleteQueryString = tokenDeleteQueryString + "&service_provider=NAVER" '삭제시
End Property
Public Function httpRequest(url, AuthTkn)
Dim returnDic : Set returnDic = Server.CreateObject("Scripting.Dictionary")
Dim objXMLHTTP : Set objXMLHTTP = server.CreateObject("MSXML2.ServerXMLHTTP")
objXMLHTTP.setOption 2,13056 'ignore SSL errors
objXMLHTTP.Open "POST", url, false
If AuthTkn = "" Then
objXMLHTTP.setRequestHeader "Content-Type", "application/json;charset=UTF-8"
Else
objXMLHTTP.setRequestHeader "Content-Type", "application/xml"
objXMLHTTP.setRequestHeader "Authorization", AuthTkn
End If
objXMLHTTP.Send
If objXMLHTTP.status = 200 Then
'response.write(objXMLHTTP.responseText)
'response.end
Dim jsonstring : jsonstring = objXMLHTTP.responseText
Dim Info : set Info = JSON.parse(join(array(jsonstring)))
Dim key : for each key in Info.enumerate()
returnDic.Add key, Info.get(key)
next
Else
'에러처리
returnDic.Add "error", "status is not 200"
End if
Set httpRequest = returnDic
End Function
End Class
%>
<%@Language="VbScript"%>
<!--#include virtual="/Class/NaverOAuth.asp"-->
<%
Dim NAVER_CLIENT_ID : NAVER_CLIENT_ID = "네이버클라이언트ID"
Dim NAVER_SECRET_KEY : NAVER_SECRET_KEY = "네이버비밀키"
Dim NAVER_REDIRECT_PC_URL : NAVER_REDIRECT_PC_URL = "http://mysite.com/oauth/naver/callback.asp"
Dim NAVER_REDIRECT_MOB_URL : NAVER_REDIRECT_MOB_URL = "http://m.mysite.com/naverLogin/callback.asp"
Dim NAVER_OAUTH_AUTHORIZE_URL : NAVER_OAUTH_AUTHORIZE_URL = "https://nid.naver.com/oauth2.0/authorize"
Dim NAVER_OAUTH_TOKEN_URL : NAVER_OAUTH_TOKEN_URL = "https://nid.naver.com/oauth2.0/token"
Dim NAVER_GET_USER_INFO_URL : NAVER_GET_USER_INFO_URL = "https://openapi.naver.com/v1/nid/me"
Dim clsOAuth : Set clsOAuth = new clsNaverOAuth
Session("NAVER_STATE") = clsOAuth.generate_state
clsOAuth.clientId = NAVER_CLIENT_ID
clsOAuth.state = Session("NAVER_STATE")
clsOAuth.redirectUrl = NAVER_REDIRECT_PC_URL
Dim queryString : queryString = clsOAuth.authQueryString
Response.redirect NAVER_OAUTH_AUTHORIZE_URL & "?" & queryString
%>
<%@Language="VbScript"%>
<!--#include virtual="/Class/NaverOAuth.asp"-->
<%
Dim NAVER_CLIENT_ID : NAVER_CLIENT_ID = "네이버클라이언트ID"
Dim NAVER_SECRET_KEY : NAVER_SECRET_KEY = "네이버비밀키"
Dim NAVER_REDIRECT_PC_URL : NAVER_REDIRECT_PC_URL = "http://mysite.com/oauth/naver/callback.asp"
Dim NAVER_REDIRECT_MOB_URL : NAVER_REDIRECT_MOB_URL = "http://m.mysite.com/naverLogin/callback.asp"
Dim NAVER_OAUTH_AUTHORIZE_URL : NAVER_OAUTH_AUTHORIZE_URL = "https://nid.naver.com/oauth2.0/authorize"
Dim NAVER_OAUTH_TOKEN_URL : NAVER_OAUTH_TOKEN_URL = "https://nid.naver.com/oauth2.0/token"
Dim NAVER_GET_USER_INFO_URL : NAVER_GET_USER_INFO_URL = "https://openapi.naver.com/v1/nid/me"
Dim clsOAuth : Set clsOAuth = New clsNaverOAuth
Dim state : state = clsCom.CheckisTrim(Request.QueryString("state"))
Dim code : code = clsCom.CheckisTrim(Request.QueryString("code"))
Dim Error : Error = clsCom.CheckisTrim(Request.QueryString("error"))
Dim error_description : error_description = clsCom.CheckisTrim(Request.QueryString("error_description"))
If error <> "" Then
response.write("error")
response.write("<br>")
response.write(error)
response.write("<br>")
response.write(error_description)
response.end
End If
If Session("NAVER_STATE") <> state Then
response.write("인증 실패")
response.write("<br>")
response.write(Session("NAVER_STATE"))
response.write("<br>")
response.write(state)
response.write("<br>")
response.end
End If
'''===전송할 파라미터 지정
clsOAuth.clientId = NAVER_CLIENT_ID
clsOAuth.state = state
clsOAuth.clientSecret = NAVER_SECRET_KEY
clsOAuth.code = code
'Response.write( clsOAuth.tokenAuthQueryString & vbNewline)
Dim respInfo
Dim profileInfo
Dim authToken
'토큰 발급 요청
Set respInfo = clsOAuth.httpRequest(NAVER_OAUTH_TOKEN_URL &"?"& clsOAuth.tokenAuthQueryString,"")
If respInfo.Exists("error")=true Then
response.write("토큰 접속 요청 에러" & "<br>" )
response.write(respInfo.Item("error") & "<br>" )
Else
Session("NAVER_ACCESS_TOKEN") = respInfo.Item("access_token")
Session("NAVER_REFRESH_TOKEN") = respInfo.Item("refresh_token")
response.write(Session("NAVER_ACCESS_TOKEN") & "<br>" )
response.write(Session("NAVER_REFRESH_TOKEN") & "<br>" )
'프로필 정보 조회
authToken = respInfo.Item("token_type") &" "& respInfo.Item("access_token")
Set profileInfo = clsOAuth.httpRequest(NAVER_GET_USER_INFO_URL, authToken)
If profileInfo.Item("resultcode") = 00 Then
Dim key : for each key in profileInfo.Item("response").enumerate()
response.write(key & " : " & profileInfo.Item("response").get(key) & "<br>" )
next
Else
response.write("프로필 조회 요청 에러" & "<br>" )
response.write(profileInfo.Item("resultcode") & "<br>" )
response.write(profileInfo.Item("message") & "<br>" )
End If
End If
'Session 등록이 클래스 안에서 안됨.
'objXMLHTTP.Send 파라미터로 요청 하려고 했으나, 요청이 잘못 됐다는 에러메시지가 계속 나옴.
%>