FBBotSelenium

[Done] A pretty simple facebook bot, in case you need friends. Got my account banned at 1k friends.
git clone https://git.jojolepro.com/FBBotSelenium.git
Log | Files | Refs

commit 4f386ad2ff8116e86766d0fb33de29b2295b6011
Author: Joël Lupien (Jojolepro) <jojolepro@jojolepro.com>
Date:   Tue, 25 Aug 2020 14:07:42 -0400

init

Diffstat:
A.classpath | 8++++++++
A.idea/compiler.xml | 23+++++++++++++++++++++++
A.idea/copyright/profiles_settings.xml | 4++++
A.idea/misc.xml | 7+++++++
A.idea/modules.xml | 9+++++++++
A.idea/workspace.xml | 820+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.project | 17+++++++++++++++++
A.settings/org.eclipse.jdt.core.prefs | 11+++++++++++
AFBBotSelenium.iml | 38++++++++++++++++++++++++++++++++++++++
Abin/net/supercraft/fbbot/BotThread.class | 0
Abin/net/supercraft/fbbot/BotThread2.class | 0
Abin/net/supercraft/fbbot/FBBot.class | 0
Asrc/net/supercraft/fbbot/BotThread.java | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/net/supercraft/fbbot/BotThread2.java | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/net/supercraft/fbbot/FBBot.java | 20++++++++++++++++++++
15 files changed, 1107 insertions(+), 0 deletions(-)

