How export WireShark Packet List and Packet Bytes to txt file or csv file? [migrated]

enter image description here

how export WireShark csv file or txt file Packet List and Packet Bytes i want txt file or csv file to export in the following way

no Time Source DesTination Protocol Length Source Info HexCode AsciiCode 1 14:41:10 10.10.0.150 192.168.94.139 SNMP 83 7c:2a:31 get-request 90 9f 33 ..3

because i need a form export file import to database

but WireShark export function only Offer this txt form or csv form

No. Time Source Destination Protocol Length Source Info 1 14:41:10.426308 10.10.0.150 192.168.94.139 SNMP 83 7c:2a:31:3b:da:17 get-request 0000 90 9f 33 f7 29 e6 7c 2a 31 3b da 17 08 00 45 00 ..3.).|*1;….E. 0010 00 45 5a 23 00 00 80 11 b6 b1 0a 0a 00 96 c0 a8 .EZ#…………

i needed Separated by tabs or commas form how can i do this export problem

How to Export MS SQL DB from Docker-Linux to Access format

I have a MS SQL database which is currently up and running on my Mac within a Docker container that is hosting the Ubuntu Linux version of MS SQL Server. I need to export the database to a format that can be imported into an Access (yes, Access) database.

Alternatively, I would need to export all 300+ tables to CSV, and hopefully would not need to do them one by one. Is there any way to export all tables en masse to CSV? But this is an alternative option. I still prefer the Access-compatible export since our new SIS vendor apparently uses it. Thanks!

Can you specify wildcards for transport_tablespaces during export?

Very simple question .. I’m trying to do a Transportable tablespace export in Oracle 11, and have a database with a large list of tablespaces. They have a common name/pattern, however, so wildcarding them would make this trivial . ie 1 entry ..

as opposed to listing them all out.

Not entirely sure if this is allowed, though? I checked the documentation, however, it didn’t mention anything. I know we can do wildcards for tables, so hoping it works for tablespaces as well?

gpg keys and subkeys export: what is exported how

I am trying to wrap my head around gpg. My current understanding is that one generates a master key, and then a number of sub-keys that are cross-signed against the master key. This establishes that the sub-keys are well legitimately ‘under’ the master key, and gives flexibility to generate / revoke subkeys for different uses. Fine enough for me.

Then I want to make sure that I can export subkeys independently for example distribution of public keys / moving around my private keys between computers, etc. For this I generated a master key and sub-keys, and I did the following:

admjr@jf-HP:~/Desktop/for_posts$   gpg --list-keys --with-subkey-fingerprints 866A0F0CAFBF78E3100ADAEDB6B59ACF3F735A94 pub   rsa4096 2020-02-29 [SC]       866A0F0CAFBF78E3100ADAEDB6B59ACF3F735A94 uid           [ultimate] name SURNAME (master key of name SURNAME) <name.SURNAME@domain> sub   rsa4096 2020-02-29 [E]       3A5F8AA232514D9D13DFAC5D8A3DE8A2403BA317 sub   rsa4096 2020-02-29 [E] [expires: 2021-02-28]       3FFDAB789DD0A6FF7C6E3E9251F38499FF336B11  admjr@jf-HP:~/Desktop/for_posts$   gpg --armor --output export_of_name.gpg --export name.SURNAME@domain  admjr@jf-HP:~/Desktop/for_posts$   gpg --armor --output export_of_ID_main.gpg --export 866A0F0CAFBF78E3100ADAEDB6B59ACF3F735A94 admjr@jf-HP:~/Desktop/for_posts$   gpg --armor --output export_of_ID_E1.gpg --export 3A5F8AA232514D9D13DFAC5D8A3DE8A2403BA317 admjr@jf-HP:~/Desktop/for_posts$   gpg --armor --output export_of_ID_E2.gpg --export 3FFDAB789DD0A6FF7C6E3E9251F38499FF336B11  admjr@jf-HP:~/Desktop/for_posts$   sha256sum export_of_name.gpg  89a4c59749614bc858a63ba0296d70f1f87ef2ca6c19237a29a986c196e2d180  export_of_name.gpg admjr@jf-HP:~/Desktop/for_posts$   sha256sum export_of_ID_main.gpg  89a4c59749614bc858a63ba0296d70f1f87ef2ca6c19237a29a986c196e2d180  export_of_ID_main.gpg admjr@jf-HP:~/Desktop/for_posts$   sha256sum export_of_ID_E1.gpg  89a4c59749614bc858a63ba0296d70f1f87ef2ca6c19237a29a986c196e2d180  export_of_ID_E1.gpg admjr@jf-HP:~/Desktop/for_posts$   sha256sum export_of_ID_E2.gpg  89a4c59749614bc858a63ba0296d70f1f87ef2ca6c19237a29a986c196e2d180  export_of_ID_E2.gpg 

