My source code is as below. I get an error when trying to debug and I can't solve this error in any way.
Please enlighten me with your knowledge, masters.
Error BC32022 Public Shared Event ResponseHeadersAvailable As SessionStateHandler' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
Error BC32022 Public Shared Event BeforeResponse As SessionStateHandler' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
![Name: 3PfLBg5.jpg
Views: 27
Size: 14.2 KB]()
My Source Code:
Please enlighten me with your knowledge, masters.
Quote:
Error BC32022 Public Shared Event ResponseHeadersAvailable As SessionStateHandler' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
Error BC32022 Public Shared Event BeforeResponse As SessionStateHandler' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
My Source Code:
Code:
Imports Fiddler
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Threading.Tasks
Namespace FiddlerCore_ModifyResponse
Class Program
Private Shared Async Function Main(ByVal args As String()) As Task
FiddlerApplication.Prefs.SetBoolPref("fiddler.certmaker.bc.Debug", True)
Dim certProvider As BCCertMaker.BCCertMaker = New BCCertMaker.BCCertMaker()
CertMaker.oCertProvider = certProvider
'THERE IS A PROBLEM
FiddlerApplication.ResponseHeadersAvailable += AddressOf FiddlerApplication_ResponseHeadersAvailable
Fiddler.FiddlerApplication.BeforeResponse += AddressOf FiddlerApplication_BeforeResponse
If Not CertMaker.createRootCert() Then
Console.WriteLine("Unable to create cert for FiddlerCore.")
Return
End If
If Not CertMaker.trustRootCert() Then
Console.WriteLine("Unable to install FiddlerCore's cert.")
Return
End If
Dim startupSettings As FiddlerCoreStartupSettings = New FiddlerCoreStartupSettingsBuilder().ListenOnPort(8887).DecryptSSL().RegisterAsSystemProxy().Build()
FiddlerApplication.Startup(startupSettings)
Console.ReadKey()
FiddlerApplication.Shutdown()
End Function
Private Shared Sub FiddlerApplication_BeforeResponse(ByVal oSession As Session)
If oSession.fullUrl.Contains("raw.githubusercontent.com/3xynos/Valorous/main/zortlattim") AndAlso oSession.HTTPMethodIs("GET") Then
oSession.bBufferResponse = True
oSession.utilDecodeResponse()
oSession.utilDecodeResponse()
Dim oBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes)
oBody = "Dnspy Adamdır [1]!"
oSession.utilSetResponseBody(oBody)
End If
End Sub
Private Shared Sub FiddlerApplication_BeforeResponse2(ByVal oSession2 As Session)
If oSession2.fullUrl.Contains("raw.githubusercontent.com/3xynos/Valorous/main/update") AndAlso oSession2.HTTPMethodIs("GET") Then
oSession2.bBufferResponse = True
oSession2.utilDecodeResponse()
oSession2.utilDecodeResponse()
Dim oBody2 = System.Text.Encoding.UTF8.GetString(oSession2.responseBodyBytes)
oBody2 = "Dnspy Adamdır [2]!"
oSession2.utilSetResponseBody(oBody2)
End If
End Sub
Private Shared Sub FiddlerApplication_ResponseHeadersAvailable(ByVal oSession As Session)
If oSession.fullUrl.Contains("testsite.com/test1.php") Then
oSession.bBufferResponse = True
End If
End Sub
Private Shared Sub FiddlerApplication_ResponseHeadersAvailable2(ByVal oSession As Session)
If oSession.fullUrl.Contains("testsite.com/test2.php") Then
oSession.bBufferResponse = True
End If
End Sub
End Class
End Namespace