IProfile
Assembly: ZennoLab.InterfacesLibrary
Full name: ZennoLab.InterfacesLibrary.ProjectModel.Collections.IProfile
Kind: interface
Gets the current profile.
Properties
None
Property
string None { get; }
Name
Property
string Name { get; set; }
Gets or sets the name.
Example
// get name
string name = project.Profile.Name;
// set name
project.Profile.Name = "MyName";Example2
// get name
$name = $project->Profile->Name;
// set name
$project->Profile->Name = "MyName";Surname
Property
string Surname { get; set; }
Gets or sets the surname.
Example
// get surname
string surname = project.Profile.Surname;
// set surname
project.Profile.Surname = "MySurname";Example2
// get surname
$surname = $project->Profile->Surname;
// set surname
project->Profile->Surname = "MySurname";Sex
Property
ProfileSex Sex { get; set; }
Gets or sets the gender.
Example
// get gender
ProfileSex gender = project.Profile.Sex;
// set gender
project.Profile.Sex = ProfileSex.Male;Example2
// get gender
$gender = $project->Profile->Sex;
// set gender
$project->Profile->Sex = ProfileSex::Male;Age
Property
int Age { get; set; }
Gets or sets the age.
Example
// get age
int age = project.Profile.Age;
// set age
project.Profile.Age = 28;Example2
// get age
$age = $project->Profile->Age;
// set age
$project->Profile->Age = 28;BornDay
Property
int BornDay { get; set; }
Gets or sets the born day.
Example
// get born day
string bornDay = project.Profile.BornDay;
// set born day
project.Profile.BornDay = 18;Example2
// get born day
$bornDay = $project->Profile->BornDay;
// set born day
$project->Profile->BornDay = 18;BornMonth
Property
int BornMonth { get; set; }
Gets or sets the born month.
Example
// get born month
string bornMonth = project.Profile.BornMonth;
// set born month
project.Profile.BornMonth = 6;Example2
// get born month
$bornMonth = $project->Profile->BornMonth;
// set born month
$project->Profile->BornMonth = 6;BornYear
Property
int BornYear { get; set; }
Gets or sets the born year.
Example
// get born year
string bornMonth = project.Profile.BornYear;
// set born year
project.Profile.BornMonth = 1589;Example2
// get born year
$bornMonth = $project->Profile->BornYear;
// set born year
$project->Profile->BornMonth = 1589;Country
Property
string Country { get; set; }
Gets or sets the country.
Example
// get country
string country = project.Profile.Country;
// set country
project.Profile.Country = "MyCountry";Example2
// get country
$country = $project->Profile->Country;
// set country
$project->Profile->Country = "MyCountry";CurrentRegion
Property
string CurrentRegion { get; set; }
Gets or sets the current region.
Example
// get region
string region = project.Profile.CurrentRegion;
// set region
project.Profile.CurrentRegion = "MyRegion";Example2
// get region
$region = $project->Profile->CurrentRegion;
// set region
$project->Profile->CurrentRegion = "MyRegion";Town
Property
string Town { get; set; }
Gets or sets the town.
Example
// get town
string region = project.Profile.Town;
// set town
project.Profile.Town = "MyTown";Example2
// get town
$region = $project->Profile->Town;
// set town
$project->Profile->Town = "MyTown";Phone
Property
string Phone { get; set; }
Gets or sets the phone.
Example
// get phone
string phone = project.Profile.Phone;
// set phone
project.Profile.Phone = "MyPhone";Example2
// get phone
$phone = $project->Profile->Phone;
// set phone
$project->Profile->Phone = "MyPhone";ZipCode
Property
string ZipCode { get; set; }
Gets or sets the zip code.
Example
// get zip code
string zipCode = project.Profile.ZipCode;
// set zip code
project.Profile.ZipCode = "MyZipCode";Example2
// get zip code
$zipCode = $project->Profile->ZipCode;
// set zip code
$project->Profile->ZipCode = "MyZipCode";Language
Property
string Language { get; set; }
Gets or sets the language.
Example
// get language
string language = project.Profile.Language;
// set language
project.Profile.Language = "MyLanguage";Example2
// get language
$language = $project->Profile->Language;
// set language
$project->Profile->Language = "MyLanguage";Login
Property
string Login { get; set; }
Gets or sets the login.
Example
// get login
string login = project.Profile.Login;
// set login
project.Profile.Login = "MyLogin";Example2
// get login
$login = $project->Profile->Login;
// set login
$project->Profile->Login = "MyLogin";NickName
Property
string NickName { get; set; }
Gets or sets the nick name.
Example
// get nick name
string nickName = project.Profile.NickName;
// set nick name
project.Profile.NickName = "MyNickName";Example2
// get nick name
$nickName = $project->Profile->NickName;
// set nick name
$project->Profile->NickName = "MyNickName";Password
Property
string Password { get; set; }
Gets or sets the password.
Example
// get password
string password = project.Profile.Password;
// set password
project.Profile.Password = "MyPassword";Example2
// get password
$password = $project->Profile->Password;
// set password
$project->Profile->Password = "MyPassword";Property
string Email { get; set; }
Gets or sets the e-mail.
Example
// get e-mail
string email = project.Profile.Email;
// set e-mail
project.Profile.Email = "MyEmail";Example2
// get e-mail
$email = $project->Profile->Email;
// set e-mail
$project->Profile->Email = "MyEmail";EmailPassword
Property
string EmailPassword { get; set; }
Gets or sets the e-mail password.
Example
// get e-mail password
string emailPassword = project.Profile.EmailPassword;
// set e-mail password
project.Profile.EmailPassword = "MyEmailPassword";Example2
// get e-mail password
$emailPassword = $project->Profile->EmailPassword;
// set e-mail password
$project->Profile->EmailPassword = "MyEmailPassword";SecretQuestionAnswer1
Property
string SecretQuestionAnswer1 { get; set; }
Gets or sets the answer on the first secret question.
Example
// get answer on the first secret question
string secretQuestionAnswer1 = project.Profile.SecretQuestionAnswer1;
// set answer on the first secret question
project.Profile.SecretQuestionAnswer1 = "12341234";Example2
// get answer on the first secret question
$secretQuestionAnswer1 = $project->Profile->SecretQuestionAnswer1;
// set answer on the first secret question
$project->Profile->SecretQuestionAnswer1 = "12341234";SecretQuestionAnswer2
Property
string SecretQuestionAnswer2 { get; set; }
Gets or sets the answer on the second secret question.
Example
// get answer on the second secret question
string secretQuestionAnswer2 = project.Profile.SecretQuestionAnswer2;
// set answer on the second secret question
project.Profile.SecretQuestionAnswer2 = "12341234";Interest
Property
string Interest { get; set; }
Gets or sets the interest.
Example
// get interest
string interest = project.Profile.Interest;
// set interest
project.Profile.Interest = "beer";Example2
// get interest
$interest = $project->Profile->Interest;
// set interest
$project->Profile->Interest = "beer";AcceptCharset
Property
string AcceptCharset { get; set; }
Gets or sets the character sets that are acceptable.
Example
// get character sets that are acceptable
string acceptCharset = project.Profile.AcceptCharset;
// set character sets that are acceptable
project.Profile.AcceptCharset = "utf-8";Example2
// get character sets that are acceptable
$acceptCharset = $project->Profile->AcceptCharset;
// set character sets that are acceptable
$project->Profile->AcceptCharset = "utf-8";AcceptEncoding
Property
string AcceptEncoding { get; set; }
Gets or sets acceptable encodings.
Example
// get acceptable encodings
string acceptEncoding = project.Profile.AcceptEncoding;
// set acceptable encodings
project.Profile.AcceptEncoding = "gzip,deflate,sdch";Example2
// get acceptable encodings
$acceptEncoding = $project->Profile->AcceptEncoding;
// set acceptable encodings
$project->Profile->AcceptEncoding = "gzip,deflate,sdch";AcceptLanguage
Property
string AcceptLanguage { get; set; }
Gets or sets acceptable languages for response.
Example
// get acceptable languages for response
string acceptLanguage = project.Profile.AcceptLanguage;
// set acceptable languages for response
project.Profile.AcceptLanguage = "en-US";Example2
// get acceptable languages for response
$acceptLanguage = $project->Profile->AcceptLanguage;
// set acceptable languages for response
$project->Profile->AcceptLanguage = "en-US";UserAgent
Property
string UserAgent { get; set; }
Gets or sets the user agent string of the user agent.
Example
// get user agent string of the user agent
string userAgent = project.Profile.UserAgent;
// set user agent string of the user agent
project.Profile.UserAgent = "Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0";Example2
// get user agent string of the user agent
$userAgent = $project->Profile->UserAgent;
// set user agent string of the user agent
$project->Profile->UserAgent = "Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0";HTTPAccept
Property
string HTTPAccept { get; set; }
Gets or sets the content types that are acceptable.
Example
// get content types that are acceptable
string HTTPAccept = project.Profile.HTTPAccept;
// set acceptable languages for response
project.Profile.HTTPAccept = "text/plain";Example2
// get content types that are acceptable
$HTTPAccept = $project->Profile->HTTPAccept;
// set acceptable languages for response
$project->Profile->HTTPAccept = "text/plain";UserAgentAppCodeName
Property
string UserAgentAppCodeName { get; set; }
Gets or set the code name of the browser.
Example
// get code name of the browser
string userAgentAppCodeName = project.Profile.UserAgentAppCodeName;
// set code name of the browser
project.Profile.UserAgentAppCodeName = "Mozilla";Example2
// get code name of the browser
$userAgentAppCodeName = $project->Profile->UserAgentAppCodeName;
// set code name of the browser
$project->Profile->UserAgentAppCodeName = "Mozilla";UserAgentAppName
Property
string UserAgentAppName { get; set; }
Gets or set the name of the browser.
Example
// get name of the browser
string userAgentAppName = project.Profile.UserAgentAppName;
// set name of the browser
project.Profile.UserAgentAppName = "Netscape";Example2
// get name of the browser
$userAgentAppName = $project->Profile->UserAgentAppName;
// set name of the browser
$project->Profile->UserAgentAppName = "Netscape";UserAgentAppVersion
Property
string UserAgentAppVersion { get; set; }
Gets or set the version information of the browser.
Example
// get version information of the browser
string userAgentAppVersion = project.Profile.UserAgentAppVersion;
// set version information of the browser
project.Profile.UserAgentAppVersion = "5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1";Example2
// get version information of the browser
$userAgentAppVersion = $project->Profile->UserAgentAppVersion;
// set version information of the browser
$project->Profile->UserAgentAppVersion = "5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1";UserAgentBrowserLanguage
Property
string UserAgentBrowserLanguage { get; set; }
Gets or sets the browser language.
Example
// get browser language
string browserLanguage = project.Profile.UserAgentBrowserLanguage;
// set browser language
project.Profile.UserAgentBrowserLanguage = "en";Example2
// get browser language
$browserLanguage = $project->Profile->UserAgentBrowserLanguage;
// set browser language
project->Profile->UserAgentBrowserLanguage = "en";UserAgentCpuClass
Property
string UserAgentCpuClass { get; set; }
Gets or sets the cpu class.
Example
// get cpu class
string cpuClass = project.Profile.UserAgentCpuClass;
// set cpu class
project.Profile.UserAgentCpuClass = "x86";Example2
// get cpu class
$cpuClass = $project->Profile->UserAgentCpuClass;
// set cpu class
$project->Profile->UserAgentCpuClass = "x86";UserAgentLanguage
Property
string UserAgentLanguage { get; set; }
Gets or sets the system language.
Example
// get system language
string systemLanguage = project.Profile.UserAgentLanguage;
// set system language
project.Profile.UserAgentLanguage = "en";Example2
// get system language
$systemLanguage = $project->Profile->UserAgentLanguage;
// set system language
$project->Profile->UserAgentLanguage = "en";UserAgentOsCpu
Property
string UserAgentOsCpu { get; set; }
UserAgentPlatform
Property
string UserAgentPlatform { get; set; }
Gets or sets the current platform.
Example
// get current platform
string platform = project.Profile.UserAgentPlatform;
// set current platform
project.Profile.UserAgentPlatform = "Win32";Example2
// get current platform
$platform = $project->Profile->UserAgentPlatform;
// set current platform
$project->Profile->UserAgentPlatform = "Win32";UserAgentProduct
Property
string UserAgentProduct { get; set; }
Gets or sets the product name.
Example
// get product name
string product = project.Profile.UserAgentProduct;
// set product name
project.Profile.UserAgentProduct = "Gecko";Example2
// get product name
$product = $project->Profile->UserAgentProduct;
// set product name
$project->Profile->UserAgentProduct = "Gecko";UserAgentProductSub
Property
string UserAgentProductSub { get; set; }
Gets or sets the product sub.
Example
// get product sub
string product = project.Profile.UserAgentProductSub;
// set product sub
project.Profile.UserAgentProductSub = "20030107";Example2
// get product sub
$product = $project->Profile->UserAgentProductSub;
// set product sub
$project->Profile->UserAgentProductSub = "20030107";AvailScreenHeight
Property
int AvailScreenHeight { get; set; }
Gets or sets the height of the screen (excluding the Windows Taskbar).
Example
// get avail screen height
int availScreenHeight = project.Profile.AvailScreenHeight;
// set avail screen height
project.Profile.AvailScreenHeight = 750;Example2
// get avail screen height
$availScreenHeight = $project->Profile->AvailScreenHeight;
// set avail screen height
$project->Profile->AvailScreenHeight = 750;AvailScreenWidth
Property
int AvailScreenWidth { get; set; }
Gets or sets the width of the screen (excluding the Windows Taskbar).
Example
// get avail screen width
int availScreenWidth = project.Profile.AvailScreenWidth;
// set avail screen width
project.Profile.AvailScreenWidth = 1024;Example2
// get avail screen width
$availScreenWidth = $project->Profile->AvailScreenWidth;
// set avail screen width
$project->Profile->AvailScreenWidth = 1024;OuterHeightShift
Property
int OuterHeightShift { get; set; }
Gets or sets the height of the header and screen frame.
Example
// get outer height shift
string outerHeightShift = project.Profile.OuterHeightShift;
// set outer height shift
project.Profile.OuterHeightShift = 101;Example2
// get outer height shift
$outerHeightShift = $project->Profile->OuterHeightShift;
// set outer height shift
$project->Profile->OuterHeightShift = 101;OuterWidthShift
Property
int OuterWidthShift { get; set; }
Gets or sets the width of the screen frame.
Example
// get outer width shift
string widthHeightShift = project.Profile.OuterWidthShift;
// set outer width shift
project.Profile.OuterWidthShift = 16;Example2
// get outer width shift
$widthHeightShift = $project->Profile->OuterWidthShift;
// set outer width shift
$project->Profile->OuterWidthShift = 16;OuterHeight
Property
int OuterHeight { get; }
Gets or sets the height of current window.
Example
// get outer height
string outerHeight = project.Profile.OuterHeight;Example2
// get outer height
$outerHeight = $project->Profile->OuterHeight;OuterWidth
Property
int OuterWidth { get; }
Gets or sets the width of current window.
Example
// get outer width
string widthHeight = project.Profile.OuterWidth;Example2
// get outer width
$widthHeight = $project->Profile->OuterWidth;ScreenLeft
Property
int ScreenLeft { get; set; }
Gets or sets the x coordinate of the window relative to the screen.
Example
// get x coordinate of the window relative to the screen
int screenLeft = project.Profile.ScreenLeft;
// set x coordinate of the window relative to the screen
project.Profile.ScreenLeft = 20;Example2
// get x coordinate of the window relative to the screen
$screenLeft = $project->Profile->ScreenLeft;
// set x coordinate of the window relative to the screen
$project->Profile->ScreenLeft = 20;ScreenTop
Property
int ScreenTop { get; set; }
Gets or sets the y coordinate of the window relative to the screen.
Example
// get y coordinate of the window relative to the screen
int screenTop = project.Profile.ScreenTop;
// set y coordinate of the window relative to the screen
project.Profile.ScreenTop = 20;Example2
// get y coordinate of the window relative to the screen
$screenTop = $project->Profile->ScreenTop;
// set y coordinate of the window relative to the screen
$project->Profile->ScreenTop = 20;ScreenSizeHeight
Property
int ScreenSizeHeight { get; set; }
Gets the total height of the screen.
Example
// get screen height
int height = project.Profile.ScreenSizeHeight;
// set screen height
project.Profile.ScreenSizeHeight = 600;Example2
// get screen height
$height = $project->Profile->ScreenSizeHeight;
// set screen height
$project->Profile->ScreenSizeHeight = 600;ScreenSizeWidth
Property
int ScreenSizeWidth { get; set; }
Gets the total width of the screen.
Example
// get screen width
int width = project.Profile.ScreenSizeWidth;
// set screen width
project.Profile.ScreenSizeWidth = 800;Example2
// get screen width
$width = $project->Profile->ScreenSizeWidth;
// set screen width
$project->Profile->ScreenSizeWidth = 800;CookieContainer
Property
ICookieContainer CookieContainer { get; }
Gets CookieContainer of current profile (readonly)
BrowserProfile
Property
IBrowserProfile BrowserProfile { get; }
Gets BrowserProfile of current profile (readonly)
Methods
RegenerateLogin
Method
string RegenerateLogin(string rule)
This method is not change the Login property for current object of IProfile.
Parameters
| Type | Name | Description |
|---|---|---|
string | rule | The rule for generation a new login. |
Returns: A string that represents a new login.
С# Example
// generation a new login with specified rule
string newLogin = project.Profile.RegenerateLogin("[Eng|4][RndNum|1970|1990]");Example2
// generation a new login with specified rule
$newLogin = $project->Profile->RegenerateLogin("[Eng|4][RndNum|1970|1990]");ToString
Method
string ToString()
Returns a string that represents the current profile.
You should remember that all ZennoPoster’s structures, actions and methods uses the utf-8 encoding.
Returns: A string that represents the current profile.
Example
// get the in the string format
string profileAsString = project.Profile.ToString();
// save it to file D:\profile.txt
System.IO.File.WriteAllText("C:\\profile.txt", profileAsString, Encoding.UTF8);Example2
// get the in the string format
$profileAsString = $project->Profile->ToString();
// save it to file D:\profile.txt
System\IO\File::WriteAllText("C:\\profile.txt", $profileAsString, System\Text\Encoding::UTF8);FromString
Method
void FromString(string source)
Loads the profile data from specified string.
You should remember that all ZennoPoster’s structures, actions and methods uses the utf-8 encoding.
Parameters
| Type | Name | Description |
|---|---|---|
string | source | A string that represents the profile data. |
Example
// load profile data from file C:\profile.txt
string data = System.IO.File.ReadAllText("C:\\profile.txt", Encoding.UTF8);
// set the profile data
project.Profile.FromString(data);Example2
// load profile data from file C:\profile.txt
$data = System\IO\File::ReadAllText("C:\\profile.txt", System\Text\Encoding::UTF8);
// set the profile data
$project->Profile->FromString($data);Save
Method
void Save(string path, bool saveProxy, bool savePlugins, bool saveLocalStorage, bool saveTimezone, bool saveGeoposition, bool saveSuperCookie, bool saveFonts, bool saveWebRtc, bool saveIndexedDb, String[] saveVariables)
Save the profile data to file.
You should remember that all ZennoPoster’s structures, actions and methods uses the utf-8 encoding.
Parameters
| Type | Name | Description |
|---|---|---|
string | path | A path to file for the profile data. File extension should be .zpprofile, otherwise this extension will be added to the path. |
bool | saveProxy | The true if need to save proxy information; otherwise and default, false. |
bool | savePlugins | The true if need to save plugins information; otherwise and default, false. |
bool | saveLocalStorage | The true if need to save local storage information; otherwise and default, false. |
bool | saveTimezone | The true if need to save time zone information; otherwise and default, false. |
bool | saveGeoposition | The true if need to save geo information; otherwise and default, false. |
bool | saveSuperCookie | The true if need to save HSTS super cookie; otherwise and default, false. |
bool | saveFonts | The true if need to save font list; otherwise and default, false. |
bool | saveWebRtc | The true if need to save webrtc settings; otherwise and default, false. |
bool | saveIndexedDb | The true if need to save indexedDB; otherwise and default, false. |
String[] | saveVariables | The array of variable names if need to save Variables; otherwise and default, null. |
Example
// save profile data to file "C:\profile.txt", but actual path will be "C:\profile.txt.zpprofile", because it needs .zpprofile extension
project.Profile.Save("C:\\profile.txt");Example2
// save profile data to file "C:\profile.txt", but actual path will be "C:\profile.txt.zpprofile", because it needs .zpprofile extension
$project->Profile->Save("C:\\profile.txt");Save variables example
// save profile data to file "C:\profile.zpprofile" with variables "var1" and "var10" content
project.Profile.Save("C:\\profile.txt", saveVariables: new[]{"var1", "var10"});Load
Method
void Load(string path, bool createVariables)
Load the profile data from specified file.
You should remember that all ZennoPoster’s structures, actions and methods uses the utf-8 encoding.
Parameters
| Type | Name | Description |
|---|---|---|
string | path | A path to file that contains the profile data. |
bool | createVariables | The true if need create missing variables. |
Example
// load profile data from file C:\profile.zpprofile and create missing variables if they are in the file.
project.Profile.Load("C:\\profile.zpprofile", true);Example2
// load profile data from file C:\profile.zpprofile
$project->Profile->Load("C:\\profile.zpprofile");Update
Method
void Update()
Update the profile data and browser version to actual without data lost by setting similar browser profile.
You should remember that all ZennoPoster’s structures, actions and methods uses the utf-8 encoding.
Example
// update emulated browser version, user-agent and other parameters to last version without losing browser profile settings
project.Profile.Update();