is there's a way to export all my emails accounts name from my DirectAdmin
i have like 1000 email users i cant type it one by one
i hope i find a way to export all this emails name into text or something similar
I got the solution, from the shell you can get all accounts on the DirectAdmin database but without the #domain.com Like
zeroic
stack
over
flow
so i export all to text file and added a sign like (( ~ )) after the last letter then used the note pad Ctrl + H to replace (( ~ )) With (( #domain.com ))
thanks for help
Related
I am struggling here to generate an email ID that consists of Random First name and Random Last name. I don't want to use the dynamic Variable $randomEmail because it generates any random email which is totally different from the First name and Last name and looks very unrealistic.
I have a Pre-Requisite Script in Postman, Where I have two environment variables first_name and last_name, I use the faker library to generate dummy data as Following. The dynamic variable $randomFirstName and $randomLastName, generate and set the Environment variables as following.
Let assume that $randomFirstName=John and $randomLastName=Doe
postman.setEnvironmentVariable("first_name", pm.variables.replaceIn('{{$randomFirstName}}'));
postman.setEnvironmentVariable("last_name", pm.variables.replaceIn('{{$randomFirstName}}'));
Now I want to use the Environment variable first_name and last_name to use in the following variable email_formatted to generate the email ID which is consisting of first name and last name.
email_formatted = "{{first_name}}" + '_' + "{{last_name}}" + '#gmail.com';
postman.setEnvironmentVariable("email", email_formatted);
console.log("Email: " + postman.getEnvironmentVariable("email"));
However, on the Consol, I am getting the following result.
ACTUAL "Email: {{first_name}}_{{last_name}}#gmail.com"
EXPECTED "Email: John_Doe#gmail.com"
I think I am doing some small mistakes here in syntax or how the Environment variables are used in the Pre-Requisite Script. Thanks for your time in reading, and any leads would be helpful
email_formatted = pm.environment.get("first_name") + '_' + pm.environment.get("last_name") + '#gmail.com';
pm.environment.set("email", email_formatted);
console.log("Email: " + pm.environment.get("email"));
in postman we can refer variable as {{variablename}} only in non script sessions. In script you have use
pm.environment.get('varaiblename')
to access environment varaible ,to access other varaibles use as pm.globals, pm.variables etc
As Danny pointed out postman is moving to new pm.* API , and going to deprecate postman.* in future .
So start using the new api as the documentation is extensively updated and available mostly for pm.* Api .
Note: setnextrequest , is still available only through postman.*
So postman.setNextRequest , works pm.setNextRequest will not
The postman app has auto suggest for pm.* , It shows available methods which makes scripting easier and fun
If Still using the old Postman libraries then the Following would also Work.
email_formatted = postman.getEnvironmentVariable("first_name") + '_' + postman.getEnvironmentVariable("last_name") + '#' + postman.getEnvironmentVariable("environment")+ 'gmail.com';
postman.setEnvironmentVariable("email", email_formatted);
console.log("Email: " + postman.getEnvironmentVariable("email"));
I want to automate a process of sending HTTP request using the regex to remove any character or number located between the = and the & with burpsuite ( Autorize Extension )
The body:
id=169413&token=2y10l02e7J2mBD6lTnSv9uHSZD5QylM2JsM21Hyi4J&sub_profile_id=14317
i want something similar at
id=&token=&sub_profile=
I tried with \=[A-Za-z1-9]+ but without results
it could be done in three steps example capture just id=Anything and remove 'Anything' then do it with the rest
How about
\=([^&]+)\&?
Completely new to regex only read a few guides my problem is as follows. A 3rd party solution is being connected to our Adfs 2016 enviroment. We have run into a problem as the solution cannot handle long usernames and the Upn and email of our users are in the format of users initials 3 or 4 letters.department#ourcompany.com, so Dave Dibley Jr would be ddj.department#ourcompany.com
what i would like to do is use Regex to Cut everything after the initals from the claim any suggestions how to do this ?
You can use RegEx for string manipulation in the Claims Rules Language. Fx:
c:[type == “http://contoso.com/role”]
=> issue (Type = “http://contoso.com/role”, Value = RegExReplace(c.Value, “(?i)director”, “Manager“);
Pass through any role claims. If any of the claims contain the word “Director”, RegExReplace() will change it to “Manager”. For example, “Director of Finance” would pass through as “Manager of Finance”.
See https://social.technet.microsoft.com/wiki/contents/articles/16161.ad-fs-2-0-using-regex-in-the-claims-rule-language.aspx for more information.
I have a pretty large account full of ~20k emails in Outlook and I need to extract phone numbers from those emails.
An example of an email would be:
From: Amy Schwartz <amy#blahdyblah.com>
Dear Anatoliy,
I want you to do blahdy blahdy blah.
Amy Schwartz
(347) 555-1212 <---- I want this
Blahdy Blah Company
The idea is to go through every email and match the last Phone number via regex and export a list in the following format:
Name: Name from the "From" field
Email: Email from the "From" field
Phone: The last phone number matched in the email text
Do you have any ideas on how to go about doing this?
UPDATE: Didn't find any prebuilt solutions, but I'm hacking together my own using this. codeTwo Outlook Express. You can export any email field (body, HTML body, from, from name) to CSV. It's a little slow (3 seconds a message on my i7 iMac running a Win7 VM). But it works :) And from there I will probably just put in a database and do some regex magic. Will post process once I'm done.
Figured it out. It's super easy if you know how to make a Node.js script (but I'm sure you can write one in Bash).
1) Use Outlook Export plugin to export all your emails to a CSV. Make sure email is first column, name is second column, and Body (text) is 3rd column.
2) Write the following script in Node JS in the same directory as you CSV of emails
var fs = require('fs');
var csv = require('csv');
csv()
.from.stream(fs.createReadStream(__dirname+'/data.csv'))
.to.path(__dirname+'/out.csv')
.transform( function(row){
var match = row[2].match(/(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})/);
return '"' + row[0] + '","' + row[1] + '","' + (match ? match[0] : '') + '"\n';
})
.on('error', function(error){
console.log(error.message);
});
and run it using node script.js.
And that's it! Runs super quickly (~20 secs for 20k emails).
Let me know if you have any suggestion (or package this into a downloadable executable)
I was looking to find an answer to my question, but so far I got this:
https://graph.facebook.com/the_user_id?fields=name,picture
I need to be able to display/print first,last name and picture of a set list of users for which I know their ID. What code is required to get this data and then to publish it on a php/html page? Of course, this will means that if I want to show 10 users, I will input 10 different IDs (read smtg about an array list?). Notice that I DO NOT require for this to work for the current user.
Thanks in advance for your replies.
You need to use file_get_contents ( http://uk3.php.net/file_get_contents ) or curl in php and issue a request to the url such as follows:
https://graph.facebook.com/?ids=id1,id2,id3&fields=name,picture
(replacing id1,id2 with your ids)
this will then return you a json object. You then need to decode ( http://uk3.php.net/json_decode ) and loop through this and access the information
this should get you started
// people array uses the users id as the key and the dessert as the value. The id is then used in the query to facebook to select the corresponding value from this array
$people = array("id1"=>"favourite "dessert", "id2"=>"favourite dessert", "id3"=>"apple pie");
$json = file_get_contents('https://graph.facebook.com/?ids=id1,id2,id3&fields=id,name,picture');
$json = json_decode($json);
foreach($json as $key=>$person){
echo '<p><img src="'.$person->picture.'" alt="'.$person->name.'" />';
echo $person->name.'\'s favourite dessert is '.$people[$person->id'];
echo '</p>';
}
I've batched the requests here, alternatively you could perform 10 separate queries for each user, but that would be a bit pointless and inefficient
The easiest way is with an FQL query:
SELECT first_name, last_name, pic, uid FROM user WHERE uid IN
(Known_ID_1, Known_ID_2, ... Known_ID_n)
The easiest, if you're using PHP is to install the PHP SDK, though you can also make a call directly to https://graph.facebook.com/fql?q=URL_ENCODED_QUERY