Posts by Anderson Fidelis • 311 points
25 posts
-
-3
votes0
answers59
viewsQ: How to create script that allows USB stick in Windows by Serial Number?
I would like to exchange some practical ideas with you to accomplish an achievement: Create a script for Windows that checks the Serial Number of a USB stick and can thus allow or deny that it…
-
-2
votes2
answers128
viewsQ: Timer for a shell script command
Good afternoon, everyone, I want to write a script with a command that captures all wireless network flow around my company and store it in a text file. Currently I do so: airmon-ng start 'nome da…
-
0
votes1
answer25
viewsA: File output with YAD
I managed with the following syntax: placa=$(iwconfig | cut -d" " -f 1> interfaces.txt) opcao1=$(sed -n '1' interface.txt | egrep -o "\w{1,}") opcao2=$(sed -n '2' interface.txt | egrep -o…
-
-1
votes1
answer25
viewsQ: File output with YAD
Good morning, everyone, I have some problems with the use of YAD. I have a super functional and very useful shellscript. Now I’m trying to put it in a graphical interface to look really nice and…
-
-4
votes2
answers123
viewsA: Accentuation using regex
Have you ever tried something like var words = name.match(/( w+)( D+)/g); ? \w All graphic characters and \D every digit (including accents).
-
-1
votes2
answers679
viewsA: Regular expression to validate a password with Python
For each case, you have a specific Regex. Follow the syntax of each Regex. For the second case, lookaheads are the ideal solution as they check the pattern before giving match Passwords must contain…
-
1
votes2
answers48
viewsA: Simple email field in Javascript
I made this modification of the above answer, which fully attended me: function valida(){ var email = document.getElementById("email").value; email = email.toLowerCase(); if(email.search(/@/) != -1…
javascriptanswered Anderson Fidelis 311 -
-2
votes2
answers48
viewsQ: Simple email field in Javascript
Good afternoon, everyone, I created an input field to receive email and my only requirement is to ensure that you have a "@" and at least a ".". I read several REGEX to do this validation, but all…
javascriptasked Anderson Fidelis 311 -
1
votes3
answers211
viewsQ: Delete duplicate records via php in mysql
Good morning guys, I read some articles here with similar problems, but none of them answered my question, what I want. Here’s the thing: I have a query to check which lines have a duplicate field…
-
0
votes1
answer85
viewsQ: Focus an entire array on a variable that prints in DOMPDF
I read a few posts here, but nothing that would give me a north. I have a php that I printed in PDF, with two querys that consult the database, one table has a foreing key of the other. That is, for…
-
1
votes1
answer455
viewsQ: Script to Copy Directory to Program Files folder with Administrator rights
Good afternoon, you guys, I would like to copy some files in *.vbs, to a folder in "Program Files(X86)" via logon Script. But the message that appears is that the user has no rights to make the…
-
2
votes2
answers6606
viewsA: Automatic installation script without user interaction
I got it using this script on vbs: On error resume next Dim WshShell, fso Set WshShell = WScript.CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") WshShell.Run…
-
4
votes2
answers6606
viewsQ: Automatic installation script without user interaction
I need to run the ocsinventory agent installation automatically via script, which will be started by the domain’s GPO, and can be in . bat, . vbs or powershell, and there can be no user interaction.…
-
10
votes2
answers108
viewsQ: How to order a select 1 to 255?
Personal I have a query of a table with Ips numbers from 1 to 255 of various ranges. When I do SELECT IPS FROM ipvalidos WHERE REDE ='{$rede}' ORDER BY IPS It selects from 10.0.0.100 before…
-
5
votes2
answers69
viewsQ: Sort a Select by criteria outside the database
I would like to create a SELECT with the personal relationship here of my company. SELECT função, nome FROM responsavel; So far so good. But as ordered by the Manager, passing by the Incumbent,…
-
2
votes4
answers124
viewsQ: Insert Parentheses between an acronym in the input field
Good afternoon guys, I’m having a little trouble inserting parentheses between acronyms of a field that I created. Follow my code: function maiusculo(){ var quadro =…
-
0
votes0
answers105
viewsQ: Difficulty making Foreign key with two char fields in Mysql
I am unable to create a Foreign key between two tables, whose type is CHAR: ALTER TABLE hardware ADD CONSTRAINT fk_INC_LOCALIDADE FOREIGN KEY ( INC_LOCALIDADE ) REFERENCES localidade (INC); The…
-
2
votes2
answers57
viewsQ: Changing fields separator for a Macaddress
I would like to implement an event that fixes data that is outside the standard, replacing the tab with : and put the letters in lower case. For example, the user type 00-25-66-F0-21-11, would be…
-
0
votes1
answer56
viewsQ: SELECT TO REDUCE SEVERAL SIMILAR MYSQL ENTRIES
Good morning guys, I have searched and found nothing very useful. I have an inventory database of my Network Stations. The agent installed on each station sends the installed program names to the…
-
0
votes3
answers176
viewsQ: Print result of an array in php list format
I have two arrays in php, which I compare and create a third and want to print this difference on a list. I’ve tried the foreach, but this method prints a huge list in string. This is my code: $sql…
-
0
votes0
answers285
viewsQ: Create a Foreign key with two varchar fields
I’m finding it very difficult to create a foreign key between two tables, whose type is varchar: ALTER TABLE netmap ADD CONSTRAINT fk_IP FOREIGN KEY ( IP ) REFERENCES ipvalidos (IPS); The mistake…
-
0
votes1
answer95
viewsQ: Create php list of valid ips for a mysql table
Good morning guys, I need to create a list of valid ips from my network. I have 15 class A subnets. That is, my network is 10.5.5.0 until 10.5.20.255. I was thinking something like: $IP for (i=1;…
-
0
votes1
answer46
viewsQ: Link in computer table that submits a field to a plug
Good morning, you guys, I have a table, which is a query select of the data of the devices I control. In it I have several elements, such as Name, Macaddress and IP, for example. In the IP column, I…
-
1
votes2
answers1712
viewsQ: Javascript - Validation of First and Last Names with upper case letters at the beginning
Good evening, you guys, I made a javascript to fix a natural person registration in order to create the pattern Name and Surname, for example, João da Silva. I got what I wanted when the user typed…
javascriptasked Anderson Fidelis 311 -
0
votes0
answers44
viewsQ: Create CONSTRAINT FOREINGN KEY with primary key type VARCHAR from another MYSQL table
I have two tables a call _hardware_ and another call _responsavel_. In the _responsavel_ have a Primary Key calling for NIP of the kind VARCHAR(8). I created a field called NIP_RESP also VARCHAR(8),…
mysqlasked Anderson Fidelis 311