Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pywsus.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ def do_GET(self):
logging.info("Requested: {path}".format(path=self.path))

self._set_response(True)
self.wfile.write(update_handler.executable)
try:
self.wfile.write(update_handler.executable)
except (ConnectionResetError, BrokenPipeError):
logging.debug("Connection reset during EXE send (BITS probe, normal)")

def do_POST(self):

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
beautifulsoup4==4.9.1
lxml==4.6.2
lxml>=4.9.2
soupsieve==2.0.1
2 changes: 1 addition & 1 deletion resources/get-config.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetConfigResponse xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService"><GetConfigResult><LastChange>{lastChange}</LastChange><IsRegistrationRequired>false</IsRegistrationRequired><AuthInfo><AuthPlugInInfo><PlugInID>Anonymous</PlugInID><ServiceUrl/><Parameter/></AuthPlugInInfo></AuthInfo><Properties/></GetConfigResult></GetConfigResponse></s:Body></s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetConfigResponse xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService"><GetConfigResult><LastChange>{lastChange}</LastChange><IsRegistrationRequired>false</IsRegistrationRequired><AuthInfo><AuthPlugInInfo><PlugInID>Anonymous</PlugInID><ServiceUrl/><Parameter/></AuthPlugInInfo></AuthInfo><Properties><ConfigurationProperty><Name>ProtocolVersion</Name><Value>3.2</Value></ConfigurationProperty><ConfigurationProperty><Name>MaxExtendedUpdatesPerRequest</Name><Value>20</Value></ConfigurationProperty><ConfigurationProperty><Name>IsInventoryRequired</Name><Value>0</Value></ConfigurationProperty><ConfigurationProperty><Name>ClientReportingLevel</Name><Value>2</Value></ConfigurationProperty></Properties></GetConfigResult></GetConfigResponse></s:Body></s:Envelope>
2 changes: 1 addition & 1 deletion resources/sync-updates.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w4.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SyncUpdatesResponse xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService"><SyncUpdatesResult><NewUpdates><UpdateInfo><ID>{revision_id1}</ID><Deployment><ID>{deployment_id1}</ID><Action>Install</Action><IsAssigned>true</IsAssigned><LastChangeTime>2020-02-29</LastChangeTime><AutoSelect>0</AutoSelect><AutoDownload>0</AutoDownload><SupersedenceBehavior>0</SupersedenceBehavior></Deployment><IsLeaf>true</IsLeaf><Xml>&lt;UpdateIdentity UpdateID="{uuid1}" RevisionNumber="204" /&gt;&lt;Properties UpdateType="Software" ExplicitlyDeployable="true" AutoSelectOnWebSites="true" /&gt;&lt;Relationships&gt;&lt;Prerequisites&gt;&lt;AtLeastOne IsCategory="true"&gt;&lt;UpdateIdentity UpdateID="0fa1201d-4330-4fa8-8ae9-b877473b6441" /&gt;&lt;/AtLeastOne&gt;&lt;/Prerequisites&gt;&lt;BundledUpdates&gt;&lt;UpdateIdentity UpdateID="{uuid2}" RevisionNumber="204" /&gt;&lt;/BundledUpdates&gt;&lt;/Relationships&gt;</Xml></UpdateInfo><UpdateInfo><ID>{revision_id2}</ID><Deployment><ID>{deployment_id2}</ID><Action>Bundle</Action><IsAssigned>true</IsAssigned><LastChangeTime>2020-02-29</LastChangeTime><AutoSelect>0</AutoSelect><AutoDownload>0</AutoDownload><SupersedenceBehavior>0</SupersedenceBehavior></Deployment><IsLeaf>true</IsLeaf><Xml>&lt;UpdateIdentity UpdateID="{uuid2}" RevisionNumber="204" /&gt;&lt;Properties UpdateType="Software" /&gt;&lt;Relationships&gt;&lt;/Relationships&gt;&lt;ApplicabilityRules&gt;&lt;IsInstalled&gt;&lt;False /&gt;&lt;/IsInstalled&gt;&lt;IsInstallable&gt;&lt;True /&gt;&lt;/IsInstallable&gt;&lt;/ApplicabilityRules&gt;</Xml></UpdateInfo></NewUpdates><Truncated>false</Truncated><NewCookie><Expiration>{expire}</Expiration><EncryptedData>{cookie}</EncryptedData></NewCookie><DriverSyncNotNeeded>true</DriverSyncNotNeeded></SyncUpdatesResult></SyncUpdatesResponse></s:Body></s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w4.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SyncUpdatesResponse xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService"><SyncUpdatesResult><NewUpdates><UpdateInfo><ID>{revision_id1}</ID><Deployment><ID>{deployment_id1}</ID><Action>Install</Action><IsAssigned>true</IsAssigned><LastChangeTime>2020-02-29</LastChangeTime><AutoSelect>0</AutoSelect><AutoDownload>0</AutoDownload><SupersedenceBehavior>0</SupersedenceBehavior></Deployment><IsLeaf>true</IsLeaf><Xml>&lt;UpdateIdentity UpdateID="{uuid1}" RevisionNumber="204" /&gt;&lt;Properties UpdateType="Software" ExplicitlyDeployable="true" AutoSelectOnWebSites="true" /&gt;&lt;Relationships&gt;&lt;BundledUpdates&gt;&lt;UpdateIdentity UpdateID="{uuid2}" RevisionNumber="204" /&gt;&lt;/BundledUpdates&gt;&lt;/Relationships&gt;</Xml></UpdateInfo><UpdateInfo><ID>{revision_id2}</ID><Deployment><ID>{deployment_id2}</ID><Action>Bundle</Action><IsAssigned>true</IsAssigned><LastChangeTime>2020-02-29</LastChangeTime><AutoSelect>0</AutoSelect><AutoDownload>0</AutoDownload><SupersedenceBehavior>0</SupersedenceBehavior></Deployment><IsLeaf>true</IsLeaf><Xml>&lt;UpdateIdentity UpdateID="{uuid2}" RevisionNumber="204" /&gt;&lt;Properties UpdateType="Software" /&gt;&lt;Relationships&gt;&lt;/Relationships&gt;&lt;ApplicabilityRules&gt;&lt;IsInstalled&gt;&lt;False /&gt;&lt;/IsInstalled&gt;&lt;IsInstallable&gt;&lt;True /&gt;&lt;/IsInstallable&gt;&lt;/ApplicabilityRules&gt;</Xml></UpdateInfo></NewUpdates><Truncated>false</Truncated><NewCookie><Expiration>{expire}</Expiration><EncryptedData>{cookie}</EncryptedData></NewCookie><DriverSyncNotNeeded>true</DriverSyncNotNeeded></SyncUpdatesResult></SyncUpdatesResponse></s:Body></s:Envelope>