-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7a8bb0
commit 99e7b79
Showing
11 changed files
with
162 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
- New build. | ||
|
||
## 0.0.1 | ||
- First public release. | ||
- First public release. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# docker build -t imbot . | ||
# docker run -i -t imbot | ||
# | ||
FROM ubuntu | ||
LABEL maintainer "Sean Pianka <[email protected]>" | ||
|
||
## For chromedriver installation: curl/wget/libgconf/unzip | ||
RUN apt-get update -y && apt-get install -y wget curl unzip libgconf-2-4 | ||
## For project usage: python3/python3-pip/chromium/xvfb | ||
RUN apt-get update -y && apt-get install -y xvfb python3 python3-pip | ||
|
||
|
||
# install manually all the missing libraries | ||
RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libcairo2 libcups2 libfontconfig1 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libxss1 fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils | ||
|
||
# install chrome | ||
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install | ||
|
||
# Download, unzip, and install chromedriver | ||
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip | ||
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/ | ||
|
||
# Create directory for project name (ensure it does not conflict with default debian /opt/ directories). | ||
WORKDIR /wrdir | ||
|
||
## Your python project dependencies | ||
#RUN pip3 install selenium | ||
## or install from dependencies.txt, comment above and uncomment below | ||
#COPY requirements.txt . | ||
#RUN pip3 install -r requirements.txt | ||
|
||
|
||
## Copy over project/script (feel free to combine these if your project is a combination of both directories and top-level files) | ||
### For projects which are modules | ||
#COPY app/ . | ||
## For projects which are single scripts | ||
COPY ./examples /wrdir | ||
COPY ./imbot /wrdir/imbot | ||
COPY ./requirements.txt /wrdir/requirements.txt | ||
COPY ./run.sh /wrdir/run.sh | ||
|
||
RUN pip install --no-cache-dir --upgrade -r /wrdir/requirements.txt | ||
|
||
|
||
# Set display port and dbus env to avoid hanging | ||
ENV DISPLAY=:99 | ||
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null | ||
|
||
|
||
# Bash script to invoke xvfb, any preliminary commands, then invoke project | ||
#CMD ["Xvfb",":99","-screen","0","640x480x8","-nolisten","tcp","&&","python3","examples.py"] | ||
#COPY run.sh . | ||
CMD /bin/bash run.sh | ||
|
||
# | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#FROM python:3.9 | ||
|
||
#WORKDIR /wrdir | ||
|
||
#COPY ./examples /wrdir | ||
#COPY ./imbot /wrdir/imbot | ||
#COPY ./requirements.txt /wrdir/requirements.txt | ||
|
||
#RUN pip install --no-cache-dir --upgrade -r /wrdir/requirements.txt | ||
|
||
#CMD ["python", "examples.py"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Reason for "-nolisten tcp", not documented within Xvfb manpages (for who knows what reason) | ||
# https://superuser.com/questions/855019/make-xvfb-listen-only-on-local-ip | ||
Xvfb :99 -screen 0 640x480x8 -nolisten tcp & | ||
python3 examples.py |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"url":"https://www.google.com/", | ||
"search":{ | ||
"operations":[ | ||
{"type":"xpath","code":"/html/body/c-wiz/c-wiz/div/div[3]/div[2]/div/div[1]/form/div[1]/div[1]/c-wiz/div/a","opt":"click"}, | ||
{"type":"xpath","code":"/html/body/div[1]/div[3]/form/div[1]/div[1]/div[1]/div/div[2]/input","opt":"put","arg_data":"0"}, | ||
{"type":"name","code":"btnK","opt":"click"}, | ||
{"type":"xpath","code":"/html/body/div[7]/div/div[4]/div/div[1]/div/div[1]/div/div[2]/a","opt":"click"}, | ||
{"type":"xpath","code":"/html/body/div[2]/c-wiz/div[3]/div[1]/div/div[1]/div/div[1]/div[1]/span/div[1]/div[1]/div[1]/a[1]/div[1]/img","opt":"click"}, | ||
{"type":"xpath","code":"/html/body/div[2]/c-wiz/div[3]/div[2]/div[3]/div/div/div[3]/div[2]/c-wiz/div/div[1]/div[1]/div[3]/div/a/img","opt":"get","data":"src"} | ||
] | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
hexor | ||
asciitext | ||
selenium | ||
selenium |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
from setuptools import setup,find_packages | ||
setup( | ||
name="imbot", | ||
version="0.1.2", | ||
version="0.1.3", | ||
author="YasserBDJ96", | ||
author_email="[email protected]", | ||
description='''imbot for making a bot to control any website.''', | ||
|
@@ -36,4 +36,4 @@ | |
], | ||
python_requires=">=3.x.x" | ||
) | ||
#}END. | ||
#}END. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.2 | ||
0.1.3 |