[Tween-svn] [1152] キー難読化

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 12月 2日 (木) 19:18:32 JST


Revision: 1152
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1152
Author:   kiri_feather
Date:     2010-12-02 19:18:32 +0900 (Thu, 02 Dec 2010)

Log Message:
-----------
キー難読化
非公式RT仕様戻し
USイベント判定ミス修正

Modified Paths:
--------------
    trunk/Tween/Connection/HttpTwitter.vb
    trunk/Tween/Connection/TwitPic.vb
    trunk/Tween/Connection/imgly.vb
    trunk/Tween/Connection/yfrog.vb
    trunk/Tween/Tween.vb
    trunk/Tween/Tween.vbproj
    trunk/Tween/Twitter.vb


-------------- next part --------------
Modified: trunk/Tween/Connection/HttpTwitter.vb
===================================================================
--- trunk/Tween/Connection/HttpTwitter.vb	2010-12-02 06:15:02 UTC (rev 1151)
+++ trunk/Tween/Connection/HttpTwitter.vb	2010-12-02 10:18:32 UTC (rev 1152)
@@ -10,13 +10,12 @@
     '''<summary>
     '''OAuthのコンシューマー鍵
     '''</summary>
-    Private Const ConsumerKey As String = "iOQHfiCUsyOyamW8JJ8jg"
+    Private Const ConsumerKey As String = "tLbG3uS0BIIE8jm1mKzKOfZ6EgUOmWVM"
 
     '''<summary>
     '''OAuthの署名作成用秘密コンシューマーデータ
     '''</summary>
-    Private Const ConsumerSecret As String = "5PS2oa5f2VaKMPrlZa7DTbz0aFULKd3Ojxqgsm142Dw"
-
+    Private Const ConsumerSecret As String = "M0IMsbl2722iWa+CGPVcNeQmE+TFpJk8B/KW9UUTk3eLOl9Ij005r52JNxVukTzM"
     '''<summary>
     '''OAuthのアクセストークン取得先URI
     '''</summary>
@@ -51,7 +50,7 @@
             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

Modified: trunk/Tween/Connection/TwitPic.vb
===================================================================
--- trunk/Tween/Connection/TwitPic.vb	2010-12-02 06:15:02 UTC (rev 1151)
+++ trunk/Tween/Connection/TwitPic.vb	2010-12-02 10:18:32 UTC (rev 1152)
@@ -9,12 +9,12 @@
     '''<summary>
     '''OAuthのコンシューマー鍵
     '''</summary>
-    Private Const ConsumerKey As String = "iOQHfiCUsyOyamW8JJ8jg"
+    Private Const ConsumerKey As String = "tLbG3uS0BIIE8jm1mKzKOfZ6EgUOmWVM"
 
     '''<summary>
     '''OAuthの署名作成用秘密コンシューマーデータ
     '''</summary>
-    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 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

Modified: trunk/Tween/Connection/imgly.vb
===================================================================
--- trunk/Tween/Connection/imgly.vb	2010-12-02 06:15:02 UTC (rev 1151)
+++ trunk/Tween/Connection/imgly.vb	2010-12-02 10:18:32 UTC (rev 1152)
@@ -9,12 +9,12 @@
     '''<summary>
     '''OAuthのコンシューマー鍵
     '''</summary>
-    Private Const ConsumerKey As String = "iOQHfiCUsyOyamW8JJ8jg"
+    Private Const ConsumerKey As String = "tLbG3uS0BIIE8jm1mKzKOfZ6EgUOmWVM"
 
     '''<summary>
     '''OAuthの署名作成用秘密コンシューマーデータ
     '''</summary>
-    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 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

Modified: trunk/Tween/Connection/yfrog.vb
===================================================================
--- trunk/Tween/Connection/yfrog.vb	2010-12-02 06:15:02 UTC (rev 1151)
+++ trunk/Tween/Connection/yfrog.vb	2010-12-02 10:18:32 UTC (rev 1152)
@@ -10,12 +10,12 @@
     '''<summary>
     '''OAuthのコンシューマー鍵
     '''</summary>
-    Private Const ConsumerKey As String = "iOQHfiCUsyOyamW8JJ8jg"
+    Private Const ConsumerKey As String = "tLbG3uS0BIIE8jm1mKzKOfZ6EgUOmWVM"
 
     '''<summary>
     '''OAuthの署名作成用秘密コンシューマーデータ
     '''</summary>
-    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 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

Modified: trunk/Tween/Tween.vb
===================================================================
--- trunk/Tween/Tween.vb	2010-12-02 06:15:02 UTC (rev 1151)
+++ trunk/Tween/Tween.vb	2010-12-02 10:18:32 UTC (rev 1152)
@@ -8430,7 +8430,7 @@
         End If
 
         'その他のリンク(@IDなど)を置き換える
-        status = Regex.Replace(status, "@<a target=""_self"" href=""https?://twitter.com/(#!/)?(?<url>[^""]+)""[^>]*>(?<link>[^<]+)</a>", "${url}")
+        status = Regex.Replace(status, "@<a target=""_self"" href=""https?://twitter.com/(#!/)?(?<url>[^""]+)""[^>]*>(?<link>[^<]+)</a>", "@${url}")
         'ハッシュタグ
         status = Regex.Replace(status, "<a target=""_self"" href=""(?<url>[^""]+)""[^>]*>(?<link>[^<]+)</a>", "${link}")
         '<br>タグ除去

Modified: trunk/Tween/Tween.vbproj
===================================================================
--- trunk/Tween/Tween.vbproj	2010-12-02 06:15:02 UTC (rev 1151)
+++ trunk/Tween/Tween.vbproj	2010-12-02 10:18:32 UTC (rev 1152)
@@ -77,6 +77,8 @@
     <WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
     <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+    <DefineConstants>
+    </DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
     <DebugSymbols>true</DebugSymbols>

Modified: trunk/Tween/Twitter.vb
===================================================================
--- trunk/Tween/Twitter.vb	2010-12-02 06:15:02 UTC (rev 1151)
+++ trunk/Tween/Twitter.vb	2010-12-02 10:18:32 UTC (rev 1152)
@@ -2821,8 +2821,8 @@
                 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



Tween-svn メーリングリストの案内
Back to archive index