From: kiri_feather Date: Thu, 2 Dec 2010 10:18:32 +0000 (+0000) Subject: キー難読化 X-Git-Tag: Tween_v0.9.7.1-beta~64 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=78bad90a3eaf4dd65eb9f950b68420adf45880c9;p=opentween%2Fopen-tween.git キー難読化 非公式RT仕様戻し USイベント判定ミス修正 git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@1152 e39ad16e-3079-482e-bb30-4b4d378143b6 --- diff --git a/Tween/Connection/HttpTwitter.vb b/Tween/Connection/HttpTwitter.vb index 95b770a9..c45942c5 100644 --- a/Tween/Connection/HttpTwitter.vb +++ b/Tween/Connection/HttpTwitter.vb @@ -10,13 +10,12 @@ Public Class HttpTwitter ''' '''OAuthのコンシューマー鍵 ''' - Private Const ConsumerKey As String = "iOQHfiCUsyOyamW8JJ8jg" + Private Const ConsumerKey As String = "tLbG3uS0BIIE8jm1mKzKOfZ6EgUOmWVM" ''' '''OAuthの署名作成用秘密コンシューマーデータ ''' - Private Const ConsumerSecret As String = "5PS2oa5f2VaKMPrlZa7DTbz0aFULKd3Ojxqgsm142Dw" - + Private Const ConsumerSecret As String = "M0IMsbl2722iWa+CGPVcNeQmE+TFpJk8B/KW9UUTk3eLOl9Ij005r52JNxVukTzM" ''' '''OAuthのアクセストークン取得先URI ''' @@ -51,7 +50,7 @@ Public Class HttpTwitter tks = accessTokenSecret un = username End If - con.Initialize(ConsumerKey, ConsumerSecret, accessToken, accessTokenSecret, username, "screen_name") + con.Initialize(DecryptString(ConsumerKey), DecryptString(ConsumerSecret), accessToken, accessTokenSecret, username, "screen_name") httpCon = con connectionType = AuthMethod.OAuth End Sub diff --git a/Tween/Connection/TwitPic.vb b/Tween/Connection/TwitPic.vb index c9d04475..a578bcc1 100644 --- a/Tween/Connection/TwitPic.vb +++ b/Tween/Connection/TwitPic.vb @@ -9,12 +9,12 @@ Public Class TwitPic ''' '''OAuthのコンシューマー鍵 ''' - Private Const ConsumerKey As String = "iOQHfiCUsyOyamW8JJ8jg" + Private Const ConsumerKey As String = "tLbG3uS0BIIE8jm1mKzKOfZ6EgUOmWVM" ''' '''OAuthの署名作成用秘密コンシューマーデータ ''' - Private Const ConsumerSecretKey As String = "5PS2oa5f2VaKMPrlZa7DTbz0aFULKd3Ojxqgsm142Dw" + Private Const ConsumerSecretKey As String = "M0IMsbl2722iWa+CGPVcNeQmE+TFpJk8B/KW9UUTk3eLOl9Ij005r52JNxVukTzM" Private Const PostMethod As String = "POST" Private Const GetMethod As String = "GET" @@ -86,6 +86,6 @@ Public Class TwitPic Public Sub New(ByVal accessToken As String, ByVal accessTokenSecret As String) MyBase.New(New Uri("http://api.twitter.com/"), _ New Uri("https://api.twitter.com/1/account/verify_credentials.json")) - Initialize(ConsumerKey, ConsumerSecretKey, accessToken, accessTokenSecret, "") + Initialize(DecryptString(ConsumerKey), DecryptString(ConsumerSecretKey), accessToken, accessTokenSecret, "") End Sub End Class diff --git a/Tween/Connection/imgly.vb b/Tween/Connection/imgly.vb index a33f13a1..db285c68 100644 --- a/Tween/Connection/imgly.vb +++ b/Tween/Connection/imgly.vb @@ -9,12 +9,12 @@ Public Class imgly ''' '''OAuthのコンシューマー鍵 ''' - Private Const ConsumerKey As String = "iOQHfiCUsyOyamW8JJ8jg" + Private Const ConsumerKey As String = "tLbG3uS0BIIE8jm1mKzKOfZ6EgUOmWVM" ''' '''OAuthの署名作成用秘密コンシューマーデータ ''' - Private Const ConsumerSecretKey As String = "5PS2oa5f2VaKMPrlZa7DTbz0aFULKd3Ojxqgsm142Dw" + Private Const ConsumerSecretKey As String = "M0IMsbl2722iWa+CGPVcNeQmE+TFpJk8B/KW9UUTk3eLOl9Ij005r52JNxVukTzM" Private Const PostMethod As String = "POST" Private Const GetMethod As String = "GET" @@ -84,6 +84,6 @@ Public Class imgly Public Sub New(ByVal accessToken As String, ByVal accessTokenSecret As String) MyBase.New(New Uri("http://api.twitter.com/"), _ New Uri("https://api.twitter.com/1/account/verify_credentials.json")) - Initialize(ConsumerKey, ConsumerSecretKey, accessToken, accessTokenSecret, "") + Initialize(DecryptString(ConsumerKey), DecryptString(ConsumerSecretKey), accessToken, accessTokenSecret, "") End Sub End Class diff --git a/Tween/Connection/yfrog.vb b/Tween/Connection/yfrog.vb index 35d8db0d..874697c1 100644 --- a/Tween/Connection/yfrog.vb +++ b/Tween/Connection/yfrog.vb @@ -10,12 +10,12 @@ Public Class yfrog ''' '''OAuthのコンシューマー鍵 ''' - Private Const ConsumerKey As String = "iOQHfiCUsyOyamW8JJ8jg" + Private Const ConsumerKey As String = "tLbG3uS0BIIE8jm1mKzKOfZ6EgUOmWVM" ''' '''OAuthの署名作成用秘密コンシューマーデータ ''' - Private Const ConsumerSecretKey As String = "5PS2oa5f2VaKMPrlZa7DTbz0aFULKd3Ojxqgsm142Dw" + Private Const ConsumerSecretKey As String = "M0IMsbl2722iWa+CGPVcNeQmE+TFpJk8B/KW9UUTk3eLOl9Ij005r52JNxVukTzM" Private Const PostMethod As String = "POST" Private Const GetMethod As String = "GET" @@ -88,6 +88,6 @@ Public Class yfrog Public Sub New(ByVal accessToken As String, ByVal accessTokenSecret As String) MyBase.New(New Uri("http://api.twitter.com/"), _ New Uri("https://api.twitter.com/1/account/verify_credentials.xml")) - Initialize(ConsumerKey, ConsumerSecretKey, accessToken, accessTokenSecret, "") + Initialize(DecryptString(ConsumerKey), DecryptString(ConsumerSecretKey), accessToken, accessTokenSecret, "") End Sub End Class diff --git a/Tween/Tween.vb b/Tween/Tween.vb index 01ac69bd..5f5b9183 100644 --- a/Tween/Tween.vb +++ b/Tween/Tween.vb @@ -8430,7 +8430,7 @@ RETRY: End If 'その他のリンク(@IDなど)を置き換える - status = Regex.Replace(status, "@[^""]+)""[^>]*>(?[^<]+)", "${url}") + status = Regex.Replace(status, "@[^""]+)""[^>]*>(?[^<]+)", "@${url}") 'ハッシュタグ status = Regex.Replace(status, "[^""]+)""[^>]*>(?[^<]+)", "${link}") '
タグ除去 diff --git a/Tween/Tween.vbproj b/Tween/Tween.vbproj index f866dc72..a2a727ee 100644 --- a/Tween/Tween.vbproj +++ b/Tween/Tween.vbproj @@ -77,6 +77,8 @@ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 false false + + true diff --git a/Tween/Twitter.vb b/Tween/Twitter.vb index 413ea779..31b6ccb9 100644 --- a/Tween/Twitter.vb +++ b/Tween/Twitter.vb @@ -2821,8 +2821,8 @@ Public Class Twitter Exit Sub ElseIf xElm.Element("event") IsNot Nothing Then Debug.Print("event: " + xElm.Element("event").Value) - If Array.IndexOf(EventNameTable, xElm.Element("event").Name.LocalName) = -1 Then - TraceOut("Unknown Event:" + xElm.Element("event").Name.LocalName + Environment.NewLine + line) + If Array.IndexOf(EventNameTable, xElm.Element("event").Value) = -1 Then + TraceOut("Unknown Event:" + xElm.Element("event").Value + Environment.NewLine + line) End If Exit Sub ElseIf xElm.Element("direct_message") IsNot Nothing Then