and here I am very confused. Why do all the public keys exported from the different subkeys are identical? I would expect that each subkey is a pair (private_ID, public_ID) of private and public key. It does not look like the case?

Then, looking similarly at the private keys:

admjr@jf-HP:~/Desktop/for_posts$   gpg --armor --output private_of_ID_main.gpg --export-secret-keys 866A0F0CAFBF78E3100ADAEDB6B59ACF3F735A94 admjr@jf-HP:~/Desktop/for_posts$   gpg --armor --output private_of_ID_E1.gpg --export-secret-keys 3A5F8AA232514D9D13DFAC5D8A3DE8A2403BA317 admjr@jf-HP:~/Desktop/for_posts$   gpg --armor --output private_of_ID_E2.gpg --export-secret-keys 3FFDAB789DD0A6FF7C6E3E9251F38499FF336B11  admjr@jf-HP:~/Desktop/for_posts$   sha256sum private_of_ID_main.gpg  5e982d782a0a28ce264cbbd2afd04bbfd43aef61e1deec0bcad797c4c001663a  private_of_ID_main.gpg admjr@jf-HP:~/Desktop/for_posts$   sha256sum private_of_ID_E1.gpg  0b34781df51eec6a0f96818f74aec7ce2ae49f3af587296eb9202af5785ea5fa  private_of_ID_E1.gpg admjr@jf-HP:~/Desktop/for_posts$   sha256sum private_of_ID_E2.gpg  f1d9d8e63287b152bc0f045cc6174a4821910ed1c193bf54261c6a7aeb7fa696  private_of_ID_E2.gpg 

This looks more like what I would expect (distinct private keys). But then just for checking:

admjr@jf-HP:~/Desktop/for_posts$   gpg --armor --output private_of_ID_main_2.gpg --export-secret-keys 866A0F0CAFBF78E3100ADAEDB6B59ACF3F735A94 admjr@jf-HP:~/Desktop/for_posts$   sha256sum private_of_ID_main_2.gpg  90c770a7bf06a4c8c34fe252edeec149073cbf46d95d4af1c21f7df788612d8c  private_of_ID_main_2.gpg 

and I get a different hash for the same subkey as I tried a few seconds before… I guess this means that when exporting private subkeys some form of timestamp is added?

I suppose this means some things are wrong in my ‘mental picture’ of things. So:

  • are subkeys well ‘individual’ pairs of (private key, public key)?
  • how to export the private and public parts of subkeys independently for each subkey?

PS: this is using gnupg on Ubuntu 18.04. Version details:

admjr@jf-HP:~/Desktop/for_posts$   gpg --version  gpg (GnuPG) 2.2.4 libgcrypt 1.8.1 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Home: /home/admjr/.gnupg Supported algorithms: Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,         CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 

How to export reqeust details using websploit in Kali

I want to listen to Http traffic of an app in android. Usually, I will do that in mitmproxy after redirecting traffic and arpspoof. But it doesn’t work this time due to certificate issue.

