Is it possible to tunnel my whole linux machine through http proxy?

For some reason i access my internet through a HTTP proxy.

Is there a way to tunnel my whole Linux machine (currently am using ubuntu 18.04) through http proxy.

If i change proxy setting in the Ubuntu Network Settings the http proxy only works on the browsers. Other apps are left out.

My current workaround is using a Linux VPN CLI which allows connecting through a http_proxy then tunnel the whole machine through VPN traffic (a service i really dont need)…this is also a bit costly since i have to pay for the VPN.

I am guessing using stunnel might work since i noted Linux VPN CLI use stunnel??

SharePoint Designer 2013 Workflow HTTP Web Service on POST: Error – The given key was not present in the dictionary

Thank you for reading this. This is a bit long, but I’m trying to be as detailed as possible. Any help would be greatly appreciated. If more info is needed, please let me know. As info, I am not a (JavaScript) developer. I’ve been tasked to do as many things as possible OOTB.

Environment: SharePoint Online and SharePoint Designer 2013 (for workflows).

Scenario: Have a Team Site and a Subsite to it. When an item is added to a Custom List in the Subsite, the workflow is to find the matching task in the Task List on the Parent Site and mark the Task Status as “Completed”. (A variable is created in the workflow to match the item added to the list with the task.)

Success: Using the HTTP Web Service action to GET Task items via the Workflow. Evidenced by logging the response in a custom list using Create Item in List workflow action.

Issue: Using POST to add or update a Task to the task list. Continue to get the error {“error”:{“code”:”-1, System.Collections.Generic.KeyNotFoundException”,”message”:{“lang”:”en-US”,”value”:”The given key was not present in the dictionary.”}}}

Pre-conditions: Because we were going between site and subsite, we followed the articles to create elevated workflow permissions for use of the App Step. Did this on both the site and subsite. https://msdn.microsoft.com/en-us/library/office/jj822159.aspx, http://www.fabiangwilliams.com/2014/06/19/gotcha-on-sharepoint-designer-workflows-in-app-step/

Because this error seems to sometimes be illusive, decided to create the workflow on lists within the same Team Site to remove any possibility of authorization issue. Therefore the example shown below is not using APP Steps.

Trouble-shooting: Used Fiddler with Chrome to walk through and did not receive any errors. https://cann0nf0dder.wordpress.com/2016/09/12/getting-fiddler-to-work-with-sharepoint-online/. Viewed many, many articles also.

Workflow:

  1. Hard-coded a Variable = TempMatchString to match with a value in the Task List to bring back specific Task(s). Ignore first two lines of the workflow – will be used once the issue is resolved.

enter image description here

  1. Get Matching Task(s)

    • Build GET_RequestHeader Dictionary. Accept = application/json;odata=verbose as String and Content-Type = application/json;odata=verbose as String

    • Perform the GET HTTP Web Service request with URL: https://mycompany.sharepoint.com/HumanResourcesTS/_api/web/lists/getByTitle('ProgressReportTasks')/Items?$ filter=(Title eq [%Variable:TempMatchString%]

    • Create Item in the SPListGETContent list to view the response.

    • Store the array returned in Variable “ListDataSet”. Note: I am using Get valueinstead of d/results. If I do the GET Call from the subsite I get the JSON returned with d/results as seen in most all articles online, but value when used on the parent site. I am not sure why this differs.

    • Count to number of items returned. enter image description here
  2. Get FormDigestValue