diff --git a/.classpath b/.classpath @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> + <classpathentry kind="lib" path="lib/selenium-server-standalone-2.53.0.jar"/> + <classpathentry kind="lib" path="lib/selenium-java-2.53.0.jar"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/.idea/compiler.xml b/.idea/compiler.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <resourceExtensions /> + <wildcardResourcePatterns> + <entry name="!?*.java" /> + <entry name="!?*.form" /> + <entry name="!?*.class" /> + <entry name="!?*.groovy" /> + <entry name="!?*.scala" /> + <entry name="!?*.flex" /> + <entry name="!?*.kt" /> + <entry name="!?*.clj" /> + <entry name="!?*.aj" /> + </wildcardResourcePatterns> + <annotationProcessing> + <profile default="true" name="Default" enabled="false"> + <processorPath useClasspath="true" /> + </profile> + </annotationProcessing> + </component> +</project>+ \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ +<component name="CopyrightManager"> + <settings default="" /> +</component>+ \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/classes" /> + </component> +</project>+ \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/FBBotSelenium.iml" filepath="$PROJECT_DIR$/FBBotSelenium.iml" /> + </modules> + </component> +</project>+ \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml @@ -0,0 +1,819 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ChangeListManager"> + <list default="true" id="f7c25258-484e-4a77-9a64-45277c9d2624" name="Default" comment="" /> + <ignored path="FBBotSelenium.iws" /> + <ignored path=".idea/workspace.xml" /> + <ignored path="$PROJECT_DIR$/bin/" /> + <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> + <option name="TRACKING_ENABLED" value="true" /> + <option name="SHOW_DIALOG" value="false" /> + <option name="HIGHLIGHT_CONFLICTS" value="true" /> + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> + <option name="LAST_RESOLUTION" value="IGNORE" /> + </component> + <component name="CreatePatchCommitExecutor"> + <option name="PATCH_PATH" value="" /> + </component> + <component name="FavoritesManager"> + <favorites_list name="FBBotSelenium" /> + </component> + <component name="FileEditorManager"> + <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> + <file leaf-file-name="BotThread2.java" pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="379"> + <caret line="47" column="33" lean-forward="false" selection-start-line="47" selection-start-column="33" selection-end-line="47" selection-end-column="33" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="FBBot.java" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="170"> + <caret line="10" column="8" lean-forward="false" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="74" /> + <folding /> + </state> + </provider> + </entry> + </file> + </leaf> + </component> + <component name="FileTemplateManagerImpl"> + <option name="RECENT_TEMPLATES"> + <list> + <option value="Class" /> + </list> + </option> + </component> + <component name="GradleLocalSettings"> + <option name="externalProjectsViewState"> + <projects_view /> + </option> + </component> + <component name="IdeDocumentHistory"> + <option name="CHANGED_PATHS"> + <list> + <option value="$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread.java" /> + <option value="$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java" /> + <option value="$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java" /> + </list> + </option> + </component> + <component name="ProjectFrameBounds"> + <option name="x" value="2885" /> + <option name="y" value="15" /> + <option name="width" value="943" /> + <option name="height" value="1173" /> + </component> + <component name="ProjectView"> + <navigator currentView="ProjectPane" proportions="" version="1"> + <flattenPackages /> + <showMembers /> + <showModules /> + <showLibraryContents /> + <hideEmptyPackages /> + <abbreviatePackageNames /> + <autoscrollToSource /> + <autoscrollFromSource /> + <sortByType /> + <manualOrder /> + <foldersAlwaysOnTop value="true" /> + </navigator> + <panes> + <pane id="Scratches" /> + <pane id="AndroidView" /> + <pane id="PackagesPane" /> + <pane id="ProjectPane" /> + <pane id="Scope" /> + </panes> + </component> + <component name="PropertiesComponent"> + <property name="last_opened_file_path" value="$PROJECT_DIR$/../PlanetDiggerBot" /> + <property name="project.structure.last.edited" value="Modules" /> + <property name="project.structure.proportion" value="0.15" /> + <property name="project.structure.side.proportion" value="0.2" /> + </component> + <component name="RunDashboard"> + <option name="ruleStates"> + <list> + <RuleState> + <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> + </RuleState> + <RuleState> + <option name="name" value="StatusDashboardGroupingRule" /> + </RuleState> + </list> + </option> + </component> + <component name="RunManager" selected="Application.FBBot"> + <configuration name="FBBot" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea"> + <pattern> + <option name="PATTERN" value="net.supercraft.fbbot.*" /> + <option name="ENABLED" value="true" /> + </pattern> + </extension> + <option name="MAIN_CLASS_NAME" value="net.supercraft.fbbot.FBBot" /> + <option name="VM_PARAMETERS" /> + <option name="PROGRAM_PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="ENABLE_SWING_INSPECTOR" value="false" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <module name="FBBotSelenium" /> + <envs /> + </configuration> + <configuration default="true" type="Applet" factoryName="Applet"> + <option name="HTML_USED" value="false" /> + <option name="WIDTH" value="400" /> + <option name="HEIGHT" value="300" /> + <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> + <module /> + </configuration> + <configuration default="true" type="Application" factoryName="Application"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <option name="MAIN_CLASS_NAME" /> + <option name="VM_PARAMETERS" /> + <option name="PROGRAM_PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="ENABLE_SWING_INSPECTOR" value="false" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <module name="" /> + <envs /> + </configuration> + <configuration default="true" type="JUnit" factoryName="JUnit"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="TEST_OBJECT" value="class" /> + <option name="VM_PARAMETERS" value="-ea" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="singleModule" /> + </option> + <envs /> + <patterns /> + </configuration> + <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin"> + <module name="" /> + <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" /> + <option name="PROGRAM_PARAMETERS" /> + <predefined_log_file id="idea.log" enabled="true" /> + </configuration> + <configuration default="true" type="Remote" factoryName="Remote"> + <option name="USE_SOCKET_TRANSPORT" value="true" /> + <option name="SERVER_MODE" value="false" /> + <option name="SHMEM_ADDRESS" value="javadebug" /> + <option name="HOST" value="localhost" /> + <option name="PORT" value="5005" /> + </configuration> + <configuration default="true" type="TestNG" factoryName="TestNG"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="SUITE_NAME" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="GROUP_NAME" /> + <option name="TEST_OBJECT" value="CLASS" /> + <option name="VM_PARAMETERS" value="-ea" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" /> + <option name="OUTPUT_DIRECTORY" /> + <option name="ANNOTATION_TYPE" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="singleModule" /> + </option> + <option name="USE_DEFAULT_REPORTERS" value="false" /> + <option name="PROPERTIES_FILE" /> + <envs /> + <properties /> + <listeners /> + </configuration> + <configuration default="true" type="GradleRunConfiguration" factoryName="Gradle"> + <ExternalSystemSettings> + <option name="executionName" /> + <option name="externalProjectPath" /> + <option name="externalSystemIdString" value="GRADLE" /> + <option name="scriptParameters" /> + <option name="taskDescriptions"> + <list /> + </option> + <option name="taskNames"> + <list /> + </option> + <option name="vmOptions" /> + </ExternalSystemSettings> + <method /> + </configuration> + <configuration default="true" type="JUnitTestDiscovery" factoryName="JUnit Test Discovery" changeList="All"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="TEST_OBJECT" value="class" /> + <option name="VM_PARAMETERS" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="singleModule" /> + </option> + <envs /> + <patterns /> + <method /> + </configuration> + <configuration default="true" type="JarApplication" factoryName="JAR Application"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <envs /> + <method /> + </configuration> + <configuration default="true" type="Java Scratch" factoryName="Java Scratch"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <option name="SCRATCH_FILE_ID" value="0" /> + <option name="MAIN_CLASS_NAME" /> + <option name="VM_PARAMETERS" /> + <option name="PROGRAM_PARAMETERS" /> + <option name="WORKING_DIRECTORY" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="ENABLE_SWING_INSPECTOR" value="false" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <module name="" /> + <envs /> + <method /> + </configuration> + <configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <option name="MAIN_CLASS_NAME" /> + <option name="VM_PARAMETERS" /> + <option name="PROGRAM_PARAMETERS" /> + <option name="WORKING_DIRECTORY" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <module name="FBBotSelenium" /> + <envs /> + <method /> + </configuration> + <configuration default="true" type="KotlinStandaloneScriptRunConfigurationType" factoryName="Kotlin script"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <option name="filePath" /> + <option name="vmParameters" /> + <option name="alternativeJrePath" /> + <option name="programParameters" /> + <option name="passParentEnvs" value="true" /> + <option name="workingDirectory" /> + <option name="isAlternativeJrePathEnabled" value="false" /> + <envs /> + <method /> + </configuration> + <configuration default="true" type="ScalaTestRunConfiguration" factoryName="ScalaTest"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <setting name="path" value="" /> + <setting name="package" value="" /> + <setting name="vmparams" value="" /> + <setting name="params" value="" /> + <setting name="workingDirectory" value="" /> + <setting name="searchForTest" value="Across module dependencies" /> + <setting name="testName" value="" /> + <setting name="testKind" value="Class" /> + <setting name="showProgressMessages" value="true" /> + <envs /> + <method /> + </configuration> + <configuration default="true" type="Specs2RunConfiguration" factoryName="Specs2"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <setting name="path" value="" /> + <setting name="package" value="" /> + <setting name="vmparams" value="" /> + <setting name="params" value="" /> + <setting name="workingDirectory" value="" /> + <setting name="searchForTest" value="Across module dependencies" /> + <setting name="testName" value="" /> + <setting name="testKind" value="Class" /> + <setting name="showProgressMessages" value="true" /> + <envs /> + <method /> + </configuration> + <configuration default="true" type="TestNGTestDiscovery" factoryName="TestNG Test Discovery" changeList="All"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="SUITE_NAME" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="GROUP_NAME" /> + <option name="TEST_OBJECT" value="CLASS" /> + <option name="VM_PARAMETERS" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" /> + <option name="OUTPUT_DIRECTORY" /> + <option name="ANNOTATION_TYPE" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="singleModule" /> + </option> + <option name="USE_DEFAULT_REPORTERS" value="false" /> + <option name="PROPERTIES_FILE" /> + <envs /> + <properties /> + <listeners /> + <method /> + </configuration> + <configuration default="true" type="uTestRunConfiguration" factoryName="utest"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <setting name="path" value="" /> + <setting name="package" value="" /> + <setting name="vmparams" value="" /> + <setting name="params" value="" /> + <setting name="workingDirectory" value="" /> + <setting name="searchForTest" value="Across module dependencies" /> + <setting name="testName" value="" /> + <setting name="testKind" value="Class" /> + <setting name="showProgressMessages" value="true" /> + <envs /> + <method /> + </configuration> + <recent_temporary> + <list size="1"> + <item index="0" class="java.lang.String" itemvalue="Application.FBBot" /> + </list> + </recent_temporary> + </component> + <component name="SbtLocalSettings"> + <option name="externalProjectsViewState"> + <projects_view /> + </option> + </component> + <component name="ShelveChangesManager" show_recycled="false"> + <option name="remove_strategy" value="false" /> + </component> + <component name="SvnConfiguration"> + <configuration /> + </component> + <component name="TaskManager"> + <task active="true" id="Default" summary="Default task"> + <changelist id="f7c25258-484e-4a77-9a64-45277c9d2624" name="Default" comment="" /> + <created>1476576994602</created> + <option name="number" value="Default" /> + <option name="presentableId" value="Default" /> + <updated>1476576994602</updated> + </task> + <servers /> + </component> + <component name="ToolWindowManager"> + <frame x="2885" y="15" width="943" height="1173" extended-state="0" /> + <editor active="true" /> + <layout> + <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> + <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> + <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> + <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32948583" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16400427" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> + <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> + <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> + <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> + <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> + <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + </layout> + </component> + <component name="Vcs.Log.UiProperties"> + <option name="RECENTLY_FILTERED_USER_GROUPS"> + <collection /> + </option> + <option name="RECENTLY_FILTERED_BRANCH_GROUPS"> + <collection /> + </option> + </component> + <component name="VcsContentAnnotationSettings"> + <option name="myLimit" value="2678400000" /> + </component> + <component name="XDebuggerManager"> + <breakpoint-manager /> + <watches-manager /> + </component> + <component name="antWorkspaceConfiguration"> + <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="FILTER_TARGETS" value="false" /> + </component> + <component name="editorHistoryManager"> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="170"> + <caret line="10" column="8" lean-forward="false" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="74" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="170"> + <caret line="10" column="8" lean-forward="false" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="74" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="170"> + <caret line="10" column="8" lean-forward="false" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="74" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="340"> + <caret line="28" column="0" lean-forward="false" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="170"> + <caret line="10" column="37" lean-forward="false" selection-start-line="10" selection-start-column="37" selection-end-line="10" selection-end-column="37" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="360"> + <caret line="28" column="0" lean-forward="false" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="234"> + <caret line="13" column="33" lean-forward="false" selection-start-line="13" selection-start-column="33" selection-end-line="13" selection-end-column="33" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="234"> + <caret line="13" column="33" lean-forward="false" selection-start-line="13" selection-start-column="33" selection-end-line="13" selection-end-column="33" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="234"> + <caret line="13" column="33" lean-forward="false" selection-start-line="13" selection-start-column="33" selection-end-line="13" selection-end-column="33" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="234"> + <caret line="13" column="33" lean-forward="false" selection-start-line="13" selection-start-column="33" selection-end-line="13" selection-end-column="33" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="234"> + <caret line="13" column="33" lean-forward="false" selection-start-line="13" selection-start-column="33" selection-end-line="13" selection-end-column="33" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="738"> + <caret line="49" column="32" lean-forward="false" selection-start-line="49" selection-start-column="32" selection-end-line="49" selection-end-column="32" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="738"> + <caret line="49" column="32" lean-forward="false" selection-start-line="49" selection-start-column="32" selection-end-line="49" selection-end-column="32" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="1134"> + <caret line="71" column="0" lean-forward="false" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="54"> + <caret line="3" column="13" lean-forward="false" selection-start-line="3" selection-start-column="13" selection-end-line="3" selection-end-column="13" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="54"> + <caret line="3" column="13" lean-forward="false" selection-start-line="3" selection-start-column="13" selection-end-line="3" selection-end-column="13" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="54"> + <caret line="3" column="13" lean-forward="false" selection-start-line="3" selection-start-column="13" selection-end-line="3" selection-end-column="13" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="210"> + <caret line="43" column="38" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="71" selection-end-column="0" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/FBBot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="170"> + <caret line="10" column="8" lean-forward="false" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="74" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/net/supercraft/fbbot/BotThread2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="379"> + <caret line="47" column="33" lean-forward="false" selection-start-line="47" selection-start-column="33" selection-end-line="47" selection-end-column="33" /> + <folding /> + </state> + </provider> + </entry> + </component> + <component name="masterDetails"> + <states> + <state key="ArtifactsStructureConfigurable.UI"> + <settings> + <artifact-editor /> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="FacetStructureConfigurable.UI"> + <settings> + <last-edited>No facets are configured</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="GlobalLibrariesConfigurable.UI"> + <settings> + <last-edited>scala-sdk-2.11.8</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="JdkListConfigurable.UI"> + <settings> + <last-edited>1.8</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="ModuleStructureConfigurable.UI"> + <settings> + <last-edited>FBBotSelenium</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="ProjectJDKs.UI"> + <settings> + <last-edited>1.8</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="ProjectLibrariesConfigurable.UI"> + <settings> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + </states> + </component> +</project>+ \ No newline at end of file diff --git a/.project b/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>FBBotSelenium</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/FBBotSelenium.iml b/FBBotSelenium.iml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="EclipseModuleManager"> + <libelement value="jar://$MODULE_DIR$/lib/selenium-server-standalone-2.53.0.jar!/" /> + <libelement value="jar://$MODULE_DIR$/lib/selenium-java-2.53.0.jar!/" /> + <src_description expected_position="0"> + <src_folder value="file://$MODULE_DIR$/src" expected_position="0" /> + </src_description> + </component> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/bin" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + </content> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="inheritedJdk" /> + <orderEntry type="module-library"> + <library name="selenium-server-standalone-2.53.0.jar"> + <CLASSES> + <root url="jar://$MODULE_DIR$/lib/selenium-server-standalone-2.53.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library name="selenium-java-2.53.0.jar"> + <CLASSES> + <root url="jar://$MODULE_DIR$/lib/selenium-java-2.53.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module>+ \ No newline at end of file diff --git a/bin/net/supercraft/fbbot/BotThread.class b/bin/net/supercraft/fbbot/BotThread.class Binary files differ. diff --git a/bin/net/supercraft/fbbot/BotThread2.class b/bin/net/supercraft/fbbot/BotThread2.class Binary files differ. diff --git a/bin/net/supercraft/fbbot/FBBot.class b/bin/net/supercraft/fbbot/FBBot.class Binary files differ. diff --git a/src/net/supercraft/fbbot/BotThread.java b/src/net/supercraft/fbbot/BotThread.java @@ -0,0 +1,71 @@ +package net.supercraft.fbbot; + +import java.util.HashMap; +import java.util.Map; + +import org.openqa.selenium.By; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.chrome.ChromeOptions; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +public class BotThread implements Runnable{ + int offset = 0; + long localNbr = FBBot.currNbr; + public BotThread(int id){ + offset = FBBot.interval * id; + localNbr = FBBot.currNbr + (FBBot.interval*id); + } + public void run() { + /*Capabilities caps = new DesiredCapabilities(); + ((DesiredCapabilities) caps).setJavascriptEnabled(true); + ((DesiredCapabilities) caps).setCapability("takesScreenshot", true); + ((DesiredCapabilities) caps).setCapability( + PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, + "your custom path\\phantomjs.exe" + ); + WebDriver driver = new PhantomJSDriver(caps);*/ + + + ChromeOptions options = new ChromeOptions(); + Map<String, Object> prefs = new HashMap<String, Object>(); + prefs.put("profile.default_content_setting_values.notifications", 2); + options.setExperimentalOption("prefs", prefs); + + WebDriver driver = new ChromeDriver(options); + + WebDriverWait wait = new WebDriverWait(driver, 10); + + driver.get("http://www.facebook.com"); + + driver.findElement(By.id("email")).sendKeys("samuel.martin9000@gmail.com"); + driver.findElement(By.id("pass")).sendKeys("37SHJgTm4hMbzALOdgRL"); + wait.until(ExpectedConditions.elementToBeClickable(By.id("loginbutton"))); + driver.findElement(By.id("loginbutton")).click(); + //FriendRequestAdd + //https://www.facebook.com/profile.php?id=100011477416068 + //globalContainer + for(int i=0;i<FBBot.interval;i++){ + driver.get("https://www.facebook.com/profile.php?id="+localNbr); + try{ + WebElement elem = driver.findElement(By.id("u_ps_0_0_1")); + //WebElement background = driver.findElement(By.id("globalContainer")); + //WebElement elem = driver.findElement(By.className("_42ft _4jy0 FriendRequestAdd addButton _4jy4 _4jy2 selected _51sy")); + if(elem!=null){ + wait.until(ExpectedConditions.elementToBeClickable(elem)); + elem.click(); + }else{ + System.out.println("No add friend button on id:"+localNbr); + } + }catch(NoSuchElementException e){ + System.out.println("No add friend button on id:"+localNbr); + } + + localNbr++; + } + driver.close(); + } +} diff --git a/src/net/supercraft/fbbot/BotThread2.java b/src/net/supercraft/fbbot/BotThread2.java @@ -0,0 +1,79 @@ +package net.supercraft.fbbot; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.openqa.selenium.*; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.chrome.ChromeOptions; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +public class BotThread2 implements Runnable{ + int offset = 0; + long localNbr = FBBot.currNbr; + public BotThread2(int id){ + offset = FBBot.interval * id; + localNbr = FBBot.currNbr + (FBBot.interval*id); + } + public void run() { + /*Capabilities caps = new DesiredCapabilities(); + ((DesiredCapabilities) caps).setJavascriptEnabled(true); + ((DesiredCapabilities) caps).setCapability("takesScreenshot", true); + ((DesiredCapabilities) caps).setCapability( + PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, + "your custom path\\phantomjs.exe" + ); + WebDriver driver = new PhantomJSDriver(caps);*/ + + + ChromeOptions options = new ChromeOptions(); + Map<String, Object> prefs = new HashMap<String, Object>(); + prefs.put("profile.default_content_setting_values.notifications", 2); + options.setExperimentalOption("prefs", prefs); + + WebDriver driver = new ChromeDriver(options); + + WebDriverWait wait = new WebDriverWait(driver, 10); + + driver.get("http://www.facebook.com"); + + driver.findElement(By.id("email")).sendKeys("samuel.martin9000@gmail.com"); + driver.findElement(By.id("pass")).sendKeys("37SHJgTm4hMbzALOdgRL"); + wait.until(ExpectedConditions.elementToBeClickable(By.id("loginbutton"))); + driver.findElement(By.id("loginbutton")).click(); + //FriendRequestAdd + //https://www.facebook.com/profile.php?id=100011477416068 + //globalContainer + int clickCount = 0; + for(int i=0;i<50;i++){ + driver.get("https://www.facebook.com/find-friends/browser/"); + try{ + List<WebElement> elem = driver.findElements(By.className("FriendRequestAdd")); + //WebElement background = driver.findElement(By.id("globalContainer")); + //WebElement elem = driver.findElement(By.className("_42ft _4jy0 FriendRequestAdd addButton _4jy4 _4jy2 selected _51sy")); + for(int j=0;j<elem.size();j++){ + if(elem.get(j)!=null && elem.get(j).isDisplayed()){ + wait.until(ExpectedConditions.elementToBeClickable(elem.get(j))); + elem.get(j).click(); + clickCount++; + System.out.println("click:"+clickCount); + }else{ + System.out.println("No add friend button on id:"+localNbr); + } + } + Thread.sleep(4000l); + }catch(NoSuchElementException e){ + System.out.println("No add friend button on id:"+localNbr); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch(WebDriverException e){ + + } + + localNbr++; + } + driver.close(); + } +} diff --git a/src/net/supercraft/fbbot/FBBot.java b/src/net/supercraft/fbbot/FBBot.java @@ -0,0 +1,20 @@ +package net.supercraft.fbbot; + + +import java.util.ArrayList; + +public class FBBot { + public static long currNbr = 100000001500000l; + public static int interval = 10000; + public static void main(String[] args) { + + System.setProperty("webdriver.chrome.driver", "lib/chromedriver"); + ArrayList<Thread> ts = new ArrayList<Thread>(); + + for(int i=0;i<3;i++){ + ts.add(new Thread(new BotThread2(i))); + ts.get(i).start(); + } + //driver.close(); + } +}