So I tried to use websploit network/mitm modules and using urlsnarf sniffer. I think I get the http requests on the terminal screen. However, I cannot inspect the request data like Mitmproxy. Is there any way I can inspect the traffic in a more detail way instead of just url?

MySQL table export – where clause that ignores empty rows Vs getting whole table, which would be faster?

I’m using MySQLWorkbench to export a large table from a database into a CSV. This is what the data in the table is like:

enter image description here

All the rows in the table have values for date, code1, string1, code2 and string2. But, the majority of a, b and c are empty. The command I’m using for getting this data right now is:

select * from table where code1 = '0001'; 

Given that a, b and c are empty for most rows, I could also do:

select * from table where code1 = '0001' and a <> ''; 

Which of the two do you think would export this table more quickly?

Edit: I don’t care about the rows where a, b and c are empty.

problems with PDF export of notebook

I have a largish notebook (300 hundred pages when printed) that I have exported to PDF in the past (version 11?). I am having trouble with this in version 12.0. A PDF is produced (except once), but it will not display. In SumatraPDF, text does not display and graphics display with no text. In Acrobat, nothing displays and page errors are reported. I have other (smaller) notebooks that export successfully. Are there known problems with PDF export of notebooks? Size related? Diagnostic hints will be welcomed.

RSA insensitive and extractable private key export from SoftHSM 2

I’ve created an RSA private key in SoftHSM 2 via EJBCA with the following config:

 attributes(*, CKO_PUBLIC_KEY, *) = {   CKA_TOKEN = false   CKA_ENCRYPT = true   CKA_VERIFY = true   CKA_WRAP = false }  attributes(*, CKO_PRIVATE_KEY, *) = {   CKA_TOKEN = true   CKA_PRIVATE = true   CKA_SENSITIVE = false   CKA_EXTRACTABLE = true   CKA_DECRYPT = false   CKA_SIGN = true   CKA_UNWRAP = true   CKA_DERIVE = false } 

In PKCS#11 spec v2.20:

If the CKA_SENSITIVE attribute is CK_TRUE, or if the CKA_EXTRACTABLE attribute is CK_FALSE, then certain attributesof the secret key cannot be revealed in plaintext outside the token. Which attributes these are is specified for each type of secret key in the attribute table in the section describing that type of key

So I thought that if I set CKA_SENSITIVE to False and CKA_EXTRACTABLE to true I’ll be able to extract the key.

I’ve tried to export the key using pkcs11-tool, but it did not work for me:

 $   pkcs11-tool --module /usr/lib/softhsm/libsofthsm2.so -r -y privkey -d OBJECT_ID --pin PIN Using slot 0 with a present token (0x2ed1a744) sorry, reading private keys not (yet) supported 

