Skip to content

Instantly share code, notes, and snippets.

View gadost's full-sized avatar
🇺🇦

Max gadost

🇺🇦
View GitHub Profile
@gadost
gadost / smtp.php
Created December 13, 2023 08:21
Opencart fix BASE64_LENGTH_79_INF
// system/library/mail/smtp.php
private function base64_encode_chunks($input, $line_length = 76) {
$base64_data = base64_encode($input);
$output = '';
while ($base64_data) {
$output .= substr($base64_data, 0, $line_length) . "\r\n";
$base64_data = substr($base64_data, $line_length);
}
return $output;
#!/bin/bash
curl -s http://localhost:26657/dump_consensus_state | jq '.result.round_state.votes[0].prevotes' | awk '{print $1}' | grep -i "\"V" | cut -f 2 -d':' | sort > votedadresses
while read line; do curl -s http://localhost:26657/dump_consensus_state -s | grep $line -A4 | grep "\"value\"" |head -n1 | awk '{print $2}' >> votestkeys; done < votedadresses
curl -s http://localhost:26657/dump_consensus_state | grep "value" | awk '{print $2}' | sort |uniq > allvotes
while read line; do sed -i -e "s#$line##g" allvotes;done < votestkeys
cat allvotes | sort > filterednovotes
sed -i -e '/^[[:space:]]*$/d' filterednovotes
sed -i -e 's/"//g' filterednovotes
while read line; do gravity query staking validators --limit 1000 | grep $line -A11 | grep moniker; done < filterednovotes

Keybase proof

I hereby claim:

  • I am gadost on github.
  • I am gadost (https://keybase.io/gadost) on keybase.
  • I have a public key ASBYRoHANTTA7iOsaB8861ctDZ6BABOvFeAUdc0GTuJY0Ao

To claim this, I am signing this object:

--- sqlite.c.orig 2016-06-14 13:35:20.726950425 +0000
+++ sqlite.c 2016-06-14 13:35:36.333327205 +0000
@@ -53,8 +53,6 @@
extern int sqlite_encode_binary(const unsigned char *in, int n, unsigned char *out);
extern int sqlite_decode_binary(const unsigned char *in, unsigned char *out);
-static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-
static int le_sqlite_db, le_sqlite_result, le_sqlite_pdb;