Categories
Mastering Development

Can I build a serializer that validates username and email existence on is_valid call?

guys! I have this serializer class for the user model class UserSerializer(serializers.ModelSerializer): username = serializers.RegexField("^(?=.{6,20}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._]+(?<![_.])$") full_name = serializers.RegexField("^([a-zA-Z]{2,}\s[a-zA-Z]{1,}’?-?[a-zA-Z]{2,}\s?([a-zA-Z]{1,})?)") email = serializers.EmailField() phone = serializers.RegexField("^(\+\d{1,2}\s?)?1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$") class Meta: model = User fields = [‘username’, ‘full_name’, ’email’, ‘password’, ‘phone’] This is my serializer class for the moment. I want to validate that the username and email does not […]

Categories
Linux Mastering Development

How to extract domains related to “Client Hello” in a pcap file

I have a tcpdump (pcap) capture file and want to extract all domains. I do it with the following command: strings capture_file | grep -oiE ‘([a-zA-Z0-9][a-zA-Z0-9-]{1,61}\.){1,}(\.?[a-zA-Z]{2,}){1,}’ | sort -u > out But I want to extract only those related to the string "Client Hello". Example in Wireshark: Handshake Protocol: Client Hello Server Name: example.com Is […]

Categories
Mastering Development

Send data to Octobercms using PyQt

I have a barcode reader that reads the code of the citizenship card and verifies, on a server with OctoberCMS, if the user is registered. If you are registered, it returns the information of the user that is hosted in the database. If it is not, it will create a record in the database with […]