smb

How to navigate to a network host in JFileChooser?

守給你的承諾、 提交于 2019-12-01 03:06:16
The Problem I have a JFileChooser and I need to programmatically set its currentDirectory to a network host containing several SMB shares (e.g. \\blah ). Technically this is not a "directory" but rather a shell folder representing a list of available shares. JFileChooser has no problems navigating to a specific share (e.g. \\blah\someShare ) but cannot handle the host "directory" itself (e.g. \\blah ). Users can navigate to such "directories" inside JFileChooser by going via "Network" shell folder, or by finding a specific share and navigating to its parent directory. Debugging shows that

Adding SMB to Windows, how safe is this?

纵然是瞬间 提交于 2019-12-01 00:45:26
I came across a small hack, which claims it enables smb:// on windows. The complaint was that things like <a href="\\computername\path\file.ext">text</a> weren't working. While true that you can use file:///// in your url's, the user wanted to use smb:// so that it's cross-platform. The hack goes as follows: 1) Create this Reg file, save and execute it: REGEDIT4 [HKEY_CLASSES_ROOT\smb] @="URL:smb Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\smb\shell] [HKEY_CLASSES_ROOT\smb\shell\open] [HKEY_CLASSES_ROOT\smb\shell\open\command] @="\"C:\\smb.bat\" \"%1\"" And then create the smb.bat file in

Open Java SMB server implementation

夙愿已清 提交于 2019-11-30 20:20:29
Is there an open implementation of a SMB/CIFS server in Java? The only implementation I can find at all is Alfresco's but it isn't open source. A related question: assuming there is no such implementation, I'm surprised there isn't a library providing even a subset of SMB e.g. for simple file transfer. My intuition is that it wouldn't be massively difficult to implement a simple server (but of course would be very difficult to implement a complete solution like Samba). The fact that no one seems to have done it makes me suspicious that it is harder than I'd guess. Is there no implementation

Adding SMB to Windows, how safe is this?

会有一股神秘感。 提交于 2019-11-30 18:33:59
问题 I came across a small hack, which claims it enables smb:// on windows. The complaint was that things like <a href="\\computername\path\file.ext">text</a> weren't working. While true that you can use file:///// in your url's, the user wanted to use smb:// so that it's cross-platform. The hack goes as follows: 1) Create this Reg file, save and execute it: REGEDIT4 [HKEY_CLASSES_ROOT\smb] @="URL:smb Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\smb\shell] [HKEY_CLASSES_ROOT\smb\shell\open]

FileNotFoundException thrown when the file does exists

醉酒当歌 提交于 2019-11-30 18:10:46
问题 I'm facing this strange problem. I'm trying to read a file that is located in another machine as a shared resource: \\remote-machine\dir\MyFileHere.txt When I run a standalone application ( a 16 lines java file ) everything is just fine. But when I attempt to read the same file with using the same class and the same method from a server "engine" ( this is an application engine, pretty much like a Java EE Application Server where you can run java programs ) the "FileNotFoundException" is

Convert SmbFile to Java IO File

三世轮回 提交于 2019-11-30 15:40:19
问题 My Java application requires access to a large excel file (1GB+ in size) saved on remote shared folder. I'm using SmbFile to get the file with authentication. Note: Downloading of the file is not an option mainly for size reasons. The problem is that I need the excel file to be a Java IO File and not SmbFile since the other libraries that I'm using to parse the excel only accepts Java IO File. Is there any way to convert this SmbFile into a Java compatible File? 回答1: See implementation

Convert SmbFile to Java IO File

末鹿安然 提交于 2019-11-30 14:50:12
My Java application requires access to a large excel file (1GB+ in size) saved on remote shared folder. I'm using SmbFile to get the file with authentication. Note: Downloading of the file is not an option mainly for size reasons. The problem is that I need the excel file to be a Java IO File and not SmbFile since the other libraries that I'm using to parse the excel only accepts Java IO File. Is there any way to convert this SmbFile into a Java compatible File? See implementation details of your library: This library will take a provided InputStream and output it to the file system. (...)

Accessing SMB2.1 or SMB3 share from java?

徘徊边缘 提交于 2019-11-30 09:56:03
As Windows 2012R2 no longer supports the SMB1 protocol without some registry hacks has any had any success working with SMB shares in Java where only SMB2.1 or SMB3 are supported? the JCIFS library is apparently SMB1 only so it is out. I see that Microsoft have a Java library for Azure but this appears to be utilising services rather than SMB. I found this package that can work with SMB2 and SMB3, named smbj Take a look at this: https://github.com/hierynomus/smbj Expanding on @Breakidi answer, I've just used hierynomus/smbj v0.2.0 on Android and added SMB2 support. It claims support for both

Open Java SMB server implementation

纵饮孤独 提交于 2019-11-30 04:28:44
问题 Is there an open implementation of a SMB/CIFS server in Java? The only implementation I can find at all is Alfresco's but it isn't open source. A related question: assuming there is no such implementation, I'm surprised there isn't a library providing even a subset of SMB e.g. for simple file transfer. My intuition is that it wouldn't be massively difficult to implement a simple server (but of course would be very difficult to implement a complete solution like Samba). The fact that no one

SMB Signing not Required

。_饼干妹妹 提交于 2019-11-30 02:41:26
1. 漏洞报告 2. 漏洞介绍 SMB是一个协议名,全称是Server Message Block(服务器消息快协议),用于在计算机间共享文件、打印机、串口等,电脑上的网上邻居由它实现。SMB签名是SMB协议中的安全机制,也称为安全签名。SMB签名旨在帮助提高SMB协议的安全性,为了防止在传输过程中修改SMB数据包,SMB协议支持SMB数据包的数字签名。所有Windows操作系统都支持客户端SMB组件和服务器端SMB组件。要利用SMB数据包签名,通信中涉及的客户端SMB组件和服务器端SMB组件必须启用或需要SMB数据包签名。如果服务器启用此设置,Microsoft网络服务器将不与Microsoft网络客户端通信,除非该客户端同意执行SMB数据包签名。同样,如果需要客户端SMB签名,则该客户端将无法与未启用数据包签名的服务器建立会话。默认情况下,在工作站,服务器和域控制器上启用客户端SMB签名。 SMB签名在性能上有一些权衡。如果网络性能对部署方案很重要,建议您不要使用SMB签名;如果要在高度安全的环境中使用SMB,建议您使用SMB签名。当启用SMB签名时,SMB将停止使用RDMA远程直接数据存取,因为最大MTU限制为1,394字节,这会导致邮件碎片和重组,并降低整体性能。 3. 漏洞危害 SMB服务上不需要签名。未经身份验证的远程攻击者可以利用此攻击对SMB服务器进行中间人攻击。