packetsnitch 1.5.605 → 1.5.606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.webpack/x64/main/index.js +2 -0
- package/.webpack/x64/main/index.js.map +1 -0
- package/.webpack/x64/renderer/main_window/index.html +3 -0
- package/.webpack/x64/renderer/main_window/index.js +3 -0
- package/.webpack/x64/renderer/main_window/index.js.LICENSE.txt +36 -0
- package/.webpack/x64/renderer/main_window/index.js.map +1 -0
- package/.webpack/x64/renderer/main_window/preload.js +2 -0
- package/.webpack/x64/renderer/main_window/preload.js.map +1 -0
- package/package.json +2 -2
- package/spec.ejs +62 -0
- package/.webpack/main/index.js +0 -1697
- package/.webpack/main/index.js.map +0 -1
- package/.webpack/renderer/main_window/index.html +0 -1036
- package/.webpack/renderer/main_window/index.js +0 -4736
- package/.webpack/renderer/main_window/preload.js +0 -1418
- /package/.webpack/{renderer → x64/renderer}/assets/css/rubikglitch.woff2 +0 -0
- /package/.webpack/{renderer → x64/renderer}/assets/css/style.css +0 -0
- /package/.webpack/{renderer → x64/renderer}/assets/images/loading.gif +0 -0
- /package/.webpack/{renderer → x64/renderer}/assets/images/logo.webp +0 -0
- /package/.webpack/{renderer → x64/renderer}/assets/images/packet-snitch-tag.webp +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(()=>{var e={288(e){"use strict";e.exports=require("electron")}},o={};const{contextBridge:n,ipcRenderer:i}=function n(i){var t=o[i];if(void 0!==t)return t.exports;var a=o[i]={exports:{}};return e[i](a,a.exports,n),a.exports}(288);n.exposeInMainWorld("jsonapi",{onJsonData:e=>{i.on("json-data",(o,n)=>{e(n)})}}),n.exposeInMainWorld("snitchapi",{runBackendCommand:(e,o)=>i.invoke("run-backend-command",e,o)}),n.exposeInMainWorld("getfileapi",{selectFile:()=>i.invoke("select-file")}),n.exposeInMainWorld("api",{onError:e=>{i.on("backend-error",(o,n)=>{e(n)})}}),n.exposeInMainWorld("fsize",{getFSize:()=>i.invoke("file-size")}),n.exposeInMainWorld("saveapi",{saveJson:e=>i.invoke("save-json",e),savePacket:e=>i.invoke("save-packet",e),savePayload:e=>i.invoke("save-payload",e),saveCookieJar:e=>i.invoke("save-cookie-jar",e),saveHttpBody:(e,o)=>i.invoke("save-http-body",e,o),saveNotes:e=>i.invoke("save-notes",e)}),n.exposeInMainWorld("previewapi",{previewHttpBody:(e,o)=>i.invoke("preview-http-body",e,o)}),n.exposeInMainWorld("browserapi",{openExternalUrl:e=>i.invoke("open-external-url",e)}),n.exposeInMainWorld("quitapi",{quitApp:()=>i.invoke("quit-app"),promptSaveOnExit:()=>i.invoke("prompt-save-session-on-exit")}),n.exposeInMainWorld("installapi",{checkFirstRun:()=>i.invoke("check-first-run"),dismissFirstRun:()=>i.invoke("dismiss-first-run")}),n.exposeInMainWorld("logapi",{append:e=>i.invoke("append-activity-log",e),getPath:()=>i.invoke("get-activity-log-path"),getEntries:()=>i.invoke("get-activity-log-entries"),onEntry:e=>{const o=(o,n)=>{e(n)};return i.on("activity-log-entry",o),()=>i.removeListener("activity-log-entry",o)}})})();
|
|
2
|
+
//# sourceMappingURL=preload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main_window/preload.js","mappings":"iCAAAA,EAAOC,QAAUC,QAAQ,W,GCCrBC,EAA2B,CAAC,ECDhC,MAAM,cAAEC,EAAa,YAAEC,GDIvB,SAASC,EAAoBC,GAE5B,IAAIC,EAAeL,EAAyBI,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaP,QAGrB,IAAID,EAASG,EAAyBI,GAAY,CAGjDN,QAAS,CAAC,GAOX,OAHAS,EAAoBH,GAAUP,EAAQA,EAAOC,QAASK,GAG/CN,EAAOC,OACf,CCtBuC,CAAQ,KAE/CG,EAAcO,kBAAkB,UAAW,CACzCC,WAAaC,IACXR,EAAYS,GAAG,YAAa,CAACC,EAAOC,KAClCH,EAASG,QAKfZ,EAAcO,kBAAkB,YAAa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,IAGX,OADA1C,EAAYS,GAAG,qBAAsBqC,GAC9B,IAAM9C,EAAY+C,eAAe,qBAAsBD,K","sources":["webpack://packetsnitch/external commonjs2 \"electron\"","webpack://packetsnitch/webpack/bootstrap","webpack://packetsnitch/./src/preload.js"],"sourcesContent":["module.exports = require(\"electron\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","const { contextBridge, ipcRenderer } = require('electron');\n\ncontextBridge.exposeInMainWorld('jsonapi', {\n onJsonData: (callback) => {\n ipcRenderer.on('json-data', (event, hostsJsonData) => {\n callback(hostsJsonData);\n });\n },\n});\n\ncontextBridge.exposeInMainWorld('snitchapi', {\n runBackendCommand: (filename, useLLM) =>\n ipcRenderer.invoke('run-backend-command', filename, useLLM),\n});\n\ncontextBridge.exposeInMainWorld('getfileapi', {\n selectFile: () => ipcRenderer.invoke('select-file'),\n});\n\ncontextBridge.exposeInMainWorld('api', {\n onError: (callback) => {\n ipcRenderer.on('backend-error', (_event, message) => {\n callback(message);\n });\n },\n});\n\ncontextBridge.exposeInMainWorld('fsize', {\n getFSize: () => ipcRenderer.invoke('file-size'), // Expose this method to renderer\n});\n\ncontextBridge.exposeInMainWorld('saveapi', {\n saveJson: (jsonData) => ipcRenderer.invoke('save-json', jsonData),\n savePacket: (packetData) => ipcRenderer.invoke('save-packet', packetData),\n savePayload: (payloadHex) => ipcRenderer.invoke('save-payload', payloadHex),\n saveCookieJar: (cookieJarText) =>\n ipcRenderer.invoke('save-cookie-jar', cookieJarText),\n saveHttpBody: (bodyHex, contentType) =>\n ipcRenderer.invoke('save-http-body', bodyHex, contentType),\n saveNotes: (notesText) => ipcRenderer.invoke('save-notes', notesText),\n});\n\ncontextBridge.exposeInMainWorld('previewapi', {\n previewHttpBody: (bodyHex, contentType) =>\n ipcRenderer.invoke('preview-http-body', bodyHex, contentType),\n});\n\ncontextBridge.exposeInMainWorld('browserapi', {\n openExternalUrl: (url) => ipcRenderer.invoke('open-external-url', url),\n});\n\ncontextBridge.exposeInMainWorld('quitapi', {\n quitApp: () => ipcRenderer.invoke('quit-app'),\n promptSaveOnExit: () => ipcRenderer.invoke('prompt-save-session-on-exit'),\n});\n\ncontextBridge.exposeInMainWorld('installapi', {\n checkFirstRun: () => ipcRenderer.invoke('check-first-run'),\n dismissFirstRun: () => ipcRenderer.invoke('dismiss-first-run'),\n});\n\ncontextBridge.exposeInMainWorld('logapi', {\n append: (entry) => ipcRenderer.invoke('append-activity-log', entry),\n getPath: () => ipcRenderer.invoke('get-activity-log-path'),\n getEntries: () => ipcRenderer.invoke('get-activity-log-entries'),\n onEntry: (callback) => {\n const listener = (_event, entry) => {\n callback(entry);\n };\n ipcRenderer.on('activity-log-entry', listener);\n return () => ipcRenderer.removeListener('activity-log-entry', listener);\n },\n});\n"],"names":["module","exports","require","__webpack_module_cache__","contextBridge","ipcRenderer","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","exposeInMainWorld","onJsonData","callback","on","event","hostsJsonData","runBackendCommand","filename","useLLM","invoke","selectFile","onError","_event","message","getFSize","saveJson","jsonData","savePacket","packetData","savePayload","payloadHex","saveCookieJar","cookieJarText","saveHttpBody","bodyHex","contentType","saveNotes","notesText","previewHttpBody","openExternalUrl","url","quitApp","promptSaveOnExit","checkFirstRun","dismissFirstRun","append","entry","getPath","getEntries","onEntry","listener","removeListener"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"name": "packetsnitch",
|
|
3
3
|
"executableName": "packetsnitch",
|
|
4
4
|
"productName": "packetsnitch",
|
|
5
|
-
"version": "1.5.
|
|
5
|
+
"version": "1.5.606",
|
|
6
6
|
"description": "A High Level Network Analysis Tool",
|
|
7
7
|
"main": ".webpack/main",
|
|
8
8
|
"private": false,
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "electron-forge start",
|
|
11
11
|
"package": "npm run build-python && electron-forge package",
|
|
12
|
-
"make": "npm run build-python && QA_SKIP_RPATHS=1 electron-forge make",
|
|
12
|
+
"make": "npm run build-python && cp spec.ejs node_modules/electron-installer-redhat/resources/spec.ejs && QA_SKIP_RPATHS=1 electron-forge make",
|
|
13
13
|
"build-python": "python3 -m PyInstaller --onedir -y --add-data \"backend/common:common\" --distpath backend ./backend/snitch.py",
|
|
14
14
|
"publish": "QA_SKIP_RPATHS=1 electron-forge publish"
|
|
15
15
|
},
|
package/spec.ejs
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
%define _binary_payload w<%= compressionLevel %>.xzdio
|
|
2
|
+
|
|
3
|
+
%if "%{_host_cpu}" != "%{_target_cpu}"
|
|
4
|
+
%global __strip /bin/true
|
|
5
|
+
%endif
|
|
6
|
+
|
|
7
|
+
Name: <%= name %>
|
|
8
|
+
Version: <%= version %>
|
|
9
|
+
Release: <%= revision %>%{?dist}
|
|
10
|
+
<% if (description) { print(`Summary: ${description}\n`) }
|
|
11
|
+
%>
|
|
12
|
+
<% if (license) { print(`License: ${license}\n`) }
|
|
13
|
+
if (homepage) { print(`URL: ${homepage}\n`) }
|
|
14
|
+
if (license || homepage) { print('\n') }
|
|
15
|
+
|
|
16
|
+
%>Requires: <%= requires.join(', ') %>
|
|
17
|
+
AutoReqProv: no
|
|
18
|
+
|
|
19
|
+
<% if (productDescription) {
|
|
20
|
+
%>%description
|
|
21
|
+
<% print(productDescription)
|
|
22
|
+
print('\n\n\n') }
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
%>%install
|
|
26
|
+
mkdir -p %{buildroot}/usr/
|
|
27
|
+
cp <%= process.platform === 'darwin' ? '-R' : '-r' %> ../usr/* %{buildroot}/usr/
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
%files
|
|
31
|
+
/usr/bin/<%= name %>
|
|
32
|
+
/usr/lib/<%= name %>/
|
|
33
|
+
/usr/share/applications/<%= name %>.desktop
|
|
34
|
+
/usr/share/doc/<%= name %>/
|
|
35
|
+
<% if (_.isObject(icon)) {
|
|
36
|
+
_.forEach(icon, function (path, resolution) {
|
|
37
|
+
%>/usr/share/icons/hicolor/<%= resolution %>/apps/<%= name %><%= resolution === 'symbolic' ? '-symbolic' : '' %>.<%= ['scalable', 'symbolic'].includes(resolution) ? 'svg' : 'png' %>
|
|
38
|
+
<% }) } else {
|
|
39
|
+
%>/usr/share/pixmaps/<%= name %>.png
|
|
40
|
+
<% } %>
|
|
41
|
+
|
|
42
|
+
<% if (pre) {
|
|
43
|
+
%>%pre
|
|
44
|
+
<% print(pre)
|
|
45
|
+
if (preun || post || postun) print('\n\n\n') }
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
%><% if (preun) {
|
|
49
|
+
%>%preun
|
|
50
|
+
<% print(preun)
|
|
51
|
+
if (post || postun) print('\n\n\n') }
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
%><% if (post) {
|
|
55
|
+
%>%post
|
|
56
|
+
<% print(post)
|
|
57
|
+
if (postun) print('\n\n\n') }
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
%><% if (postun) {
|
|
61
|
+
%>%postun
|
|
62
|
+
<% print(postun) } %>
|