There are tools to export private keys from a wallet.dat without having to sync the complete blockchain or even install bitcoin core:
https://bitcointalksearch.org/topic/pywallet-22-manage-your-wallet-update-required-34028
There seems to be a recent version even supporting bech32:
https://bitcointalksearch.org/topic/m.818406
And there are tools to brute-force a wallet.dat's passphrase... But since it's brute-forcing, you'll either need a very short password, or you need to remember a lot about the password:
https://github.com/gurnec/btcrecover
I'd strongly recommand running these tools on an offline machine... AFAIK, they have been vetted and nobody found a call home, but in these cases, the popular phrase "better safe than sorry" pops to mind.
Does pywallet work only for bitcoin or for any altcoin that has a wallet.dat format for wallets? It mentions namecoin in there... that should be really useful, sometimes I find random wallets, and I have to go through an odyssey of problems attempting to extract private keys, because oftentimes the blockchain from these projects is very hard to sync, a lot become half abandoned but still there's some value in your wallet which you could dump into some exchange for BTC.
And btw if you ever need to figure out what a wallet.dat contains (as in if yo udont know which altcoin it is from) you can use my little trick here:
https://bitcointalksearch.org/topic/m.35477272
Just open wallet.dat which a text editor and follow the guide.