<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: pysmb</title>
	<atom:link href="http://miketeo.net/wp/index.php/projects/pysmb/feed" rel="self" type="application/rss+xml" />
	<link>http://miketeo.net/wp</link>
	<description>A Software Technologist&#039;s Blog</description>
	<lastBuildDate>Sun, 30 Oct 2011 17:40:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Filoxb</title>
		<link>http://miketeo.net/wp/index.php/projects/pysmb/comment-page-1#comment-3302</link>
		<dc:creator>Filoxb</dc:creator>
		<pubDate>Mon, 18 Apr 2011 10:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://miketeo.net/wp/?page_id=784#comment-3302</guid>
		<description>Hello boys,
pysmb is awesome, but if i try to use it on a shared folder with password encryption it fails(xp, linux or others)!!!
Does it really support pasword encryption? Is there a correct way to encrypt a password?

Please please please help!!!!!!

Thanks</description>
		<content:encoded><![CDATA[<p>Hello boys,<br />
pysmb is awesome, but if i try to use it on a shared folder with password encryption it fails(xp, linux or others)!!!<br />
Does it really support pasword encryption? Is there a correct way to encrypt a password?</p>
<p>Please please please help!!!!!!</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sujit Ghosal</title>
		<link>http://miketeo.net/wp/index.php/projects/pysmb/comment-page-1#comment-944</link>
		<dc:creator>Sujit Ghosal</dc:creator>
		<pubDate>Fri, 03 Sep 2010 06:21:41 +0000</pubDate>
		<guid isPermaLink="false">http://miketeo.net/wp/?page_id=784#comment-944</guid>
		<description>Does this module handle SMB Chaining as well? Even though I didn&#039;t go through all of the modules functions/classes I just wanted to know before I start working on it.

- Sujit</description>
		<content:encoded><![CDATA[<p>Does this module handle SMB Chaining as well? Even though I didn&#8217;t go through all of the modules functions/classes I just wanted to know before I start working on it.</p>
<p>- Sujit</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nevdull</title>
		<link>http://miketeo.net/wp/index.php/projects/pysmb/comment-page-1#comment-913</link>
		<dc:creator>nevdull</dc:creator>
		<pubDate>Wed, 14 Jul 2010 20:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://miketeo.net/wp/?page_id=784#comment-913</guid>
		<description>hi, found another minor error, when querying a node for its status. for instance, if you want to verify the IP returned by a name query sent to a WINS server is not a stale or tombstoned reference. -query the returned IP for its nbname and check that against the original name query, (if they match all is well). in this case setting the recursion bit against a client will cause status request to be ignored.

so, within   __querynodestatus()
...
  if destaddr:
    req = pack(&#039;&gt;HHHHHH&#039;, trn_id, 0x0100, 0x01, 0x00, 0x00, 0x00) + qn_label + pack(&#039;&gt;HH&#039;, 0x21, 0x01)
  else:
    req = pack(&#039;&gt;HHHHHH&#039;, trn_id, 0x0110, 0x01, 0x00, 0x00, 0x00) + qn_label + pack(&#039;&gt;HH&#039;, 0x21, 0x01)

change the flags word from 0x0100 to 0x000 when destaddr is set and from 0x0110 to 0x0010 when it is not set.</description>
		<content:encoded><![CDATA[<p>hi, found another minor error, when querying a node for its status. for instance, if you want to verify the IP returned by a name query sent to a WINS server is not a stale or tombstoned reference. -query the returned IP for its nbname and check that against the original name query, (if they match all is well). in this case setting the recursion bit against a client will cause status request to be ignored.</p>
<p>so, within   __querynodestatus()<br />
&#8230;<br />
  if destaddr:<br />
    req = pack(&#8216;&gt;HHHHHH&#8217;, trn_id, 0&#215;0100, 0&#215;01, 0&#215;00, 0&#215;00, 0&#215;00) + qn_label + pack(&#8216;&gt;HH&#8217;, 0&#215;21, 0&#215;01)<br />
  else:<br />
    req = pack(&#8216;&gt;HHHHHH&#8217;, trn_id, 0&#215;0110, 0&#215;01, 0&#215;00, 0&#215;00, 0&#215;00) + qn_label + pack(&#8216;&gt;HH&#8217;, 0&#215;21, 0&#215;01)</p>
<p>change the flags word from 0&#215;0100 to 0&#215;000 when destaddr is set and from 0&#215;0110 to 0&#215;0010 when it is not set.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lrq3000</title>
		<link>http://miketeo.net/wp/index.php/projects/pysmb/comment-page-1#comment-901</link>
		<dc:creator>lrq3000</dc:creator>
		<pubDate>Fri, 02 Jul 2010 06:27:30 +0000</pubDate>
		<guid isPermaLink="false">http://miketeo.net/wp/?page_id=784#comment-901</guid>
		<description>As I had to make an automatic backup script uploading to a SMB share, I chose your tool as the base for my work, but I had some troubles making it work since the terminology in the documentation is somewhat obscure and no working example is provided.

Here is a simple python script example :

#!/bin/env python

# Author : Stephen LARROQUE 

# DESCRIPTION : simple python script to demonstrate the use of the pysmb library to connect to a Samba share and send a file. This could be useful for other devs, as there are nearly no documentation on the web, and all other solutions aren&#039;t as versatile and interoperable as this one (it should work on any plateform)

import smb, nmb, getpass, os;

fileshare = smb.SMB(&#039;YOURSMBHOSTNAME&#039;, &#039;YOURSMBHOSTIP&#039;, my_name = &quot;THEMATRIX&quot;, host_type = nmb.TYPE_SERVER, sess_port = nmb.NETBIOS_SESSION_PORT);
fileshare.login(&#039;yourlogin&#039;, &#039;password&#039;)
#fileshare.stor_file(&#039;Call&#039;, remote_path+filename, sz.read) 
serveros = fileshare.get_server_os();
print serveros;

if (fileshare.is_login_required()) :
    print &quot;Login is required on this server.&quot;;

print fileshare.list_shared();

if (fileshare.list_path(&quot;SMBSHAREMOUNT&quot;, &quot;PATH\*&quot;)) :
    print &quot;Dir exists !&quot;;

src_path = &#039;D:/test.txt&#039;;
dest_service = &quot;SMBSHAREMOUNT&quot;;
dest_path = &quot;PATH/test11.txt&quot;;
fh = open(src_path, &#039;rb&#039;);
fileshare.stor_file(dest_service, dest_path, fh.read);
fh.close();</description>
		<content:encoded><![CDATA[<p>As I had to make an automatic backup script uploading to a SMB share, I chose your tool as the base for my work, but I had some troubles making it work since the terminology in the documentation is somewhat obscure and no working example is provided.</p>
<p>Here is a simple python script example :</p>
<p>#!/bin/env python</p>
<p># Author : Stephen LARROQUE </p>
<p># DESCRIPTION : simple python script to demonstrate the use of the pysmb library to connect to a Samba share and send a file. This could be useful for other devs, as there are nearly no documentation on the web, and all other solutions aren&#8217;t as versatile and interoperable as this one (it should work on any plateform)</p>
<p>import smb, nmb, getpass, os;</p>
<p>fileshare = smb.SMB(&#8216;YOURSMBHOSTNAME&#8217;, &#8216;YOURSMBHOSTIP&#8217;, my_name = &#8220;THEMATRIX&#8221;, host_type = nmb.TYPE_SERVER, sess_port = nmb.NETBIOS_SESSION_PORT);<br />
fileshare.login(&#8216;yourlogin&#8217;, &#8216;password&#8217;)<br />
#fileshare.stor_file(&#8216;Call&#8217;, remote_path+filename, sz.read)<br />
serveros = fileshare.get_server_os();<br />
print serveros;</p>
<p>if (fileshare.is_login_required()) :<br />
    print &#8220;Login is required on this server.&#8221;;</p>
<p>print fileshare.list_shared();</p>
<p>if (fileshare.list_path(&#8220;SMBSHAREMOUNT&#8221;, &#8220;PATH\*&#8221;)) :<br />
    print &#8220;Dir exists !&#8221;;</p>
<p>src_path = &#8216;D:/test.txt&#8217;;<br />
dest_service = &#8220;SMBSHAREMOUNT&#8221;;<br />
dest_path = &#8220;PATH/test11.txt&#8221;;<br />
fh = open(src_path, &#8216;rb&#8217;);<br />
fileshare.stor_file(dest_service, dest_path, fh.read);<br />
fh.close();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nevdull</title>
		<link>http://miketeo.net/wp/index.php/projects/pysmb/comment-page-1#comment-897</link>
		<dc:creator>nevdull</dc:creator>
		<pubDate>Thu, 24 Jun 2010 16:46:54 +0000</pubDate>
		<guid isPermaLink="false">http://miketeo.net/wp/?page_id=784#comment-897</guid>
		<description>i&#039;ve been searching for a python netbios name resolution module, and came across pysmb. just what i needed- native python and lightweight, thanks.

also, wanted to let you know that i found a small error while testing NetBIOS.gethostbyname(). if a wins server returns multiple nodes in response to a query, each node is 6 bytes long: 2 bytes for flags followed by 4 bytes for the ip address. however, the code only increments by 4 bytes if multiple modes are found.

  for i in range(0, num_records):
    # In Python2, we can use socket.inet_ntoa(data[58 + i * 4:62 + i * 4]) to convert
    addrs.append(NBHostEntry(string.rstrip(qn_name[:-1]) + qn_scope, ord(qn_name[-1]), &#039;%d.%d.%d.%d&#039; % unpack(&#039;4B&#039;, (data[offset:offset + 4]))))
    offset = offset + 4

changing the offset increment to &quot;offset = offset + 6&quot; solves the problem. no idea how accurate this is across all versions and types of query responses, especially since the response record contains the data length (in this case 12 when 2 unique h-records are returned).

anyways thanks..</description>
		<content:encoded><![CDATA[<p>i&#8217;ve been searching for a python netbios name resolution module, and came across pysmb. just what i needed- native python and lightweight, thanks.</p>
<p>also, wanted to let you know that i found a small error while testing NetBIOS.gethostbyname(). if a wins server returns multiple nodes in response to a query, each node is 6 bytes long: 2 bytes for flags followed by 4 bytes for the ip address. however, the code only increments by 4 bytes if multiple modes are found.</p>
<p>  for i in range(0, num_records):<br />
    # In Python2, we can use socket.inet_ntoa(data[58 + i * 4:62 + i * 4]) to convert<br />
    addrs.append(NBHostEntry(string.rstrip(qn_name[:-1]) + qn_scope, ord(qn_name[-1]), &#8216;%d.%d.%d.%d&#8217; % unpack(&#8217;4B&#8217;, (data[offset:offset + 4]))))<br />
    offset = offset + 4</p>
<p>changing the offset increment to &#8220;offset = offset + 6&#8243; solves the problem. no idea how accurate this is across all versions and types of query responses, especially since the response record contains the data length (in this case 12 when 2 unique h-records are returned).</p>
<p>anyways thanks..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thorsten Kaufmann</title>
		<link>http://miketeo.net/wp/index.php/projects/pysmb/comment-page-1#comment-894</link>
		<dc:creator>Thorsten Kaufmann</dc:creator>
		<pubDate>Tue, 22 Jun 2010 14:21:59 +0000</pubDate>
		<guid isPermaLink="false">http://miketeo.net/wp/?page_id=784#comment-894</guid>
		<description>Hi Mike,

great piece of code and seems to work pretty flawlessly. Just one minor thing i would love to do is reuse an existing connection to a smb server. So on windows once you are logged  in on a server with say explorer it wouldnt re-need authentication and would reuse the windows connection. Is that possible and how would i go about it ?

Kind Regards and thanks in advance,
Thorsten</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>great piece of code and seems to work pretty flawlessly. Just one minor thing i would love to do is reuse an existing connection to a smb server. So on windows once you are logged  in on a server with say explorer it wouldnt re-need authentication and would reuse the windows connection. Is that possible and how would i go about it ?</p>
<p>Kind Regards and thanks in advance,<br />
Thorsten</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MikeTeo.net &#187; Blog Archive &#187; pysmb 0.4.5 released!</title>
		<link>http://miketeo.net/wp/index.php/projects/pysmb/comment-page-1#comment-828</link>
		<dc:creator>MikeTeo.net &#187; Blog Archive &#187; pysmb 0.4.5 released!</dc:creator>
		<pubDate>Mon, 22 Jun 2009 08:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://miketeo.net/wp/?page_id=784#comment-828</guid>
		<description>[...] more information, please visit: http://miketeo.net/wp/index.php/projects/pysmb   Bookmark This Rattle...                              Posted in: Python, Software Development ADD [...]</description>
		<content:encoded><![CDATA[<p>[...] more information, please visit: <a href="http://miketeo.net/wp/index.php/projects/pysmb" rel="nofollow">http://miketeo.net/wp/index.php/projects/pysmb</a>   Bookmark This Rattle&#8230;                              Posted in: Python, Software Development ADD [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