Read several articles stating need to set the X-RequestDigest to the FormDigestValue to POST.

  • Build ContextHeaders Dictionary. Accept = application/json;odata=verbose as String and Content-Type = application/json;odata=verbose as String
  • Perform the POST HTTP Web Service request with URL: https://mycompany.sharepoint.com/HumanResourcesTS/_api/contextinfo
  • Create Item in the SPListGETContent list to view the response
  • Get the FormDigestValue and store it as a Variable = digestValue enter image description here

    1. Add Task (ERROR occurs here)
  • Build ADD_Request Header dictionary. Accept = application/json;odata=verbose as String and Content-Type = application/json;odata=verbose as String and X-RequestDigest = [%Variable: digestValue%] as String
  • Build ADD_Metadata dictionary. Type = SP.Data.ProgresReportTasksListItem as String where “ProgressReportTasks” is the list name.
  • Build ADD_Parameters dictionary. __metadata = [%Variable: ADD_Metadata%] as String and Title = Created by WF on Parent Site as String
  • Perform the POST HTTP Web Service request with URL: https://mycompany.sharepoint.com/HumanResourcesTS/_api/web/lists/getByTitle('ProgressReportTasks')/Items

    Set the Properties to ensure the RequestHeaders, ResponseContent, and ResponseStatus Code were set to the correct Variables.

  • Write the responseContent to the SPListGETContent list. Get: {“error”:{“code”:”-1, System.Collections.Generic.KeyNotFoundException”,”message”:{“lang”:”en-US”,”value”:”The given key was not present in the dictionary.”}}}
  • Write the ResponseStatusCode to the SPListGetConent list. Get: InternalServerError enter image description here

    1. Update Task (ERROR occurs here)
  • Build POST_Request Header dictionary. All set as String. Accept = application/json;odata=verbose and Content-Type = application/json;odata=verbose and X-RequestDigest = [%Variable: digestValue%] X-HTTP-Method = MERGE (NOTE: Also tried PATCH) IF-MATCH = * Content-Length = 0
  • Build POST_Metadata dictionary. Type = SP.Data.ProgresReportTasksListItem as String where “ProgressReportTasks” is the list name.
  • Build POST_Parameters dictionary. __metadata = [%Variable: ADD_Metadata%] as String and Title = Updated by WF on Parent Site as String
  • Perform the POST HTTP Web Service request with URL: https://mycompany.sharepoint.com/HumanResourcesTS/_api/web/lists/getByTitle(‘ProgressReportTasks’) /Items(22). Hardcoded the Item ID for this first round of testing.

    Set the Properties to ensure the RequestHeaders, ResponseContent, and ResponseStatus Code were set to the correct Variables.

  • Write the responseContent to the SPListGETContent list. Get: {“error”:{“code”:”-1, System.Collections.Generic.KeyNotFoundException”,”message”:{“lang”:”en-US”,”value”:”The given key was not present in the dictionary.”}}}
  • Write the ResponseStatusCode to the SPListGetConent list. Get: InternalServerError InternalServerError enter image description here

Thank you!!

http file upload straight to the database (php library)

I need a php library that writes file straight to the database. The content of this file are people records (name/surnamr/dob etc).

I found few libraries that kinda does the job, but instead of writing to the database it writes to the disk:

  • Tus
  • Gargron/fileupload

None of the above have the option to write the file straight to the database. is there a php library out there that writes straight to the database?

This library needs to:

  • Write file content in chucks
  • write the content to db

By writing the file to the database, I mean read and write its content to the database without having to write the file to the disk first.

I am Adding Permissions via HTTP but they are not Cascaded to the SubFolder/Items

Any ideas on what I need to add on here to make this cascade to all contents?

Thanks.

Method: POST

This is the Parent folder: ['body/ItemId']

URI:

/_api/web/lists/getByTitle('Documents')/items(@{outputs('Get_folder_metadata_using_path')?['body/ItemId']})/roleassignments/addroleassignment(principalid=@{variables('BSNA Field Visitors')},roleDefId=@{variables('Edit')}) 

HTTP request smuggling, basic TE.CL vulnerability

Im trying to learn about http request smuggling and Im trying out the labs for burp suite. Im stuck on the TE.CL vulnerability, Ive clicked on the solution (see below:https://portswigger.net/web-security/request-smuggling/lab-basic-te-cl) but the request just times out. Ive disabled ‘update content length’ and changed out mylabid with the current lab id. Is there another setting I am missing?

POST / HTTP/1.1 Host: mylabid.web-security-academy.net Content-Type: application/x-www-form-urlencoded Content-Length: 4 Transfer-Encoding: chunked  5c GPOST / HTTP/1.1 Content-Type: application/x-www-form-urlencoded Content-Length: 15  x=1 0\r\n\r\n