-
-
Notifications
You must be signed in to change notification settings - Fork 69
/
search.js
46 lines (43 loc) · 136 KB
/
search.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
window.pdocSearch = (function(){
/** elasticlunr - http://weixsong.github.io * Copyright (C) 2017 Oliver Nightingale * Copyright (C) 2017 Wei Song * MIT Licensed */!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u<s.length;u++){var a=s[u];r[a]=this.pipeline.run(t.tokenizer(e[a]))}var l={};for(var c in o){var d=r[c]||r.any;if(d){var f=this.fieldSearch(d,c,o),h=o[c].boost;for(var p in f)f[p]=f[p]*h;for(var p in f)p in l?l[p]+=f[p]:l[p]=f[p]}}var v,g=[];for(var p in l)v={ref:p,score:l[p]},this.documentStore.hasDoc(p)&&(v.doc=this.documentStore.getDoc(p)),g.push(v);return g.sort(function(e,t){return t.score-e.score}),g},t.Index.prototype.fieldSearch=function(e,t,n){var i=n[t].bool,o=n[t].expand,r=n[t].boost,s=null,u={};return 0!==r?(e.forEach(function(e){var n=[e];1==o&&(n=this.index[t].expandToken(e));var r={};n.forEach(function(n){var o=this.index[t].getDocs(n),a=this.idf(n,t);if(s&&"AND"==i){var l={};for(var c in s)c in o&&(l[c]=o[c]);o=l}n==e&&this.fieldSearchStats(u,n,o);for(var c in o){var d=this.index[t].getTermFrequency(n,c),f=this.documentStore.getFieldLength(c,t),h=1;0!=f&&(h=1/Math.sqrt(f));var p=1;n!=e&&(p=.15*(1-(n.length-e.length)/n.length));var v=d*a*h*p;c in r?r[c]+=v:r[c]=v}},this),s=this.mergeScores(s,r,i)},this),s=this.coordNorm(s,u,e.length)):void 0},t.Index.prototype.mergeScores=function(e,t,n){if(!e)return t;if("AND"==n){var i={};for(var o in t)o in e&&(i[o]=e[o]+t[o]);return i}for(var o in t)o in e?e[o]+=t[o]:e[o]=t[o];return e},t.Index.prototype.fieldSearchStats=function(e,t,n){for(var i in n)i in e?e[i].push(t):e[i]=[t]},t.Index.prototype.coordNorm=function(e,t,n){for(var i in e)if(i in t){var o=t[i].length;e[i]=e[i]*o/n}return e},t.Index.prototype.toJSON=function(){var e={};return this._fields.forEach(function(t){e[t]=this.index[t].toJSON()},this),{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),index:e,pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},t.DocumentStore=function(e){this._save=null===e||void 0===e?!0:e,this.docs={},this.docInfo={},this.length=0},t.DocumentStore.load=function(e){var t=new this;return t.length=e.length,t.docs=e.docs,t.docInfo=e.docInfo,t._save=e.save,t},t.DocumentStore.prototype.isDocStored=function(){return this._save},t.DocumentStore.prototype.addDoc=function(t,n){this.hasDoc(t)||this.length++,this.docs[t]=this._save===!0?e(n):null},t.DocumentStore.prototype.getDoc=function(e){return this.hasDoc(e)===!1?null:this.docs[e]},t.DocumentStore.prototype.hasDoc=function(e){return e in this.docs},t.DocumentStore.prototype.removeDoc=function(e){this.hasDoc(e)&&(delete this.docs[e],delete this.docInfo[e],this.length--)},t.DocumentStore.prototype.addFieldLength=function(e,t,n){null!==e&&void 0!==e&&0!=this.hasDoc(e)&&(this.docInfo[e]||(this.docInfo[e]={}),this.docInfo[e][t]=n)},t.DocumentStore.prototype.updateFieldLength=function(e,t,n){null!==e&&void 0!==e&&0!=this.hasDoc(e)&&this.addFieldLength(e,t,n)},t.DocumentStore.prototype.getFieldLength=function(e,t){return null===e||void 0===e?0:e in this.docs&&t in this.docInfo[e]?this.docInfo[e][t]:0},t.DocumentStore.prototype.toJSON=function(){return{docs:this.docs,docInfo:this.docInfo,length:this.length,save:this._save}},t.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,u="^("+o+")?"+r+o+"("+r+")?$",a="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,c=new RegExp(s),d=new RegExp(a),f=new RegExp(u),h=new RegExp(l),p=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,x=new RegExp("([^aeiouylsz])\\1$"),w=new RegExp("^"+o+i+"[^aeiouwxy]$"),I=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,D=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,_=/^(.+?)e$/,P=/ll$/,k=new RegExp("^"+o+i+"[^aeiouwxy]$"),z=function(n){var i,o,r,s,u,a,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,u=v,s.test(n)?n=n.replace(s,"$1$2"):u.test(n)&&(n=n.replace(u,"$1$2")),s=g,u=m,s.test(n)){var z=s.exec(n);s=c,s.test(z[1])&&(s=y,n=n.replace(s,""))}else if(u.test(n)){var z=u.exec(n);i=z[1],u=h,u.test(i)&&(n=i,u=S,a=x,l=w,u.test(n)?n+="e":a.test(n)?(s=y,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=I,s.test(n)){var z=s.exec(n);i=z[1],n=i+"i"}if(s=b,s.test(n)){var z=s.exec(n);i=z[1],o=z[2],s=c,s.test(i)&&(n=i+e[o])}if(s=E,s.test(n)){var z=s.exec(n);i=z[1],o=z[2],s=c,s.test(i)&&(n=i+t[o])}if(s=D,u=F,s.test(n)){var z=s.exec(n);i=z[1],s=d,s.test(i)&&(n=i)}else if(u.test(n)){var z=u.exec(n);i=z[1]+z[2],u=d,u.test(i)&&(n=i)}if(s=_,s.test(n)){var z=s.exec(n);i=z[1],s=d,u=f,a=k,(s.test(i)||u.test(i)&&!a.test(i))&&(n=i)}return s=P,u=d,s.test(n)&&u.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return z}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==!0?e:void 0},t.clearStopWords=function(){t.stopWordFilter.stopWords={}},t.addStopWords=function(e){null!=e&&Array.isArray(e)!==!1&&e.forEach(function(e){t.stopWordFilter.stopWords[e]=!0},this)},t.resetStopWords=function(){t.stopWordFilter.stopWords=t.defaultStopWords},t.defaultStopWords={"":!0,a:!0,able:!0,about:!0,across:!0,after:!0,all:!0,almost:!0,also:!0,am:!0,among:!0,an:!0,and:!0,any:!0,are:!0,as:!0,at:!0,be:!0,because:!0,been:!0,but:!0,by:!0,can:!0,cannot:!0,could:!0,dear:!0,did:!0,"do":!0,does:!0,either:!0,"else":!0,ever:!0,every:!0,"for":!0,from:!0,get:!0,got:!0,had:!0,has:!0,have:!0,he:!0,her:!0,hers:!0,him:!0,his:!0,how:!0,however:!0,i:!0,"if":!0,"in":!0,into:!0,is:!0,it:!0,its:!0,just:!0,least:!0,let:!0,like:!0,likely:!0,may:!0,me:!0,might:!0,most:!0,must:!0,my:!0,neither:!0,no:!0,nor:!0,not:!0,of:!0,off:!0,often:!0,on:!0,only:!0,or:!0,other:!0,our:!0,own:!0,rather:!0,said:!0,say:!0,says:!0,she:!0,should:!0,since:!0,so:!0,some:!0,than:!0,that:!0,the:!0,their:!0,them:!0,then:!0,there:!0,these:!0,they:!0,"this":!0,tis:!0,to:!0,too:!0,twas:!0,us:!0,wants:!0,was:!0,we:!0,were:!0,what:!0,when:!0,where:!0,which:!0,"while":!0,who:!0,whom:!0,why:!0,will:!0,"with":!0,would:!0,yet:!0,you:!0,your:!0},t.stopWordFilter.stopWords=t.defaultStopWords,t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(e){if(null===e||void 0===e)throw new Error("token should not be undefined");return e.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.InvertedIndex=function(){this.root={docs:{},df:0}},t.InvertedIndex.load=function(e){var t=new this;return t.root=e.root,t},t.InvertedIndex.prototype.addToken=function(e,t,n){for(var n=n||this.root,i=0;i<=e.length-1;){var o=e[i];o in n||(n[o]={docs:{},df:0}),i+=1,n=n[o]}var r=t.ref;n.docs[r]?n.docs[r]={tf:t.tf}:(n.docs[r]={tf:t.tf},n.df+=1)},t.InvertedIndex.prototype.hasToken=function(e){if(!e)return!1;for(var t=this.root,n=0;n<e.length;n++){if(!t[e[n]])return!1;t=t[e[n]]}return!0},t.InvertedIndex.prototype.getNode=function(e){if(!e)return null;for(var t=this.root,n=0;n<e.length;n++){if(!t[e[n]])return null;t=t[e[n]]}return t},t.InvertedIndex.prototype.getDocs=function(e){var t=this.getNode(e);return null==t?{}:t.docs},t.InvertedIndex.prototype.getTermFrequency=function(e,t){var n=this.getNode(e);return null==n?0:t in n.docs?n.docs[t].tf:0},t.InvertedIndex.prototype.getDocFreq=function(e){var t=this.getNode(e);return null==t?0:t.df},t.InvertedIndex.prototype.removeToken=function(e,t){if(e){var n=this.getNode(e);null!=n&&t in n.docs&&(delete n.docs[t],n.df-=1)}},t.InvertedIndex.prototype.expandToken=function(e,t,n){if(null==e||""==e)return[];var t=t||[];if(void 0==n&&(n=this.getNode(e),null==n))return t;n.df>0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e<arguments.length;e++)t=arguments[e],~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t);this.length=this.elements.length},lunr.SortedSet.prototype.toArray=function(){return this.elements.slice()},lunr.SortedSet.prototype.map=function(e,t){return this.elements.map(e,t)},lunr.SortedSet.prototype.forEach=function(e,t){return this.elements.forEach(e,t)},lunr.SortedSet.prototype.indexOf=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]<u[i]?n++:s[n]>u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();o<r.length;o++)i.add(r[o]);return i},lunr.SortedSet.prototype.toJSON=function(){return this.toArray()},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.elasticlunr=t()}(this,function(){return t})}();
/** pdoc search index */const docs = [{"fullname": "smbclientng", "modulename": "smbclientng", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core", "modulename": "smbclientng.core", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.CommandCompleter", "modulename": "smbclientng.core.CommandCompleter", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.CommandCompleter.CommandCompleter", "modulename": "smbclientng.core.CommandCompleter", "qualname": "CommandCompleter", "kind": "class", "doc": "<p>A class to handle command completion for the smbclient-ng shell.</p>\n\n<p>This class provides a command completion feature that suggests possible command names based on the current input.\nIt uses a dictionary to store commands and their descriptions, which helps in providing hints during the command line\ninteraction in the smbclient-ng shell.</p>\n\n<p>Attributes:\n smbSession (SMBSession): An instance of SMBSession which maintains the current SMB session.\n commands (dict): A dictionary containing command names as keys and their descriptions and subcommands as values.</p>\n\n<p>Methods:\n __init__(self, smbSession): Initializes the CommandCompleter with an SMBSession.</p>\n"}, {"fullname": "smbclientng.core.CommandCompleter.CommandCompleter.__init__", "modulename": "smbclientng.core.CommandCompleter", "qualname": "CommandCompleter.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">smbSession</span>, </span><span class=\"param\"><span class=\"n\">config</span>, </span><span class=\"param\"><span class=\"n\">logger</span></span>)</span>"}, {"fullname": "smbclientng.core.CommandCompleter.CommandCompleter.commands", "modulename": "smbclientng.core.CommandCompleter", "qualname": "CommandCompleter.commands", "kind": "variable", "doc": "<p></p>\n", "default_value": "{'bat': {'description': ['Pretty prints the contents of a remote file.', "Syntax: 'bat <file>'"], 'subcommands': [], 'autocomplete': ['remote_file']}, 'cat': {'description': ['Get the contents of a remote file.', "Syntax: 'cat <file>'"], 'subcommands': [], 'autocomplete': ['remote_file']}, 'cd': {'description': ['Change the current working directory.', "Syntax: 'cd <directory>'"], 'subcommands': [], 'autocomplete': ['remote_directory']}, 'close': {'description': ['Closes the SMB connection to the remote machine.', "Syntax: 'close'"], 'subcommands': [], 'autocomplete': []}, 'connect': {'description': ['Connect to the remote machine (useful if connection timed out).', "Syntax: 'connect'"], 'subcommands': [], 'autocomplete': []}, 'debug': {'description': ['Command for dev debugging.', "Syntax: 'debug'"], 'subcommands': [], 'autocomplete': []}, 'dir': {'description': ['List the contents of the current working directory.', "Syntax: 'dir'"], 'subcommands': [], 'autocomplete': ['remote_directory']}, 'exit': {'description': ['Exits the smbclient-ng script.', "Syntax: 'exit'"], 'subcommands': [], 'autocomplete': []}, 'get': {'description': ['Get a remote file.', "Syntax: 'get [-r] <directory or file>'"], 'subcommands': [], 'autocomplete': ['remote_file']}, 'help': {'description': ['Displays this help message.', "Syntax: 'help'"], 'subcommands': ['format'], 'autocomplete': []}, 'info': {'description': ['Get information about the server and or the share.', "Syntax: 'info [server|share]'"], 'subcommands': ['server', 'share'], 'autocomplete': []}, 'lbat': {'description': ['Pretty prints the contents of a local file.', "Syntax: 'lbat <file>'"], 'subcommands': [], 'autocomplete': ['local_file']}, 'lcat': {'description': ['Print the contents of a local file.', "Syntax: 'lcat <file>'"], 'subcommands': [], 'autocomplete': ['local_file']}, 'lcd': {'description': ['Changes the current local directory.', "Syntax: 'lcd <directory>'"], 'subcommands': [], 'autocomplete': ['local_directory']}, 'lcp': {'description': ['Create a copy of a local file.', "Syntax: 'lcp <srcfile> <dstfile>'"], 'subcommands': [], 'autocomplete': ['remote_file']}, 'lls': {'description': ['Lists the contents of the current local directory.', "Syntax: 'lls'"], 'subcommands': [], 'autocomplete': ['local_directory']}, 'lmkdir': {'description': ['Creates a new local directory.', "Syntax: 'lmkdir <directory>'"], 'subcommands': [], 'autocomplete': ['local_directory']}, 'lpwd': {'description': ['Shows the current local directory.', "Syntax: 'lpwd'"], 'subcommands': [], 'autocomplete': []}, 'lrename': {'description': ['Renames a local file.', "Syntax: 'lrename <oldfilename> <newfilename>'"], 'subcommands': [], 'autocomplete': ['local_file']}, 'lrm': {'description': ['Removes a local file.', "Syntax: 'lrm <file>'"], 'subcommands': [], 'autocomplete': ['local_file']}, 'lrmdir': {'description': ['Removes a local directory.', "Syntax: 'lrmdir <directory>'"], 'subcommands': [], 'autocomplete': ['local_directory']}, 'ls': {'description': ['List the contents of the current remote working directory.', "Syntax: 'ls'"], 'subcommands': [], 'autocomplete': ['remote_directory']}, 'ltree': {'description': ['Displays a tree view of the local directories.', "Syntax: 'ltree [directory]'"], 'subcommands': [], 'autocomplete': ['local_directory']}, 'mkdir': {'description': ['Creates a new remote directory.', "Syntax: 'mkdir <directory>'"], 'subcommands': [], 'autocomplete': ['remote_directory']}, 'module': {'description': ['Loads a specific module for additional functionalities.', "Syntax: 'module <name>'"], 'subcommands': [], 'autocomplete': []}, 'mount': {'description': ['Creates a mount point of the remote share on the local machine.', "Syntax: 'mount <remote_path> <local_mountpoint>'"], 'subcommands': [], 'autocomplete': ['remote_directory']}, 'put': {'description': ['Put a local file or directory in a remote directory.', "Syntax: 'put [-r] <directory or file>'"], 'subcommands': [], 'autocomplete': ['local_file']}, 'reconnect': {'description': ['Reconnect to the remote machine (useful if connection timed out).', "Syntax: 'reconnect'"], 'subcommands': [], 'autocomplete': []}, 'reset': {'description': ['Reset the TTY output, useful if it was broken after printing a binary file on stdout.', "Syntax: 'reset'"], 'subcommands': [], 'autocomplete': []}, 'rmdir': {'description': ['Removes a remote directory.', "Syntax: 'rmdir <directory>'"], 'subcommands': [], 'autocomplete': ['remote_directory']}, 'rm': {'description': ['Removes a remote file.', "Syntax: 'rm <file>'"], 'subcommands': [], 'autocomplete': ['remote_file']}, 'sizeof': {'description': ['Recursively compute the size of a folder.', "Syntax: 'sizeof [directory|file]'"], 'subcommands': [], 'autocomplete': ['remote_directory']}, 'sessions': {'description': ['Manage the SMB sessions.', "Syntax: 'sessions [access|create|delete|execute|list]'"], 'subcommands': ['create', 'delete', 'execute', 'interact', 'list'], 'autocomplete': []}, 'shares': {'description': ['Lists the SMB shares served by the remote machine.', "Syntax: 'shares'"], 'subcommands': ['rights'], 'autocomplete': []}, 'tree': {'description': ['Displays a tree view of the remote directories.', "Syntax: 'tree [directory]'"], 'subcommands': [], 'autocomplete': ['remote_directory']}, 'umount': {'description': ['Removes a mount point of the remote share on the local machine.', "Syntax: 'umount <local_mount_point>'"], 'subcommands': [], 'autocomplete': ['remote_directory']}, 'use': {'description': ['Use a SMB share.', "Syntax: 'use <sharename>'"], 'subcommands': [], 'autocomplete': ['share']}}"}, {"fullname": "smbclientng.core.CommandCompleter.CommandCompleter.smbSession", "modulename": "smbclientng.core.CommandCompleter", "qualname": "CommandCompleter.smbSession", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.CommandCompleter.CommandCompleter.config", "modulename": "smbclientng.core.CommandCompleter", "qualname": "CommandCompleter.config", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.CommandCompleter.CommandCompleter.logger", "modulename": "smbclientng.core.CommandCompleter", "qualname": "CommandCompleter.logger", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.CommandCompleter.CommandCompleter.complete", "modulename": "smbclientng.core.CommandCompleter", "qualname": "CommandCompleter.complete", "kind": "function", "doc": "<p>Function to handle command completion in the LDAP console.</p>\n\n<p>This function completes the user\"s input based on the available options for commands in the LDAP console.</p>\n\n<p>Args:\n text (str): The current text input by the user.\n state (int): The current state of completion.</p>\n\n<p>Returns:\n str: The next completion suggestion based on the user\"s input state.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">text</span>, </span><span class=\"param\"><span class=\"n\">state</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.CommandCompleter.CommandCompleter.print_help", "modulename": "smbclientng.core.CommandCompleter", "qualname": "CommandCompleter.print_help", "kind": "function", "doc": "<p>Prints help information for a specific command or all commands if no command is specified.</p>\n\n<p>This method displays the help information for the command passed as an argument. If no command is specified,\nit prints the help information for all available commands. The help information includes the command syntax,\ndescription, and any subcommands associated with it. This method is designed to provide users with the necessary\nguidance on how to use the commands in the smbclient-ng shell.</p>\n\n<p>Args:\n command (str, optional): The command to display help information for. If None, help for all commands is displayed.</p>\n\n<p>Returns:\n None</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">command</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.CommandCompleter.CommandCompleter.print_help_format", "modulename": "smbclientng.core.CommandCompleter", "qualname": "CommandCompleter.print_help_format", "kind": "function", "doc": "<p>Prints the help information for the 'format' used in remote 'ls' and 'dir' commands.</p>\n\n<p>This function displays the format of file attributes used in the smbclient-ng shell. It explains the meaning\nof each character in the file attribute string, such as whether a file is read-only, hidden, or a directory.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.Config", "modulename": "smbclientng.core.Config", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Config.Config", "modulename": "smbclientng.core.Config", "qualname": "Config", "kind": "class", "doc": "<p>Configuration handler for smbclientng.</p>\n\n<p>This class manages the configuration settings for the smbclientng tool, including debug and color output settings.\nIt provides a structured way to access and modify these settings throughout the application.</p>\n\n<p>Attributes:\n _debug (bool): Flag to enable or disable debug mode.\n _no_colors (bool): Flag to enable or disable colored output, depending on the platform.</p>\n\n<p>Methods:\n debug: Property to get or set the debug mode.\n no_colors: Property to get or set the colored output preference.</p>\n"}, {"fullname": "smbclientng.core.Config.Config.__init__", "modulename": "smbclientng.core.Config", "qualname": "Config.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">debug</span><span class=\"o\">=</span><span class=\"kc\">False</span>, </span><span class=\"param\"><span class=\"n\">no_colors</span><span class=\"o\">=</span><span class=\"kc\">None</span></span>)</span>"}, {"fullname": "smbclientng.core.Config.Config.not_interactive", "modulename": "smbclientng.core.Config", "qualname": "Config.not_interactive", "kind": "variable", "doc": "<p></p>\n", "default_value": "False"}, {"fullname": "smbclientng.core.Config.Config.startup_script", "modulename": "smbclientng.core.Config", "qualname": "Config.startup_script", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.Config.Config.debug", "modulename": "smbclientng.core.Config", "qualname": "Config.debug", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Config.Config.no_colors", "modulename": "smbclientng.core.Config", "qualname": "Config.no_colors", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Credentials", "modulename": "smbclientng.core.Credentials", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Credentials.Credentials", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials", "kind": "class", "doc": "<p>Documentation for class Credentials</p>\n"}, {"fullname": "smbclientng.core.Credentials.Credentials.__init__", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code multiline\">(<span class=\"param\">\t<span class=\"n\">domain</span>,</span><span class=\"param\">\t<span class=\"n\">username</span>,</span><span class=\"param\">\t<span class=\"n\">password</span>,</span><span class=\"param\">\t<span class=\"n\">hashes</span><span class=\"o\">=</span><span class=\"kc\">None</span>,</span><span class=\"param\">\t<span class=\"n\">use_kerberos</span><span class=\"o\">=</span><span class=\"kc\">False</span>,</span><span class=\"param\">\t<span class=\"n\">aesKey</span><span class=\"o\">=</span><span class=\"kc\">None</span>,</span><span class=\"param\">\t<span class=\"n\">kdcHost</span><span class=\"o\">=</span><span class=\"kc\">None</span></span>)</span>"}, {"fullname": "smbclientng.core.Credentials.Credentials.domain", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.domain", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.Credentials.Credentials.username", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.username", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.Credentials.Credentials.password", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.password", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.Credentials.Credentials.nt_hex", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.nt_hex", "kind": "variable", "doc": "<p></p>\n", "default_value": "''"}, {"fullname": "smbclientng.core.Credentials.Credentials.nt_raw", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.nt_raw", "kind": "variable", "doc": "<p></p>\n", "default_value": "''"}, {"fullname": "smbclientng.core.Credentials.Credentials.lm_hex", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.lm_hex", "kind": "variable", "doc": "<p></p>\n", "default_value": "''"}, {"fullname": "smbclientng.core.Credentials.Credentials.lm_raw", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.lm_raw", "kind": "variable", "doc": "<p></p>\n", "default_value": "''"}, {"fullname": "smbclientng.core.Credentials.Credentials.use_kerberos", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.use_kerberos", "kind": "variable", "doc": "<p></p>\n", "default_value": "False"}, {"fullname": "smbclientng.core.Credentials.Credentials.aesKey", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.aesKey", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.Credentials.Credentials.kdcHost", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.kdcHost", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.Credentials.Credentials.set_hashes", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.set_hashes", "kind": "function", "doc": "<p>Sets the LM and NT hashes for the credentials.</p>\n\n<p>This method parses the provided hash string and sets the LM and NT hash values accordingly.\nIf the hash string is valid and contains both LM and NT hashes, they are set directly.\nIf only one hash is provided, the other is set to its default value.\nIf the hash string is None or invalid, both hashes are set to None.</p>\n\n<p>Args:\n hashes (str): A string containing LM and NT hashes separated by a colon.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">hashes</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.Credentials.Credentials.canPassTheHash", "modulename": "smbclientng.core.Credentials", "qualname": "Credentials.canPassTheHash", "kind": "function", "doc": "<p>Determines if the current credentials can be used for a pass-the-hash attack.</p>\n\n<p>This method checks if both LM and NT hashes are available and not None. If both hashes are set,\nit indicates that the credentials may be used for a pass-the-hash attack.</p>\n\n<p>Returns:\n bool: True if both LM and NT hashes are available, False otherwise.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell", "modulename": "smbclientng.core.InteractiveShell", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.InteractiveShell.command_arguments_required", "modulename": "smbclientng.core.InteractiveShell", "qualname": "command_arguments_required", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">func</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.active_smb_connection_needed", "modulename": "smbclientng.core.InteractiveShell", "qualname": "active_smb_connection_needed", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">func</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.smb_share_is_set", "modulename": "smbclientng.core.InteractiveShell", "qualname": "smb_share_is_set", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">func</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell", "kind": "class", "doc": "<p>Class InteractiveShell is designed to manage the interactive command line interface for smbclient-ng.</p>\n\n<p>This class handles user input, executes commands, and manages the state of the SMB session. It provides\na command line interface for users to interact with SMB shares, execute commands like directory listing,\nfile transfer, and more.</p>\n\n<p>Attributes:\n smbSession (SMBConnection): The active SMB connection session.\n debug (bool): Flag to enable or disable debug mode.\n smb_share (str): The current SMB share in use.\n smb_path (str): The current path within the SMB share.\n commandCompleterObject (CommandCompleter): Object to handle command completion and help generation.</p>\n\n<p>Methods:\n __init__(self, smbSession, debug=False): Initializes the InteractiveShell with the given SMB session and debug mode.\n run(self): Starts the command line interface loop, processing user input until exit.</p>\n"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.__init__", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">sessionsManager</span>, </span><span class=\"param\"><span class=\"n\">config</span>, </span><span class=\"param\"><span class=\"n\">logger</span></span>)</span>"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.running", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.running", "kind": "variable", "doc": "<p></p>\n", "default_value": "True"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.modules", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.modules", "kind": "variable", "doc": "<p></p>\n", "default_value": "{}"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.sessionsManager", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.sessionsManager", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.config", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.config", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.logger", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.logger", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.commandCompleterObject", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.commandCompleterObject", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.run", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.run", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.process_line", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.process_line", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">commandLine</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_debug", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_debug", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span>, </span><span class=\"param\"><span class=\"n\">command</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_bat", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_bat", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_cd", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_cd", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_cat", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_cat", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_close", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_close", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span>, </span><span class=\"param\"><span class=\"n\">command</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_get", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_get", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_help", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_help", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span>, </span><span class=\"param\"><span class=\"n\">command</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_info", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_info", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lbat", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lbat", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lcat", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lcat", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lcd", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lcd", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lcp", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lcp", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lls", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lls", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span>, </span><span class=\"param\"><span class=\"n\">command</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lmkdir", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lmkdir", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lpwd", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lpwd", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span>, </span><span class=\"param\"><span class=\"n\">command</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lrename", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lrename", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lrm", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lrm", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_lrmdir", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_lrmdir", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_ltree", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_ltree", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span>, </span><span class=\"param\"><span class=\"n\">command</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_ls", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_ls", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_mkdir", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_mkdir", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_module", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_module", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_mount", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_mount", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_put", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_put", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_reconnect", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_reconnect", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span>, </span><span class=\"param\"><span class=\"n\">command</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_reset", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_reset", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span>, </span><span class=\"param\"><span class=\"n\">command</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_rm", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_rm", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_rmdir", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_rmdir", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_sizeof", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_sizeof", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_shares", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_shares", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_tree", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_tree", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_umount", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_umount", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.InteractiveShell.InteractiveShell.command_use", "modulename": "smbclientng.core.InteractiveShell", "qualname": "InteractiveShell.command_use", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"o\">*</span><span class=\"n\">args</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">kwargs</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.LocalFileIO", "modulename": "smbclientng.core.LocalFileIO", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO", "kind": "class", "doc": "<p>Class LocalFileIO is designed to handle local file input/output operations within the smbclient-ng tool.\nIt provides functionalities to open, read, write, and manage progress of file operations based on the expected size of the file.</p>\n\n<p>Attributes:\n mode (str): The mode in which the file should be opened (e.g., 'rb', 'wb').\n path (str): The path to the file that needs to be handled.\n expected_size (int, optional): The expected size of the file in bytes. This is used to display progress.\n debug (bool): Flag to enable debug mode which provides additional output during operations.</p>\n\n<p>Methods:\n __init__(self, mode, path=None, expected_size=None, debug=False): Initializes the LocalFileIO instance.\n write(self, data): Writes data to the file and updates the progress bar if expected size is provided.\n read(self, size): Reads data from the file up to the specified size and updates the progress bar if expected size is provided.</p>\n"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.__init__", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code multiline\">(<span class=\"param\">\t<span class=\"n\">mode</span>,</span><span class=\"param\">\t<span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span>,</span><span class=\"param\">\t<span class=\"n\">expected_size</span><span class=\"o\">=</span><span class=\"kc\">None</span>,</span><span class=\"param\">\t<span class=\"n\">keepRemotePath</span><span class=\"o\">=</span><span class=\"kc\">False</span>,</span><span class=\"param\">\t<span class=\"n\">logger</span><span class=\"o\">=</span><span class=\"kc\">None</span></span>)</span>"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.logger", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.logger", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.mode", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.mode", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.path", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.path", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.dir", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.dir", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.debug", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.debug", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.expected_size", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.expected_size", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.keepRemotePath", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.keepRemotePath", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.write", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.write", "kind": "function", "doc": "<p>Writes data to the file.</p>\n\n<p>This method writes the specified data to the file and updates the progress bar with the amount of data written if the expected size is set.</p>\n\n<p>Args:\n data (bytes): The data to be written to the file.</p>\n\n<p>Returns:\n int: The number of bytes written.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">data</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.read", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.read", "kind": "function", "doc": "<p>Reads a specified amount of data from the file.</p>\n\n<p>This method reads data from the file based on the size specified. It also updates the progress bar with the amount of data read if the expected size is set.</p>\n\n<p>Args:\n size (int): The number of bytes to read from the file.</p>\n\n<p>Returns:\n bytes: The data read from the file.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">size</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.close", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.close", "kind": "function", "doc": "<p>Closes the file descriptor and optionally removes the file.</p>\n\n<p>This method ensures that the file descriptor is properly closed and the file is removed if specified.\nIt also stops the progress bar if it was initiated and cleans up the object by deleting it.</p>\n\n<p>Args:\n remove (bool): If True, the file at the path will be removed after closing the file descriptor.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">remove</span><span class=\"o\">=</span><span class=\"kc\">False</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.LocalFileIO.LocalFileIO.set_error", "modulename": "smbclientng.core.LocalFileIO", "qualname": "LocalFileIO.set_error", "kind": "function", "doc": "<p>Sets an error message in the progress bar's description and modifies the progress bar to show only essential columns.</p>\n\n<p>This method is used to communicate error states or important messages directly in the progress bar interface.\nIt updates the task description with the provided message and simplifies the progress bar to show only the text\nand download columns, removing other elements like speed and time remaining which may not be relevant in an error state.</p>\n\n<p>Args:\n message (str): The error or status message to display in the progress bar.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">message</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.Logger", "modulename": "smbclientng.core.Logger", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Logger.LogLevel", "modulename": "smbclientng.core.Logger", "qualname": "LogLevel", "kind": "class", "doc": "<p>Create a collection of name/value pairs.</p>\n\n<p>Example enumeration:</p>\n\n<div class=\"pdoc-code codehilite\">\n<pre><span></span><code><span class=\"gp\">>>> </span><span class=\"k\">class</span> <span class=\"nc\">Color</span><span class=\"p\">(</span><span class=\"n\">Enum</span><span class=\"p\">):</span>\n<span class=\"gp\">... </span> <span class=\"n\">RED</span> <span class=\"o\">=</span> <span class=\"mi\">1</span>\n<span class=\"gp\">... </span> <span class=\"n\">BLUE</span> <span class=\"o\">=</span> <span class=\"mi\">2</span>\n<span class=\"gp\">... </span> <span class=\"n\">GREEN</span> <span class=\"o\">=</span> <span class=\"mi\">3</span>\n</code></pre>\n</div>\n\n<p>Access them by:</p>\n\n<ul>\n<li><p>attribute access:</p>\n\n<div class=\"pdoc-code codehilite\">\n<pre><span></span><code><span class=\"gp\">>>> </span><span class=\"n\">Color</span><span class=\"o\">.</span><span class=\"n\">RED</span>\n<span class=\"go\"><Color.RED: 1></span>\n</code></pre>\n</div></li>\n<li><p>value lookup:</p>\n\n<div class=\"pdoc-code codehilite\">\n<pre><span></span><code><span class=\"gp\">>>> </span><span class=\"n\">Color</span><span class=\"p\">(</span><span class=\"mi\">1</span><span class=\"p\">)</span>\n<span class=\"go\"><Color.RED: 1></span>\n</code></pre>\n</div></li>\n<li><p>name lookup:</p>\n\n<div class=\"pdoc-code codehilite\">\n<pre><span></span><code><span class=\"gp\">>>> </span><span class=\"n\">Color</span><span class=\"p\">[</span><span class=\"s1\">'RED'</span><span class=\"p\">]</span>\n<span class=\"go\"><Color.RED: 1></span>\n</code></pre>\n</div></li>\n</ul>\n\n<p>Enumerations can be iterated over, and know how many members they have:</p>\n\n<div class=\"pdoc-code codehilite\">\n<pre><span></span><code><span class=\"gp\">>>> </span><span class=\"nb\">len</span><span class=\"p\">(</span><span class=\"n\">Color</span><span class=\"p\">)</span>\n<span class=\"go\">3</span>\n</code></pre>\n</div>\n\n<div class=\"pdoc-code codehilite\">\n<pre><span></span><code><span class=\"gp\">>>> </span><span class=\"nb\">list</span><span class=\"p\">(</span><span class=\"n\">Color</span><span class=\"p\">)</span>\n<span class=\"go\">[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]</span>\n</code></pre>\n</div>\n\n<p>Methods can be added to enumerations, and members can have their own\nattributes -- see the documentation for details.</p>\n", "bases": "enum.Enum"}, {"fullname": "smbclientng.core.Logger.LogLevel.INFO", "modulename": "smbclientng.core.Logger", "qualname": "LogLevel.INFO", "kind": "variable", "doc": "<p></p>\n", "default_value": "<LogLevel.INFO: 1>"}, {"fullname": "smbclientng.core.Logger.LogLevel.DEBUG", "modulename": "smbclientng.core.Logger", "qualname": "LogLevel.DEBUG", "kind": "variable", "doc": "<p></p>\n", "default_value": "<LogLevel.DEBUG: 2>"}, {"fullname": "smbclientng.core.Logger.LogLevel.WARNING", "modulename": "smbclientng.core.Logger", "qualname": "LogLevel.WARNING", "kind": "variable", "doc": "<p></p>\n", "default_value": "<LogLevel.WARNING: 3>"}, {"fullname": "smbclientng.core.Logger.LogLevel.ERROR", "modulename": "smbclientng.core.Logger", "qualname": "LogLevel.ERROR", "kind": "variable", "doc": "<p></p>\n", "default_value": "<LogLevel.ERROR: 4>"}, {"fullname": "smbclientng.core.Logger.LogLevel.CRITICAL", "modulename": "smbclientng.core.Logger", "qualname": "LogLevel.CRITICAL", "kind": "variable", "doc": "<p></p>\n", "default_value": "<LogLevel.CRITICAL: 5>"}, {"fullname": "smbclientng.core.Logger.Logger", "modulename": "smbclientng.core.Logger", "qualname": "Logger", "kind": "class", "doc": "<p>A Logger class that provides logging functionalities with various levels such as INFO, DEBUG, WARNING, ERROR, and CRITICAL.\nIt supports color-coded output, which can be disabled, and can also log messages to a file.</p>\n\n<p>Attributes:\n __debug (bool): If True, debug level messages will be printed and logged.\n __nocolors (bool): If True, disables color-coded output.\n logfile (str|None): Path to a file where logs will be written. If None, logging to a file is disabled.</p>\n\n<p>Methods:\n __init__(debug=False, logfile=None, nocolors=False): Initializes the Logger instance.\n print(message=\"\"): Prints a message to stdout and logs it to a file if logging is enabled.\n info(message): Logs a message at the INFO level.\n debug(message): Logs a message at the DEBUG level if debugging is enabled.\n error(message): Logs a message at the ERROR level.</p>\n"}, {"fullname": "smbclientng.core.Logger.Logger.__init__", "modulename": "smbclientng.core.Logger", "qualname": "Logger.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">config</span>, </span><span class=\"param\"><span class=\"n\">logfile</span><span class=\"o\">=</span><span class=\"kc\">None</span></span>)</span>"}, {"fullname": "smbclientng.core.Logger.Logger.config", "modulename": "smbclientng.core.Logger", "qualname": "Logger.config", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Logger.Logger.logfile", "modulename": "smbclientng.core.Logger", "qualname": "Logger.logfile", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Logger.Logger.print", "modulename": "smbclientng.core.Logger", "qualname": "Logger.print", "kind": "function", "doc": "<p>Prints a message to stdout and logs it to a file if logging is enabled.</p>\n\n<p>This method prints the provided message to the standard output and also logs it to a file if a log file path is specified during the Logger instance initialization. The message can include color codes for color-coded output, which can be disabled by setting the <code>nocolors</code> attribute to True.</p>\n\n<p>Args:\n message (str): The message to be printed and logged.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">message</span><span class=\"o\">=</span><span class=\"s1\">''</span>, </span><span class=\"param\"><span class=\"n\">end</span><span class=\"o\">=</span><span class=\"s1\">'</span><span class=\"se\">\\n</span><span class=\"s1\">'</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.Logger.Logger.info", "modulename": "smbclientng.core.Logger", "qualname": "Logger.info", "kind": "function", "doc": "<p>Logs a message at the INFO level.</p>\n\n<p>This method logs the provided message at the INFO level. The message can include color codes for color-coded output, which can be disabled by setting the <code>nocolors</code> attribute to True. The message is also logged to a file if a log file path is specified during the Logger instance initialization.</p>\n\n<p>Args:\n message (str): The message to be logged at the INFO level.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">message</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.Logger.Logger.debug", "modulename": "smbclientng.core.Logger", "qualname": "Logger.debug", "kind": "function", "doc": "<p>Logs a message at the DEBUG level if debugging is enabled.</p>\n\n<p>This method logs the provided message at the DEBUG level if the <code>debug</code> attribute is set to True during the Logger instance initialization. The message can include color codes for color-coded output, which can be disabled by setting the <code>nocolors</code> attribute to True.</p>\n\n<p>Args:\n message (str): The message to be logged.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">message</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.Logger.Logger.error", "modulename": "smbclientng.core.Logger", "qualname": "Logger.error", "kind": "function", "doc": "<p>Logs an error message to the console and the log file.</p>\n\n<p>This method logs the provided error message to the standard error output and also logs it to a file if a log file path is specified during the Logger instance initialization. The message can include color codes for color-coded output, which can be disabled by setting the <code>nocolors</code> attribute to True.</p>\n\n<p>Args:\n message (str): The error message to be logged.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">message</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.Module", "modulename": "smbclientng.core.Module", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Module.Module", "modulename": "smbclientng.core.Module", "qualname": "Module", "kind": "class", "doc": "<p>A parent class for all modules in the smbclient-ng tool.</p>\n\n<p>This class provides common attributes and methods that are shared among different modules.</p>\n"}, {"fullname": "smbclientng.core.Module.Module.__init__", "modulename": "smbclientng.core.Module", "qualname": "Module.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">smbSession</span>, </span><span class=\"param\"><span class=\"n\">config</span>, </span><span class=\"param\"><span class=\"n\">logger</span></span>)</span>"}, {"fullname": "smbclientng.core.Module.Module.name", "modulename": "smbclientng.core.Module", "qualname": "Module.name", "kind": "variable", "doc": "<p></p>\n", "default_value": "''"}, {"fullname": "smbclientng.core.Module.Module.description", "modulename": "smbclientng.core.Module", "qualname": "Module.description", "kind": "variable", "doc": "<p></p>\n", "default_value": "''"}, {"fullname": "smbclientng.core.Module.Module.smbSession", "modulename": "smbclientng.core.Module", "qualname": "Module.smbSession", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.Module.Module.options", "modulename": "smbclientng.core.Module", "qualname": "Module.options", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.Module.Module.config", "modulename": "smbclientng.core.Module", "qualname": "Module.config", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Module.Module.logger", "modulename": "smbclientng.core.Module", "qualname": "Module.logger", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.Module.Module.parseArgs", "modulename": "smbclientng.core.Module", "qualname": "Module.parseArgs", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.Module.Module.run", "modulename": "smbclientng.core.Module", "qualname": "Module.run", "kind": "function", "doc": "<p>Placeholder method for running the module.</p>\n\n<p>This method should be implemented by subclasses to define the specific behavior of the module.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.Module.Module.processArguments", "modulename": "smbclientng.core.Module", "qualname": "Module.processArguments", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">parser</span>, </span><span class=\"param\"><span class=\"n\">arguments</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.ModuleArgumentParser", "modulename": "smbclientng.core.ModuleArgumentParser", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.ModuleArgumentParser.ModuleArgumentParser", "modulename": "smbclientng.core.ModuleArgumentParser", "qualname": "ModuleArgumentParser", "kind": "class", "doc": "<p>A custom argument parser for handling module-specific command-line arguments in the smbclientng application.</p>\n\n<p>This class extends the argparse.ArgumentParser and provides custom error handling specific to the needs of smbclientng modules.\nIt is designed to provide clear and user-friendly command-line interfaces for various modules within the smbclientng suite.</p>\n\n<p>Attributes:\n None</p>\n\n<p>Methods:\n error(message: str):\n Overrides the default error handling to provide a more informative error message and display the help text.</p>\n", "bases": "argparse.ArgumentParser"}, {"fullname": "smbclientng.core.ModuleArgumentParser.ModuleArgumentParser.exit_on_error", "modulename": "smbclientng.core.ModuleArgumentParser", "qualname": "ModuleArgumentParser.exit_on_error", "kind": "variable", "doc": "<p></p>\n", "default_value": "False"}, {"fullname": "smbclientng.core.ModuleArgumentParser.ModuleArgumentParser.error", "modulename": "smbclientng.core.ModuleArgumentParser", "qualname": "ModuleArgumentParser.error", "kind": "function", "doc": "<p>Overrides the default error handling of argparse.ArgumentParser to provide a custom error message and help display.</p>\n\n<p>This method is called when ArgumentParser encounters an error. It writes the error message to stderr,\ndisplays the help message, and then exits the program with a status code of 2.</p>\n\n<p>Args:\n message (str): The error message to be displayed.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">message</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession", "modulename": "smbclientng.core.SMBSession", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession", "kind": "class", "doc": "<p>Represents an SMB session for interacting with an SMB server.</p>\n\n<p>This class provides methods to manage and interact with an SMB server, including\nconnecting to the server, listing shares, uploading and downloading files, and\nmanaging directories and files on the server. It handles session initialization,\nauthentication, and cleanup.</p>\n\n<p>Attributes:\n host (str): The hostname or IP address of the SMB server.\n port (int): The port number on which the SMB server is listening.\n credentials (dict): Authentication credentials for the SMB server.\n config (dict, optional): Configuration options for the SMB session.\n smbClient (impacket.smbconnection.SMBConnection): The SMB connection instance.\n connected (bool): Connection status to the SMB server.\n available_shares (dict): A dictionary of available SMB shares.\n smb_share (str): The current SMB share in use.\n smb_cwd (str): The current working directory on the SMB share.\n smb_tree_id (int): The tree ID of the connected SMB share.</p>\n\n<p>Methods:\n close_smb_session(): Closes the current SMB session.\n init_smb_session(): Initializes the SMB session with the server.\n list_shares(): Lists all shares available on the SMB server.\n set_share(shareName): Sets the current SMB share.\n set_cwd(path): Sets the current working directory on the SMB share.\n put_file(localpath): Uploads a file to the current SMB share.\n get_file(remotepath, localpath): Downloads a file from the SMB share.\n mkdir(path): Creates a directory on the SMB share.\n rmdir(path): Removes a directory from the SMB share.\n rm(path): Removes a file from the SMB share.\n read_file(path): Reads a file from the SMB share.\n test_rights(sharename): Tests read and write access rights on a share.</p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.__init__", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">host</span>, </span><span class=\"param\"><span class=\"n\">port</span>, </span><span class=\"param\"><span class=\"n\">credentials</span>, </span><span class=\"param\"><span class=\"n\">config</span><span class=\"o\">=</span><span class=\"kc\">None</span>, </span><span class=\"param\"><span class=\"n\">logger</span><span class=\"o\">=</span><span class=\"kc\">None</span></span>)</span>"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.config", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.config", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.logger", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.logger", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.host", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.host", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.port", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.port", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.credentials", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.credentials", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.smbClient", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.smbClient", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.connected", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.connected", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.available_shares", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.available_shares", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.smb_share", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.smb_share", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.smb_cwd", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.smb_cwd", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.smb_tree_id", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.smb_tree_id", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.close_smb_session", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.close_smb_session", "kind": "function", "doc": "<p>Closes the current SMB session by disconnecting the SMB client.</p>\n\n<p>This method ensures that the SMB client connection is properly closed. It checks if the client is connected\nand if so, it closes the connection and resets the connection status.</p>\n\n<p>Raises:\n Exception: If the SMB client is not initialized or if there's an error during the disconnection process.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.init_smb_session", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.init_smb_session", "kind": "function", "doc": "<p>Initializes and establishes a session with the SMB server.</p>\n\n<p>This method sets up the SMB connection using either Kerberos or NTLM authentication based on the configuration.\nIt attempts to connect to the SMB server specified by the <code>address</code> attribute and authenticate using the credentials provided during the object's initialization.</p>\n\n<p>The method will print debug information if the <code>debug</code> attribute is set to True. Upon successful connection and authentication, it sets the <code>connected</code> attribute to True.</p>\n\n<p>Returns:\n bool: True if the connection and authentication are successful, False otherwise.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.ping_smb_session", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.ping_smb_session", "kind": "function", "doc": "<p>Tests the connectivity to the SMB server by sending an echo command.</p>\n\n<p>This method attempts to send an echo command to the SMB server to check if the session is still active.\nIt updates the <code>connected</code> attribute of the class based on the success or failure of the echo command.</p>\n\n<p>Returns:\n bool: True if the echo command succeeds (indicating the session is active), False otherwise.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.find", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.find", "kind": "function", "doc": "<p>Finds files and directories on the SMB share based on the provided paths and executes a callback function on each entry.</p>\n\n<p>This method traverses the specified paths on the SMB share, recursively exploring directories and invoking the callback\nfunction on each file or directory found. The callback function is called with three arguments: the entry object, the\nfull path of the entry, and the current depth of recursion.</p>\n\n<p>Args:\n paths (list, optional): A list of paths to start the search from. Defaults to an empty list.\n callback (function, optional): A function to be called on each entry found. The function should accept three arguments:\n the entry object, the full path of the entry, and the current depth of recursion. Defaults to None.</p>\n\n<p>Note:\n If the callback function is None, the method will print an error message and return without performing any action.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">paths</span><span class=\"o\">=</span><span class=\"p\">[]</span>, </span><span class=\"param\"><span class=\"n\">callback</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.get_file", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.get_file", "kind": "function", "doc": "<p>Retrieves a file from the specified path on the SMB share.</p>\n\n<p>This method attempts to retrieve a file from the given path within the currently connected SMB share.\nIf the path points to a directory, it skips the retrieval. It handles file retrieval by creating a local\nfile object and writing the contents of the remote file to it using the SMB client's getFile method.</p>\n\n<p>Parameters:\n path (str): The path of the file to retrieve. If None, uses the current smb_path.</p>\n\n<p>Returns:\n None</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span>, </span><span class=\"param\"><span class=\"n\">keepRemotePath</span><span class=\"o\">=</span><span class=\"kc\">False</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.get_file_recursively", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.get_file_recursively", "kind": "function", "doc": "<p>Recursively retrieves files from a specified path on the SMB share.</p>\n\n<p>This method navigates through all directories starting from the given path,\nand downloads all files found. It handles directories recursively, ensuring\nthat all nested files are retrieved. The method skips over directory entries\nand handles errors gracefully, attempting to continue the operation where possible.</p>\n\n<p>Parameters:\n path (str): The initial directory path from which to start the recursive file retrieval.\n If None, it starts from the root of the configured SMB share.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.get_entry", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.get_entry", "kind": "function", "doc": "<p>Retrieves information about a specific entry located at the provided path on the SMB share.</p>\n\n<p>This method checks if the specified path exists on the SMB share. If the path exists, it retrieves the details of the entry at that path, including the directory name and file name. If the entry is found, it returns the entry object; otherwise, it returns None.</p>\n\n<p>Args:\n path (str): The path of the entry to retrieve information about.</p>\n\n<p>Returns:\n Entry: An object representing the entry at the specified path, or None if the entry is not found.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.info", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.info", "kind": "function", "doc": "<p>Displays information about the server and optionally the shares.</p>\n\n<p>This method prints detailed information about the server's characteristics such as NetBIOS names, DNS details, OS information, and SMB capabilities. If the <code>share</code> parameter is set to True and a share is currently set, it will also attempt to display information about the share.</p>\n\n<p>Parameters:\n share (bool): If True, display information about the current share.\n server (bool): If True, display information about the server.</p>\n\n<p>Returns:\n None</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">share</span><span class=\"o\">=</span><span class=\"kc\">True</span>, </span><span class=\"param\"><span class=\"n\">server</span><span class=\"o\">=</span><span class=\"kc\">True</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.list_contents", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.list_contents", "kind": "function", "doc": "<p>Lists the contents of a specified directory on the SMB share.</p>\n\n<p>This method retrieves the contents of a directory specified by <code>shareName</code> and <code>path</code>. If <code>shareName</code> or <code>path</code>\nis not provided, it defaults to the instance's current SMB share or path. The method returns a dictionary with\nthe long names of the files and directories as keys and their respective SMB entry objects as values.</p>\n\n<p>Args:\n shareName (str, optional): The name of the SMB share. Defaults to the current SMB share if None.\n path (str, optional): The directory path to list contents from. Defaults to the current path if None.</p>\n\n<p>Returns:\n dict: A dictionary with file and directory names as keys and their SMB entry objects as values.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.list_shares", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.list_shares", "kind": "function", "doc": "<p>Lists all the shares available on the connected SMB server.</p>\n\n<p>This method queries the SMB server to retrieve a list of all available shares. It populates the <code>shares</code> dictionary\nwith key-value pairs where the key is the share name and the value is a dictionary containing details about the share\nsuch as its name, type, raw type, and any comments associated with the share.</p>\n\n<p>Returns:\n dict: A dictionary containing information about each share available on the server.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.mkdir", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.mkdir", "kind": "function", "doc": "<p>Creates a directory at the specified path on the SMB share.</p>\n\n<p>This method takes a path and attempts to create the directory structure on the SMB share. If the path includes\nnested directories, it will create each directory in the sequence. If a directory already exists, it will skip\nthe creation for that directory without raising an error.</p>\n\n<p>Args:\n path (str, optional): The full path of the directory to create on the SMB share. Defaults to None.</p>\n\n<p>Note:\n The path should use forward slashes ('/') which will be converted to backslashes (ntpath.sep) for SMB compatibility.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.mount", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.mount", "kind": "function", "doc": "<p>Generates the command to mount an SMB share on different platforms.</p>\n\n<p>This method takes the local mount point and the remote path of the SMB share and generates the appropriate mount command based on the platform.\nIt constructs the mount command using the provided parameters and executes it using the os.system() function.</p>\n\n<p>Args:\n local_mount_point (str): The local directory where the SMB share will be mounted.\n remote_path (str): The remote path on the SMB share to be mounted.</p>\n\n<p>Note:\n - For Windows platform, the command uses 'net use' to mount the share.\n - For Linux platform, the command uses 'mount' to mount the share.\n - For macOS platform, the command uses 'mount_smbfs' to mount the share.\n - If the platform is not supported, an error message is displayed.</p>\n\n<p>Returns:\n None</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">local_mount_point</span>, </span><span class=\"param\"><span class=\"n\">remote_path</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.path_exists", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.path_exists", "kind": "function", "doc": "<p>Checks if the specified path exists on the SMB share.</p>\n\n<p>This method determines if a given path exists on the SMB share by attempting to list the contents of the path.\nIf the path listing is successful and returns one or more entries, the path is considered to exist.</p>\n\n<p>Args:\n path (str, optional): The path to check on the SMB share. Defaults to None.</p>\n\n<p>Returns:\n bool: True if the path exists, False otherwise or if an error occurs.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.path_isdir", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.path_isdir", "kind": "function", "doc": "<p>Checks if the specified path is a directory on the SMB share.</p>\n\n<p>This method determines if a given path corresponds to a directory on the SMB share. It does this by listing the\ncontents of the path and filtering for entries that match the basename of the path and are marked as directories.</p>\n\n<p>Args:\n path (str, optional): The path to check on the SMB share. Defaults to None.</p>\n\n<p>Returns:\n bool: True if the path is a directory, False otherwise or if an error occurs.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">pathFromRoot</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.path_isfile", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.path_isfile", "kind": "function", "doc": "<p>Checks if the specified path is a file on the SMB share.</p>\n\n<p>This method determines if a given path corresponds to a file on the SMB share. It does this by listing the\ncontents of the path and filtering for entries that match the basename of the path and are not marked as directories.</p>\n\n<p>Args:\n path (str, optional): The path to check on the SMB share. Defaults to None.</p>\n\n<p>Returns:\n bool: True if the path is a file, False otherwise or if an error occurs.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">pathFromRoot</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.put_file", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.put_file", "kind": "function", "doc": "<p>Uploads a single file to the SMB share.</p>\n\n<p>This method takes a local file path, opens the file, and uploads it to the SMB share at the specified path.\nIt handles exceptions such as broken pipe errors or keyboard interrupts by closing and reinitializing the SMB session.\nGeneral exceptions are caught and logged, with a traceback provided if debugging is enabled.</p>\n\n<p>Args:\n localpath (str, optional): The local file path of the file to be uploaded. Defaults to None.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">localpath</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.put_file_recursively", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.put_file_recursively", "kind": "function", "doc": "<p>Recursively uploads files from a specified local directory to the SMB share.</p>\n\n<p>This method walks through the given local directory and all its subdirectories, uploading each file to the\ncorresponding directory structure on the SMB share. It first checks if the local path is a directory. If it is,\nit iterates over all files and directories within the local path, creating necessary directories on the SMB share\nand uploading files. If the local path is not a directory, it prints an error message.</p>\n\n<p>Args:\n localpath (str, optional): The local directory path from which files will be uploaded. Defaults to None.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">localpath</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.read_file", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.read_file", "kind": "function", "doc": "<p>Reads a file from the SMB share.</p>\n\n<p>This method attempts to read the contents of a file specified by the <code>path</code> parameter from the SMB share.\nIt constructs the full path to the file, checks if the path is a valid file, and then reads the file content\ninto a byte stream which is returned to the caller.</p>\n\n<p>Args:\n path (str, optional): The path of the file to be read from the SMB share. Defaults to None.</p>\n\n<p>Returns:\n bytes: The content of the file as a byte stream, or None if the file does not exist or an error occurs.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.rmdir", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.rmdir", "kind": "function", "doc": "<p>Removes a directory from the SMB share at the specified path.</p>\n\n<p>This method attempts to delete a directory located at the given path on the SMB share. If the operation fails,\nit prints an error message indicating the failure and the reason. If debugging is enabled, it also prints\nthe stack trace of the exception.</p>\n\n<p>Args:\n path (str, optional): The path of the directory to be removed on the SMB share. Defaults to None.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.rm", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.rm", "kind": "function", "doc": "<p>Removes a file from the SMB share at the specified path.</p>\n\n<p>This method attempts to delete a file located at the given path on the SMB share. If the operation fails,\nit prints an error message indicating the failure and the reason. If debugging is enabled, it also prints\nthe stack trace of the exception.</p>\n\n<p>Args:\n path (str, optional): The path of the file to be removed on the SMB share. Defaults to None.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.tree", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.tree", "kind": "function", "doc": "<p>Recursively lists the directory structure of the SMB share starting from the specified path.</p>\n\n<p>This function prints a visual representation of the directory tree of the remote SMB share. It uses\nrecursion to navigate through directories and lists all files and subdirectories in each directory.\nThe output is color-coded and formatted to enhance readability, with directories highlighted in cyan.</p>\n\n<p>Args:\n path (str, optional): The starting path on the SMB share from which to begin listing the tree.\n Defaults to the root of the current share.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.umount", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.umount", "kind": "function", "doc": "<p>Unmounts the specified local mount point of the remote share.</p>\n\n<p>This method unmounts the specified local mount point of the remote share based on the platform.\nIt supports Windows, Linux, and macOS platforms for unmounting.</p>\n\n<p>Parameters:\n local_mount_point (str): The local mount point to unmount.</p>\n\n<p>Raises:\n None</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">local_mount_point</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.test_rights", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.test_rights", "kind": "function", "doc": "<p>Tests the read and write access rights of the current SMB session.</p>\n\n<p>This method checks the read and write access rights of the current SMB session by attempting to list paths and create/delete temporary directories.</p>\n\n<p>Returns:\n dict: A dictionary containing the read and write access rights status.\n - \"readable\" (bool): Indicates if the session has read access rights.\n - \"writable\" (bool): Indicates if the session has write access rights.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">sharename</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.set_share", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.set_share", "kind": "function", "doc": "<p>Sets the current SMB share to the specified share name.</p>\n\n<p>This method updates the SMB session to use the specified share name. It checks if the share name is valid\nand updates the smb_share attribute of the SMBSession instance.</p>\n\n<p>Parameters:\n shareName (str): The name of the share to set as the current SMB share.</p>\n\n<p>Raises:\n ValueError: If the shareName is None or an empty string.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">shareName</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SMBSession.SMBSession.set_cwd", "modulename": "smbclientng.core.SMBSession", "qualname": "SMBSession.set_cwd", "kind": "function", "doc": "<p>Sets the current working directory on the SMB share to the specified path.</p>\n\n<p>This method updates the current working directory (cwd) of the SMB session to the given path if it is a valid directory.\nIf the specified path is not a directory, the cwd remains unchanged.</p>\n\n<p>Parameters:\n path (str): The path to set as the current working directory.</p>\n\n<p>Raises:\n ValueError: If the specified path is not a directory.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">path</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SessionsManager", "modulename": "smbclientng.core.SessionsManager", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager", "kind": "class", "doc": "<p>A class to manage SMB sessions.</p>\n\n<p>This class is responsible for creating, managing, and switching between multiple SMB sessions. It allows for the creation of new sessions with specified credentials and hosts, and provides methods to switch between existing sessions. It also keeps track of the current session and its ID.</p>\n\n<p>Attributes:\n next_session_id (int): The next available session ID.\n current_session (SMBSession): The currently active SMB session.\n current_session_id (int): The ID of the currently active session.\n sessions (dict): A dictionary of all active sessions, keyed by their session ID.</p>\n"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.__init__", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">config</span>, </span><span class=\"param\"><span class=\"n\">logger</span></span>)</span>"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.next_session_id", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.next_session_id", "kind": "variable", "doc": "<p></p>\n", "default_value": "1"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.current_session", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.current_session", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.current_session_id", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.current_session_id", "kind": "variable", "doc": "<p></p>\n", "default_value": "None"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.sessions", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.sessions", "kind": "variable", "doc": "<p></p>\n", "default_value": "{}"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.config", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.config", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.logger", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.logger", "kind": "variable", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.create_new_session", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.create_new_session", "kind": "function", "doc": "<p>Creates a new session with the given session information.</p>\n\n<p>Args:\n session_info (dict): Information necessary to start a new session.</p>\n\n<p>Returns:\n None</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">credentials</span>, </span><span class=\"param\"><span class=\"n\">host</span>, </span><span class=\"param\"><span class=\"n\">port</span><span class=\"o\">=</span><span class=\"mi\">445</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.switch_session", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.switch_session", "kind": "function", "doc": "<p>Switches the current session to the session with the specified ID.</p>\n\n<p>Args:\n session_id (int): The ID of the session to switch to.</p>\n\n<p>Returns:\n bool: True if the session was successfully switched, False otherwise.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">session_id</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.delete_session", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.delete_session", "kind": "function", "doc": "<p>Deletes a session with the given session ID.</p>\n\n<p>Args:\n session_id (int): The ID of the session to delete.</p>\n\n<p>Returns:\n bool: True if the session was successfully deleted, False otherwise.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">session_id</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.SessionsManager.SessionsManager.process_command_line", "modulename": "smbclientng.core.SessionsManager", "qualname": "SessionsManager.process_command_line", "kind": "function", "doc": "<p>Processes command line arguments to manage SMB sessions.</p>\n\n<p>This function parses the command line arguments provided to the application and determines the appropriate action to take,\nsuch as creating, interacting, deleting, or listing SMB sessions, or executing a command in one or more sessions.</p>\n\n<p>Args:\n arguments (list of str): The command line arguments.</p>\n\n<p>Returns:\n None</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.utils", "modulename": "smbclientng.core.utils", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.core.utils.parse_lm_nt_hashes", "modulename": "smbclientng.core.utils", "qualname": "parse_lm_nt_hashes", "kind": "function", "doc": "<p>Parse the input string containing LM and NT hash values and return them separately.</p>\n\n<p>This function takes a string containing LM and NT hash values, typically separated by a colon (:).\nIt returns the LM and NT hash values as separate strings. If only one hash value is provided, it is\nassumed to be the NT hash and the LM hash is set to its default value. If no valid hash values are\nfound, both return values are empty strings.</p>\n\n<p>Args:\n lm_nt_hashes_string (str): A string containing LM and NT hash values separated by a colon.</p>\n\n<p>Returns:\n tuple: A tuple containing two strings (lm_hash_value, nt_hash_value).\n - lm_hash_value: The LM hash value or its default if not provided.\n - nt_hash_value: The NT hash value or its default if not provided.</p>\n\n<p>Extracted from p0dalirius/sectools library\nSrc: <a href=\"https://github.com/p0dalirius/sectools/blob/7bb3f5cb7815ad4d4845713c8739e2e2b0ea4e75/sectools/windows/crypto.py#L11-L24\">https://github.com/p0dalirius/sectools/blob/7bb3f5cb7815ad4d4845713c8739e2e2b0ea4e75/sectools/windows/crypto.py#L11-L24</a></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">lm_nt_hashes_string</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.utils.b_filesize", "modulename": "smbclientng.core.utils", "qualname": "b_filesize", "kind": "function", "doc": "<p>Convert a file size from bytes to a more readable format using the largest appropriate unit.</p>\n\n<p>This function takes an integer representing a file size in bytes and converts it to a human-readable\nstring using the largest appropriate unit from bytes (B) to petabytes (PB). The result is rounded to\ntwo decimal places.</p>\n\n<p>Args:\n l (int): The file size in bytes.</p>\n\n<p>Returns:\n str: A string representing the file size in a more readable format, including the appropriate unit.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">l</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.utils.unix_permissions", "modulename": "smbclientng.core.utils", "qualname": "unix_permissions", "kind": "function", "doc": "<p>Generate a string representing the Unix-style permissions for a given file or directory.</p>\n\n<p>This function uses the os.lstat() method to retrieve the status of the specified file or directory,\nthen constructs a string that represents the Unix-style permissions based on the mode of the file.</p>\n\n<p>Args:\n entryname (str): The path to the file or directory for which permissions are being determined.</p>\n\n<p>Returns:\n str: A string of length 10 representing the Unix-style permissions (e.g., '-rwxr-xr--').\n The first character is either 'd' (directory), '-' (not a directory), followed by\n three groups of 'r', 'w', 'x' (read, write, execute permissions) for owner, group,\n and others respectively.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">entryname</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.utils.STYPE_MASK", "modulename": "smbclientng.core.utils", "qualname": "STYPE_MASK", "kind": "function", "doc": "<p>Extracts the share type flags from a given share type value.</p>\n\n<p>This function uses bitwise operations to determine which share type flags are set in the provided <code>stype_value</code>.\nIt checks against known share type flags and returns a list of the flags that are set.</p>\n\n<p>Parameters:\n stype_value (int): The share type value to analyze, typically obtained from SMB share properties.</p>\n\n<p>Returns:\n list: A list of strings, where each string represents a share type flag that is set in the input value.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">stype_value</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.utils.windows_ls_entry", "modulename": "smbclientng.core.utils", "qualname": "windows_ls_entry", "kind": "function", "doc": "<p>This function generates a metadata string based on the attributes of the provided entry object.</p>\n\n<p>Parameters:\n entry (object): An object representing a file or directory entry.</p>\n\n<p>Returns:\n str: A string representing the metadata of the entry, including attributes like directory, archive, compressed, hidden, normal, readonly, system, and temporary.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">entry</span>, </span><span class=\"param\"><span class=\"n\">config</span>, </span><span class=\"param\"><span class=\"n\">pathToPrint</span><span class=\"o\">=</span><span class=\"kc\">None</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.utils.local_tree", "modulename": "smbclientng.core.utils", "qualname": "local_tree", "kind": "function", "doc": "<p>This function recursively lists the contents of a directory in a tree-like format.</p>\n\n<p>Parameters:\n path (str): The path to the directory to list.\n config (object): Configuration settings which may affect the output, such as whether to use colors.</p>\n\n<p>Returns:\n None: This function does not return anything but prints the directory tree to the console.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">path</span>, </span><span class=\"param\"><span class=\"n\">config</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.utils.resolve_local_files", "modulename": "smbclientng.core.utils", "qualname": "resolve_local_files", "kind": "function", "doc": "<p>Resolves local file paths based on the provided arguments.</p>\n\n<p>This function takes a list of arguments, which can include wildcard patterns, and resolves them to actual file paths.\nIf an argument contains a wildcard ('*'), it attempts to match files in the specified directory against the pattern.\nIf the argument does not contain a wildcard, it is added to the list of resolved files as is.</p>\n\n<p>Args:\n arguments (list): A list of file path arguments, which may include wildcard patterns.</p>\n\n<p>Returns:\n list: A list of resolved file paths that match the provided arguments.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">arguments</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.utils.resolve_remote_files", "modulename": "smbclientng.core.utils", "qualname": "resolve_remote_files", "kind": "function", "doc": "<p>Resolves remote file paths based on the provided arguments using an SMB session.</p>\n\n<p>This function takes a list of arguments, which can include wildcard patterns, and resolves them to actual remote file paths.\nIf an argument contains a wildcard ('*'), it attempts to match files in the specified remote directory against the pattern.\nIf the argument does not contain a wildcard, it is added to the list of resolved files as is.</p>\n\n<p>Args:\n smbsession (SMBSession): The SMB session through which to access the files.\n arguments (list): A list of file path arguments, which may include wildcard patterns.</p>\n\n<p>Returns:\n list: A list of resolved remote file paths that match the provided arguments.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">smbSession</span>, </span><span class=\"param\"><span class=\"n\">arguments</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.core.utils.is_port_open", "modulename": "smbclientng.core.utils", "qualname": "is_port_open", "kind": "function", "doc": "<p>Check if a specific port on a target host is open.</p>\n\n<p>This function attempts to establish a TCP connection to the specified port on the target host.\nIf the connection is successful, it indicates that the port is open. If the connection fails,\nit indicates that the port is closed or the host is unreachable.</p>\n\n<p>Args:\n target (str): The hostname or IP address of the target host.\n port (int): The port number to check.</p>\n\n<p>Returns:\n bool: True if the port is open, False otherwise.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">target</span>, </span><span class=\"param\"><span class=\"n\">port</span></span><span class=\"return-annotation\">) -> <span class=\"nb\">bool</span>:</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.modules", "modulename": "smbclientng.modules", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.modules.Find", "modulename": "smbclientng.modules.Find", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.modules.Find.Find", "modulename": "smbclientng.modules.Find", "qualname": "Find", "kind": "class", "doc": "<p>A class to search for files in a directory hierarchy.</p>\n\n<p>This class provides functionality to search for files based on various criteria in a directory hierarchy.</p>\n", "bases": "smbclientng.core.Module.Module"}, {"fullname": "smbclientng.modules.Find.Find.name", "modulename": "smbclientng.modules.Find", "qualname": "Find.name", "kind": "variable", "doc": "<p></p>\n", "default_value": "'find'"}, {"fullname": "smbclientng.modules.Find.Find.description", "modulename": "smbclientng.modules.Find", "qualname": "Find.description", "kind": "variable", "doc": "<p></p>\n", "default_value": "'Search for files in a directory hierarchy'"}, {"fullname": "smbclientng.modules.Find.Find.parseArgs", "modulename": "smbclientng.modules.Find", "qualname": "Find.parseArgs", "kind": "function", "doc": "<p>Parses the command line arguments provided to the module.</p>\n\n<p>This method initializes the argument parser with the module's name and description, and defines all the necessary arguments that the module accepts. It then parses the provided command line arguments based on these definitions.</p>\n\n<p>Args:\n arguments (str): A string of command line arguments.</p>\n\n<p>Returns:\n ModuleArgumentParser.Namespace | None: The parsed arguments as a Namespace object if successful, None if there are no arguments or help is requested.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.modules.Find.Find.run", "modulename": "smbclientng.modules.Find", "qualname": "Find.run", "kind": "function", "doc": "<p>This function recursively searches for files in a directory hierarchy and prints the results based on specified criteria.</p>\n\n<p>Args:\n base_dir (str): The base directory to start the search from.\n paths (list): List of paths to search within the base directory.\n depth (int): The current depth level in the directory hierarchy.</p>\n\n<p>Returns:\n None</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.modules.GPPPasswords", "modulename": "smbclientng.modules.GPPPasswords", "kind": "module", "doc": "<p></p>\n"}, {"fullname": "smbclientng.modules.GPPPasswords.GPPPasswords", "modulename": "smbclientng.modules.GPPPasswords", "qualname": "GPPPasswords", "kind": "class", "doc": "<p>GPPPasswords is a module designed to search and retrieve stored Group Policy Preferences (GPP) passwords from specified network shares. \nIt leverages the SMB protocol to access files across the network, parse them, and extract credentials that are often stored within Group Policy Preferences files.</p>\n\n<p>This module is particularly useful in penetration testing scenarios where discovering stored credentials can lead to further system access or reveal poor security practices.</p>\n\n<p>Attributes:\n name (str): The name of the module, used in command line invocation.\n description (str): A brief description of what the module does.</p>\n\n<p>Methods:\n parseArgs(arguments): Parses and handles command line arguments for the module.\n parse_xmlfile_content(pathtofile): Parses the content of an XML file to extract credentials.</p>\n", "bases": "smbclientng.core.Module.Module"}, {"fullname": "smbclientng.modules.GPPPasswords.GPPPasswords.name", "modulename": "smbclientng.modules.GPPPasswords", "qualname": "GPPPasswords.name", "kind": "variable", "doc": "<p></p>\n", "default_value": "'gpppasswords'"}, {"fullname": "smbclientng.modules.GPPPasswords.GPPPasswords.description", "modulename": "smbclientng.modules.GPPPasswords", "qualname": "GPPPasswords.description", "kind": "variable", "doc": "<p></p>\n", "default_value": "'Searches for Group Policy Preferences Passwords in a share.'"}, {"fullname": "smbclientng.modules.GPPPasswords.GPPPasswords.parseArgs", "modulename": "smbclientng.modules.GPPPasswords", "qualname": "GPPPasswords.parseArgs", "kind": "function", "doc": "<p>Parses the command line arguments provided to the module.</p>\n\n<p>This method initializes the argument parser with the module's name and description, and defines all the necessary arguments that the module accepts. It then parses the provided command line arguments based on these definitions.</p>\n\n<p>Args:\n arguments (str): A string of command line arguments.</p>\n\n<p>Returns:\n ModuleArgumentParser.Namespace | None: The parsed arguments as a Namespace object if successful, None if there are no arguments or help is requested.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.modules.GPPPasswords.GPPPasswords.parse_xmlfile_content", "modulename": "smbclientng.modules.GPPPasswords", "qualname": "GPPPasswords.parse_xmlfile_content", "kind": "function", "doc": "<p>Parses the content of an XML file to extract credentials related to Group Policy Preferences.</p>\n\n<p>This method attempts to retrieve and parse the content of the specified XML file from the SMB share. It looks for credentials stored within the XML structure, specifically targeting the 'cpassword' attribute which is commonly used for storing encrypted passwords in Group Policy Preferences files.</p>\n\n<p>Args:\n pathtofile (str): The path to the XML file on the SMB share.</p>\n\n<p>Returns:\n list: A list of dictionaries, each containing details about found credentials such as username, encrypted and decrypted passwords, and other relevant attributes.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">pathtofile</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.modules.GPPPasswords.GPPPasswords.decrypt_password", "modulename": "smbclientng.modules.GPPPasswords", "qualname": "GPPPasswords.decrypt_password", "kind": "function", "doc": "<p>Decrypts a password from its Base64 encoded form using a known AES key and IV.</p>\n\n<p>This method takes a Base64 encoded string which is encrypted using AES-CBC with a fixed key and IV as per Microsoft's published details. It decodes the Base64 string, decrypts it using the AES key and IV, and returns the plaintext password.</p>\n\n<p>Args:\n pw_enc_b64 (str): The Base64 encoded string of the encrypted password.</p>\n\n<p>Returns:\n str: The decrypted password in plaintext, or an empty string if input is empty or decryption fails.</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">pw_enc_b64</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, {"fullname": "smbclientng.modules.GPPPasswords.GPPPasswords.run", "modulename": "smbclientng.modules.GPPPasswords", "qualname": "GPPPasswords.run", "kind": "function", "doc": "<p>This function recursively searches for files in a directory hierarchy and prints the results based on specified criteria.</p>\n\n<p>Args:\n base_dir (str): The base directory to start the search from.\n paths (list): List of paths to search within the base directory.\n depth (int): The current depth level in the directory hierarchy.</p>\n\n<p>Returns:\n None</p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"bp\">self</span>, </span><span class=\"param\"><span class=\"n\">arguments</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}];
// mirrored in build-search-index.js (part 1)
// Also split on html tags. this is a cheap heuristic, but good enough.
elasticlunr.tokenizer.setSeperator(/[\s\-.;&_'"=,()]+|<[^>]*>/);
let searchIndex;
if (docs._isPrebuiltIndex) {
console.info("using precompiled search index");
searchIndex = elasticlunr.Index.load(docs);
} else {
console.time("building search index");
// mirrored in build-search-index.js (part 2)
searchIndex = elasticlunr(function () {
this.pipeline.remove(elasticlunr.stemmer);
this.pipeline.remove(elasticlunr.stopWordFilter);
this.addField("qualname");
this.addField("fullname");
this.addField("annotation");
this.addField("default_value");
this.addField("signature");
this.addField("bases");
this.addField("doc");
this.setRef("fullname");
});
for (let doc of docs) {
searchIndex.addDoc(doc);
}
console.timeEnd("building search index");
}
return (term) => searchIndex.search(term, {
fields: {
qualname: {boost: 4},
fullname: {boost: 2},
annotation: {boost: 2},
default_value: {boost: 2},
signature: {boost: 2},
bases: {boost: 2},
doc: {boost: 1},
},
expand: true
});
})();