Wednesday, April 12, 2017

Hi! I said No! No! No more computing for a while....shit....I'm back to computing (everything in security is computing Elsa grow up!, So, I have here something it looks like the bird shitting on the cables corrosive shit :) Ok why am I doing this again, because industrial systems might have several SCADA type, let's imagine that the energy grid has this CANopen network (control system for multiple microcontrollers ant their use in automation) and so the protocol is SoupSocket that actually "SoupSocket is libsoup's TCP socket type. While it is primarily intended for internal use, SoupSockets are exposed in the API in various places, and some of their methods (eg, soup_socket_get_remote_address()) may be useful to applications." but besides this link, take a look at the comment bellow

How to get SOAP Message From .svc file methood


  • kuttikrishnankodoth

    kuttikrishna...

    Member
    9 Points
    48 Posts

    How to get SOAP Message From .svc file methood

    Jul 20, 2011 08:51 AM|LINK
    Hai Team ,
    Iam trying to access the in coming Soap message HEADER from  the server side svc file methood , through Operation Contract  class but  iam not getting the  value , iam using
    MessageHeaders messageHeaders = OperationContext
    .Current.IncomingMessageHeaders;
    int headerIndex = messageHeaders.FindHeader("ClientID"""
    );
    XmlReader r = OperationContext
    .Current.IncomingMessageHeaders.GetReaderAtHeader(headerIndex).ReadSubtree();
    XElement data = XElement
    .Load(r);
    int id = (int
    )data;
    where the client id is added to the SOAP  Header Dynamically  like
    using (OperationContextScope scope = new OperationContextScope(obj.InnerChannel as IClientChannel
    ))
    {
    MessageHeader msgHeader = MessageHeader.CreateHeader("ClientID""""1098"true
    );
    OperationContext
    .Current.OutgoingMessageHeaders.Add(msgHeader);
    txtResult.Text = obj.AddTheValues(
    Convert.ToInt32(txtFirstNumber.Text), Convert
    .ToInt32(txtSecNumber.Text)).ToString();
    }
    but iam not getting the value
    please help


    Think #
  • Peter pi - MSFT

    Peter pi - M...

    Star
    12801 Points
    1763 Posts

    Re: How to get SOAP Message From .svc file methood

    Jul 22, 2011 02:36 AM|LINK
    Hi,

    At the client try using
    MessageHeader msgHeader = MessageHeader.CreateHeader("ClientID", "ns", "1098", false);
    Instead of
    MessageHeader msgHeader = MessageHeader.CreateHeader("ClientID", "ns", "1098", true);
    and at the server try using
     int headerIndex = messageHeaders.FindHeader("ClientID", "ns");
    Instead of
    int headerIndex = messageHeaders.FindHeader("ClientID", "");
    Please refer to the following code snippet.
    class Client
        {
            static void Main()
            {
                // Create a client
                CalculatorClient client = new CalculatorClient();
                String RequestAction = "http://test/Message_RequestAction";
                using (new OperationContextScope(client.InnerChannel))
                {
                    // Call the Sum service operation.
                    int[] values = { 1, 2, 3, 4, 5 };
    
                    MessageHeader msgHeader = MessageHeader.CreateHeader("ClientID", "ns", "1098", false); OperationContext.Current.OutgoingMessageHeaders.Add(msgHeader);                 Message request = Message.CreateMessage(OperationContext.Current.OutgoingMessageHeaders.MessageVersion, RequestAction, values);
                    Message reply = client.ComputeSum(request);
                    int response = reply.GetBody();
    
                    Console.WriteLine("Sum of numbers passed (1,2,3,4,5,1098) = {0}", response);             }
    
                //Closing the client gracefully closes the connection and cleans up resources
                client.Close();
    
                Console.WriteLine();
                Console.WriteLine("Press  to terminate client.");
                Console.ReadLine();
            }
        }

        // Define a service contract.
        [ServiceContract(Namespace="http://Microsoft.Samples.Untyped")]
        public interface ICalculator
        {
            [OperationContract(Action = CalculatorService.RequestAction, ReplyAction = CalculatorService.ReplyAction)]
            Message ComputeSum(Message request);
        }
    
       
        // Service class which implements the service contract.
        public class CalculatorService : ICalculator
        {
            // Perform a calculation.
            public const String ReplyAction = "http://test/Message_ReplyAction";
            public const String RequestAction = "http://test/Message_RequestAction";
    
            public Message ComputeSum(Message request)
            {
                //The body of the message contains a list of numbers which will be read as a int[] using GetBody
                int result = 0;
    
                int[] inputs = request.GetBody<int[]>();
                foreach (int i in inputs)
                {
                    result += i;
                }
    
      MessageHeaders messageHeaders = OperationContext.Current.IncomingMessageHeaders; int headerIndex = messageHeaders.GetHeader("ClientID", "ns"); result += headerIndex;             Message response = Message.CreateMessage(request.Version, ReplyAction, result);
                return response;
            }
        }
    And maily focus on the bold font, hope this helps you.
    Best regards,
    Peter
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com
    Microsoft One Code Framework 
  • kuttikrishnankodoth

    kuttikrishna...

    Member
    9 Points
    48 Posts

    Re: How to get SOAP Message From .svc file methood

    Jul 22, 2011 05:10 AM|LINK
    hai peter ,
    here iam using a wcf exposed Methood some thing like
    public list GetEmployeedetails(int empid,out  string Result)
    {
    // logic goes here ..
    }
    in this case how come i get the   Message request inside the metood to get the items
    Thanks very much
    Think #
  • kuttikrishnankodoth

    kuttikrishna...

    Member
    9 Points
    48 Posts

    Re: How to get SOAP Message From .svc file methood

    Jul 23, 2011 04:39 AM|LINK
    i  DONE LIKE
     // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "MyTestService" in code, svc and config file together.
        public class MyTestService : IMyTestService
        {
            public int AddTheNumbers(int intA, int intB)
            {
                int intResult;
                string str = OperationContext.Current.RequestContext.RequestMessage.ToString();
                MessageHeaders messageHeaders = OperationContext.Current.IncomingMessageHeaders;
                string headerIndex = messageHeaders.GetHeader("ClientID", "ns");
               // result += headerIndex;             
               // Message response = Message.CreateMessage(request.Version, ReplyAction, result);
                //return response;
                ServiceManager objSM=new ServiceManager();
                 intResult=objSM.AddThenumbers(intA, intB);
              
                 return intResult;
            }
        }
    
    
    IN CLIENT SIDE
      protected void btnSum_Click(object sender, EventArgs e)
            {
                ServiceReference1.MyTestServiceClient objProxy = new ServiceReference1.MyTestServiceClient();
              
               
    
                using (new OperationContextScope(objProxy.InnerChannel))
                {
                    MessageHeader msgHeader = MessageHeader.CreateHeader("ClientID", "ns", "1098", false);
                    OperationContext.Current.OutgoingMessageHeaders.Add(msgHeader);
                    txtResult.Text = objProxy.AddTheNumbers(Convert.ToInt32(txtFirstNumber.Text), Convert.ToInt32(txtSecondNumber.Text)).ToString();
                }
                
            }
    NOW ITS WORKING FINE https://forums.asp.net/t/1701908.aspx?How+to+get+SOAP+Message+From+svc+file+methood+

Tuesday, April 11, 2017

Monday, April 10, 2017

Бюджетная GSM сигнализация

How to disable car alarm with/out removing anything

THIS IS UDGE GREAT (SOME HOT LOCK PICKING SET )

THE NEW EXCLUSIVE IMPRESSIONING KIT
THE NEW EXCLUSIVE IMPRESSIONING KIT
THE NEW EXCLUSIVE IMPRESSIONING KIT
THE NEW EXCLUSIVE IMPRESSIONING KIT
THE NEW EXCLUSIVE IMPRESSIONING KIT
THE NEW EXCLUSIVE IMPRESSIONING KIT
THE NEW EXCLUSIVE IMPRESSIONING KIT
THE NEW EXCLUSIVE IMPRESSIONING KIT
THE NEW EXCLUSIVE IMPRESSIONING KIT
THE NEW EXCLUSIVE IMPRESSIONING KIT
 The New Exclusive Impressioning Kit
The New Exclusive Impressioning Kit
This clever kit comprises a torch and a super light aluminium alloy hand vice.
The torch can output bright white LED or UV light. The body is constructed from strong corrosion resistant stainless steel. A key can be rotated a full 360 degrees and the powerful lens magnifies even the smallest of marks.
~


Starting a push button start car with a dead key fob or smart key battery.

Getting into a car with a dead key fob or smart key battery and a hidden...

How to use Almost ANY CDMA Android Phone on a GSM Network! APP : offline SIM APN database

Sunday, April 9, 2017

Combinations and Permutations Calculator

Question from Jessie, a student:
I need all of the 8 digit combinations using the numbers 1-20.
i.e. 1 2 3 4 5 6 7 8, 2 3 4 5 6 7 8 9 like wise
no number should be repeated in one combination.
Thanks

Find the number of combinations and/or permutations that result when you choose r elements from a set of n elements.
For help in using the calculator, read the Frequently-Asked Questions or review the Sample Problems.

  • Choose the goal of your analysis (i.e., to compute combinations or permutations).
  • Enter a value in each of the unshaded text boxes.
  • Click the Calculate button to display the result of your analysis.
Choose goal
Number of sample points in set ( n )
Number of sample points in each combination ( r )
Number of combinations (n things taken r at a time)

because of a very hard work I've been having years now...I discouvered that radioactive is also found on diazinon...so damm easy to get ....I know that we all had that concept of radiotherapy products, cancer medication, besides of course radioactive waste...however...this is as much radioactive as deuterium