diff --git a/2chAPIProxy/DatProxy.cs b/2chAPIProxy/DatProxy.cs index a72ad39..827e26f 100644 --- a/2chAPIProxy/DatProxy.cs +++ b/2chAPIProxy/DatProxy.cs @@ -1129,6 +1129,8 @@ private void ResPostv2(Session oSession, bool is2ch) false => Encoding.GetEncoding("Shift_JIS") }; + //ReqBody += "&sid=Monazilla/2.00:08urgq8vn478951437vn89574389v7843y584vht"; + // リクエストボディの分解(URLデコードもしておく) var post_field_map = ReqBody.Split('&') .Select(kvpair => kvpair.Split('=')) @@ -1184,7 +1186,7 @@ private void ResPostv2(Session oSession, bool is2ch) if (m.Success) { // クッキーにある場合(一般ブラウザ、sikiなど?) - // クッキーはsid=xxxxの形で保存されてる + // クッキーはsid=xxxxの形で保存されてる(はず Write.Headers.Add("X-Ronin-Sid", m.Value); } } diff --git a/2chAPIProxy/MainWindow.xaml b/2chAPIProxy/MainWindow.xaml index 084ab2c..6dcfa9f 100644 --- a/2chAPIProxy/MainWindow.xaml +++ b/2chAPIProxy/MainWindow.xaml @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:_2chAPIProxy" mc:Ignorable="d" x:Class="_2chAPIProxy.MainWindow" - Title="2chAPIProxy Ver:2022.04.12 test" Height="480" Width="640" + Title="2chAPIProxy Ver:2022.04.25 test" Height="480" Width="640" Icon="icon3.ico" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" Background="White" d:DataContext="{d:DesignInstance {x:Type local:ViewModel}}"> diff --git a/2chAPIProxy/ViewModels/ViewModel.cs b/2chAPIProxy/ViewModels/ViewModel.cs index f8c8c06..5e4cbde 100644 --- a/2chAPIProxy/ViewModels/ViewModel.cs +++ b/2chAPIProxy/ViewModels/ViewModel.cs @@ -206,6 +206,7 @@ public void Init() DatProxy.AddMsToNonce = AddMsToNonce; DatProxy.AssumeReqBodyIsUTF8 = AssumeReqBodyIsUTF8; DatProxy.Monakey = Setting.Monakey; + if (string.IsNullOrEmpty(Setting.Monakey)) DatProxy.ResetMonakey(); //設定の適用、APIアクセスクラス DatProxy.APIMediator.AppKey = this.Appkey; diff --git "a/doc/\346\233\270\343\201\215\350\276\274\343\201\277\346\226\260\344\273\225\346\247\230\351\226\242\351\200\243.md" "b/doc/\346\233\270\343\201\215\350\276\274\343\201\277\346\226\260\344\273\225\346\247\230\351\226\242\351\200\243.md" index b1f1a33..d2c439a 100644 --- "a/doc/\346\233\270\343\201\215\350\276\274\343\201\277\346\226\260\344\273\225\346\247\230\351\226\242\351\200\243.md" +++ "b/doc/\346\233\270\343\201\215\350\276\274\343\201\277\346\226\260\344\273\225\346\247\230\351\226\242\351\200\243.md" @@ -1112,4 +1112,55 @@ Content-Encoding: Content-Type:text/html; charset=Shift_JIS Date:Sun, 10 Apr 2022 17:24:14 GMT Server:cloudflare +``` + +# X-Ronin-Sidに適当な値を入れて送ったとき + + +``` +オリジナルリクエストヘッダ +Host:egg.5ch.net +User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 +Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 +Accept-Language:ja,en-US;q=0.7,en;q=0.3 +Accept-Encoding:gzip, deflate +Referer:http://egg.5ch.net/test/read.cgi/software/1650247139/ +Upgrade-Insecure-Requests:1 +Content-Type:application/x-www-form-urlencoded +Content-Length:140 +Connection:keep-alive + +リクエストヘッダ +Referer:https://egg.5ch.net/test/read.cgi/software/1650247139/ +X-PostSig:fbaaf4d2fe631152d34030a9253862e669768f6365ad933f43851e42242b961e +X-APIKey:8yoeAcaLXiEY1FjEuJBKgkPxirkDqn +X-PostNonce:1650792234.765 +X-MonaKey:b1fd22457df0fc0d096dbeb719f15a006449599cb5d181e0d90bdc382c91f964 +X-2ch-UA:2chMate/0.8.10.153 +X-Ronin-Sid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +User-Agent:Monazilla/1.00 2chMate/0.8.10.153 Dalvik/2.1.0 (Linux; U; Android 11; SC-52B Build/RP1A.200720.012; 60) +Accept-Encoding:gzip +Content-Type:application/x-www-form-urlencoded; charset=UTF-8 +Host:egg.5ch.net +Content-Length:148 +Connection:Keep-Alive + +レスポンスヘッダ +Connection:close +X-InqID:egg/700dcc7c3d368344; +X-Robots-Tag:noindex; +X-Chx-Error:6200 Invalid RONIN SID; +X-PostPlace:software/1650247139 +X-RONIN-Stat:NONE +X-Condition:0/0 +X-Proc-Time:0.124839 sec. +X-BBx-Stat:180.60.38.129, NONE +Vary:Accept-Encoding +CF-Cache-Status:DYNAMIC +Expect-CT:max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" +CF-RAY:700dcc7c3d368344-KIX +Content-Encoding: +Content-Type:text/html; charset=Shift_JIS +Date:Sun, 24 Apr 2022 09:26:42 GMT +Server:cloudflare ``` \ No newline at end of file