Skip to content

Commit

Permalink
Merge pull request #2 from chkp-aviadl/master
Browse files Browse the repository at this point in the history
Small changes
  • Loading branch information
chkp-dorku authored Jan 6, 2020
2 parents c22380f + 2534dc0 commit 2aee902
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 34 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ the token should look like this: `exp=1578566241~acl=/*~hmac=95add7c04faa2e7831
Send an HTTPS GET
request: https://rep.checkpoint.com/rep-auth/service/v1.0/request

Use the "Client-Key" header. If you don't have a Client-Key, ask for one
from the Reputation Service team. (otherwise you will get HTTP status
401)
Use the "Client-Key" header. (otherwise you will get HTTP status 401)

**how do I know that the token expired?**

Expand All @@ -60,8 +58,7 @@ request: https://rep.checkpoint.com/url-rep/service/v2.0/query?resource=http://

request headers: 

- "Client-Key":  If you don't have a Client-Key, ask for one from the
reputation service team.
- "Client-Key":  You authorization id.

- "token": the token from the rep-auth service.

Expand Down Expand Up @@ -108,8 +105,7 @@ request: https://rep.checkpoint.com/file-rep/service/v2.0/query?resource=71b6bb

request headers: 

- "Client-Key":  If you don't have a Client-Key, ask for one from the
reputation service team.
- "Client-Key":  You authorization id.

- "token": the token from the rep-auth service.

Expand Down Expand Up @@ -149,8 +145,7 @@ request: https://rep.checkpoint.com/ip-rep/service/v2.0/query?resource=8.8.8.8

request headers: 

- "Client-Key":  If you don't have a Client-Key, ask for one from the
reputation service team.
- "Client-Key":  You authorization id.

- "token": the token from the **rep-auth** service.

Expand Down
12 changes: 6 additions & 6 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ The jar prints to screen the result of the resource.
mvn install
```

The *jar* will be in `target/reputation-service-api-x.y.z.jar` where `x.y.z` is the version number.
The *jar* will be in `target/reputation-service-api-x.y.z-jar-with-dependencies.jar` where `x.y.z` is the version number.

## Usage

```
# java -jar reputation-service-api-1.0.0.jar --help
# java -jar reputation-service-api-1.0.0-jar-with-dependencies.jar --help
Usage: <main class> [options]
Options:
* -ck, --client-key
Expand All @@ -36,19 +36,19 @@ Usage: <main class> [options]
### Simple use

```
# java -jar reputation-service-api-1.0.0.jar -s ip -r 8.8.8.8 -ck <client-Key>
# java -jar reputation-service-api-1.0.0-jar-with-dependencies.jar -s ip -r 8.8.8.8 -ck <client-Key>
8.8.8.8 is Benign with risk 0/100
```

```
# java -jar reputation-service-api-1.0.0.jar -s url -r https://secure08c-chase.000webhostapp.com/web/auth/enrollment/ -ck <client-Key>
# java -jar reputation-service-api-1.0.0-jar-with-dependencies.jar -s url -r https://secure08c-chase.000webhostapp.com/web/auth/enrollment/ -ck <client-Key>
https://secure08c-chase.000webhostapp.com/web/auth/enrollment/ is Phishing with risk 100/100
```

### With `--verbose`

```
# java -jar reputation-service-api-1.0.0.jar -s ip -r 8.8.8.8 -ck <client-key> -v
# java -jar reputation-service-api-1.0.0-jar-with-dependencies.jar -s ip -r 8.8.8.8 -ck <client-key> -v
first, let's get token from rep-auth
success!
now, let's query reputation
Expand Down Expand Up @@ -89,7 +89,7 @@ your response is:
8.8.8.8 is Benign with risk 0/100
```
```
# java -jar reputation-service-api-1.0.0.jar -s url -r https://secure08c-chase.000webhostapp.com/web/auth/enrollment/ -ck <client-Key> -v
# java -jar reputation-service-api-1.0.0-jar-with-dependencies.jar -s url -r https://secure08c-chase.000webhostapp.com/web/auth/enrollment/ -ck <client-Key> -v
first, let's get token from rep-auth
success!
now, let's query reputation
Expand Down
26 changes: 7 additions & 19 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,22 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
<goal>single</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.checkpoint.reputation.App</mainClass>
</manifest>
</archive>
Expand Down

0 comments on commit 2aee902

Please sign in to comment.