Net::G...::MySQL(3pm)

πŸ“¦ version 1.07, in ubuntu jammy

✨ Net::G...::MySQL ✨

okay bestie, so this is a page from the User Contributed Perl Documentation and it's about Net::G...::MySQL β€” the MySQL glow-up for your Google Safe Browsing v2 database. sit down, hydrate, let's get into it πŸ’–


🌸 NAME 🌸

Net::Google::SafeBrowsing2::MySQL β€” MySQL as back-end storage for the Google Safe Browsing v2 database. no cap, that's literally what it does πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

use Net::Google::SafeBrowsing2::MySQL;

my $storage = Net::Google::SafeBrowsing2::MySQL->new(host => '127.0.0.1', database => 'GoogleSafeBrowsingv2');
...
$storage->close();

that's the whole vibe, bestie. spin it up, do ur thing, close it out ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

So this is an implementation of Net::Google::SafeBrowsing2::Storage that uses MySQL as the backend. it's giving "same interface, different database, still iconic" πŸ‘‘


πŸ’œ CONSTRUCTOR πŸ’œ

🌈 new()

makes you a fresh lil Net::Google::SafeBrowsing2::MySQL object. here's the moment:

my $storage = Net::Google::SafeBrowsing2::MySQL->new(
    host     => '127.0.0.1',
    database => 'GoogleSafeBrowsingv2',
    username => 'foo',
    password => 'bar'
);

✨ Arguments ✨

  • host β€” Required, bestie. this is ur MySQL host name πŸ–₯️
  • database β€” Required. the MySQL database name you're connecting to.
  • username β€” Required. ur MySQL username 🫢
  • password β€” Required. ur MySQL password 🀫
  • port β€” Optional. the MySQL port number to connect to.
  • keep_all β€” Optional. set it to 1 to keep old information (like expiring full hashes) chillin' in the database. it's 0 (delete) by default πŸ—‘οΈ

πŸ‘‘ PUBLIC FUNCTIONS πŸ‘‘

peep Net::Google::SafeBrowsing2::Storage for the complete list of public functions, iykyk πŸ“œ

🧚 close()

cleans up old full hashes and closes the connection to the database. double duty, main character energy:

$storage->close();

πŸ”₯ CHANGELOG πŸ”₯

  • 0.5 β€” Keep empty sub chunks. Shorten prefixes greater than 8 bytes (a lil workaround so the schema stays tight).
  • 0.4 β€” Added the option keep_all to keep expired full hashes. lowkey useful for debugging πŸ›
  • 0.3 β€” Uses the more efficient add_chunk_a and add_chunk_s functions now. also changed the data type for prefixes from VARCHAR to VARBINARY.

πŸ’« SEE ALSO πŸ’«


🌸 AUTHOR 🌸

Julien Sobrier, <jsobrier@zscaler.com> or <julien@sobrier.net> πŸ’Œ


Copyright (C) 2011 by Julien Sobrier

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. slay, legally speaking πŸ“œβœ¨


and that's a wrap, bestie 🫢 this whole thing is from perl v5.32.0, dated 2021-01-07, and it's Net::G...::MySQL(3pm) β€” go forth and store ur hashes responsibly πŸ’…πŸŽ€

πŸ“¦ where this page comes from