I’ve also tried to use this tool, but it did not work neither (CKR_MECHANISM_INVALID):

 # ./pkcs-11-key-extractor-1.0/bin/pkcs-11-key-extractor -l /usr/lib/softhsm/libsofthsm2.so -s 785491780 -p 1234 [*] PKCS#11 Key Extractor - Release 1.0 [*] Registering PKCS#11 Module '/usr/lib/softhsm/libsofthsm2.so' [*] Opening session on slot '785491780' [*] Found 1 RSA private key(s) with CKA_EXTRACTABLE set to TRUE [*] Generating an in memory (CKA_TOKEN: FALSE) 256 bits AES key [*] Extracting RSA Private Key (CKA_EXTRACTABLE: true) with modulus 'E9:F3:44:CE:9B:90:32:83:69:7E:80:5E:48:A0:9E:00:7A:71:AD:84:6B:CD:DE:AE:10:16:AA:91:61:66:B4:57:EB:9B:9E:A0:51:D4:C6:2C:33:59:A8:7B:F4:44:4A:9B:39:28:44:69:08:58:38:DF:7C:D2:25:2F:29:9C:BD:C7:EE:60:00:DE:77:72:70:CA:7C:A2:38:D1:4C:49:CF:99:1D:7D:2E:DC:62:C1:27:5E:2C:3F:AD:25:D7:36:35:08:77:DE:56:58:8F:E1:AF:D3:C2:8E:B7:7E:D3:E9:80:77:B1:91:77:BE:D1:54:0C:E8:19:97:AD:39:48:4F:51:00:F1:43:8D:41:97:E3:F6:B8:79:18:82:A7:60:C7:6E:AF:D3:27:B5:00:19:CD:0D:40:14:11:47:38:2D:FE:DD:14:2F:B9:1A:3B:2C:FE:B0:52:FC:7E:30:13:1E:6F:41:30:B6:1A:F5:B2:17:62:19:EE:90:B1:8A:79:DA:70:E7:A5:7A:E1:54:86:86:69:A3:A1:8E:AD:12:0F:D0:28:16:0A:43:75:3B:69:46:10:DE:13:D3:F0:6C:57:F6:91:A4:72:14:04:9B:BD:72:82:B7:33:C3:57:55:18:F3:8F:54:3F:A7:80:9D:3E:67:EB:46:94:FD:F4:9F:AA:C7:D7:41:29:AC:0F:C8:2E:DF:C5:8D:D9:A2:77:13:BD:90:5D:D4:CD:05:7E:DA:85:58:F6:4B:62:E6:3E:0C:6C:E6:5F:5F:1D:C0:0C:FA:2C:CB:F4:FD:E7:08:32:DA:9D:EC:BB:1B:C9:56:45:91:C1:41:64:47:02:9F:AE:1F:B8:B1:84:DA:5F:F3:86:6E:6A:F1:06:84:CA:98:1D:F0:B0:F3:73:67:37:36:1D:C8:0E:26:DF:67:5D:DA:70:62:23:AD:22:6B:47:6B:33:BC:D8:41:7E:EA:28:09:EF:8D:12:D3:26:2D:DF:2F:03:75:1B:CE:DF:D4:95:62:DB:39:0A:72:46:4A:79:98:86:0E:E6:82:95:60:4D:FD:0F:16:4A:F8:D1:71:5B:39:5A:A4:D1:1A:52:06:89:C0:B8:6E:1B:B7:D3:27:5D:5D:AF:2E:94:82:D5:F5:12:32:AB:5F:70:20:29:65:56:73:04:EA:2E:F8:73:DF:BF:EC:CC:3C:22:8E:CA:42:90:E1:C5:08:9A:15:AA:45:2D:61:6E:A5:05:7E:9D:4C:C1:5D:73:79:2F:43:71:AA:E2:25:AB:D5:9E:D6:9B:19:D0:D6:80:B0:CF:F3:DE:08:12:53:72:46:CE:F4:40:65:F2:D4:3D:7E:33:A6:30:B7:3F:5B:34:C9:0F:20:6B:DD:9B' [!] Error extracting private key: 'CKR_MECHANISM_INVALID' [*] Closing session on slot '785491780' [*] Unregistering PKCS#11 Module '/usr/lib/softhsm/libsofthsm2.so' 

I know it’s against the point of having an HSM, but I want to investigate it nevertheless.

Does anyone have an Idea/resources on how to do it ?

If it not possible, I read that a secure alternative would be wrapping the key with a secret key that stays inside the HSM, can someone share any resources on how to do it ? is it possible to do it with openssl and pkcs11-tool ?

How to facilitate the export of secret strings from an offline system?

I want to use Shamir’s Secret Sharing algorithm to store a randomly generated passphrase securely by spreading the secret shares on paper for example.

The passphrase is generated on an offline system. I am looking for a way to ease the process of “exporting” those secrets which can be quite long (~100 hexadecimal characters).

First I converted the secrets from hexadecimal to base64. That is not bad but not enough.

Then I tried to compress the strings using different methods but because it is random data it does not compress well (or at all).

Then I though of printing them as QR code, it works fine but the issue comes later when I need to import the secrets back, because I would need a camera.

Is there anything else I could try?